16 #ifndef SURGSIM_GRAPHICS_OSGUNITSPHERE_H 17 #define SURGSIM_GRAPHICS_OSGUNITSPHERE_H 20 #include <osg/PositionAttitudeTransform> 23 #include <osg/ShapeDrawable> 41 osg::ref_ptr<osg::Sphere> unitSphere =
new osg::Sphere(osg::Vec3(0.0, 0.0, 0.0), 1.0);
42 osg::ref_ptr<osg::ShapeDrawable> drawable =
new osg::ShapeDrawable(unitSphere);
43 osg::ref_ptr<osg::Geode> geode =
new osg::Geode();
44 geode->addDrawable(drawable);
45 geode->getOrCreateStateSet()->setMode(GL_NORMALIZE, osg::StateAttribute::ON);
48 rotation.makeRotate(osg::Vec3d(0.0, 0.0, 1.0), osg::Vec3d(0.0, 1.0, 0.0));
67 #endif // SURGSIM_GRAPHICS_OSGUNITSPHERE_H Definition: CompoundShapeToGraphics.cpp:29
OsgUnitSphere()
Constructor.
Definition: OsgUnitSphere.h:38
osg::ref_ptr< osg::Node > getNode() const
Returns the root OSG node for the plane to be inserted into the scene-graph.
Definition: OsgUnitSphere.h:53
osg::ref_ptr< osg::PositionAttitudeTransform > m_transform
Root OSG node of the sphere.
Definition: OsgUnitSphere.h:60
OSG unit sphere geode to be used as a primitive shape The sphere is located at (0, 0, 0) and has a radius of 1.
Definition: OsgUnitSphere.h:34
Definition: OculusView.h:25