-
[ osg::Box ] 박스 그리기3D Graphics/OSG 2008. 8. 23. 19:46728x90
osg::ref_ptr<osg::Geode> boxGeo = new osg::Geode;
osg::ref_ptr<osg::Box> box (new osg::Box(center, lengthX, lengthY,lengthZ));//Create Box
osg::ref_ptr<osg::ShapeDrawable> capsuledrawable (new osg::ShapeDrawable(box.get()));
capsuledrawable->setColor(osg::Vec4(0.5f, 0.5f, 0.5f, 1.f));//set color
boxGeo->addDrawable(capsuledrawable.get());
mRoot->addChild(model.get(), true);//switch node'3D Graphics > OSG' 카테고리의 다른 글
OpenSceneGraph 2.4 Window Dependency labrary (0) 2008.11.28 OSG사용시 주의점!! (0) 2008.11.23 WireFrame설정 (0) 2008.08.18 MAX용 *.osg export (0) 2008.08.17 OpenSceneGraph Viewer File Format (0) 2008.08.17