Convenience class for creating a sphere node. Subclasses osg::Geode.
More...
#include <Shapes.h>
List of all members.
Public Member Functions |
| Sphere (const osg::Vec3 ¢er, float radius, const osg::Vec4 &color=osg::Vec4(0, 0, 0, 1)) |
| Creates a sphere node.
|
void | setColor (const osg::Vec4 &newColor) |
| Sets the color of the sphere.
|
void | setCenter (const osg::Vec3 &newCenter) |
| Sets the center of the sphere in meters.
|
void | setRadius (float newRadius) |
| Sets the radius of the the sphere in meters.
|
Protected Attributes |
osg::Sphere * | _sphere |
| osg::Sphere object so that we can change the dimensions of the sphere
|
osg::ShapeDrawable * | _shapeDrawable |
| osg::ShapeDrawable object so that we can change the color of the sphere
|
Detailed Description
Convenience class for creating a sphere node. Subclasses osg::Geode.
Constructor & Destructor Documentation
Creates a sphere node.
- Parameters:
-
center | osg::Vec3 reference specifying the center of the sphere in meters |
radius | The radius of the shpere in meters |
color | The color of the sphere in rgba format in range (0,1) |
Member Function Documentation
Sets the center of the sphere in meters.
- Parameters:
-
newCenter | osg::Vec3 reference for the center |
- Returns:
- void
Sets the color of the sphere.
- Parameters:
-
newColor | osg::Vec4 reference for the color in rgba format in range (0,1) |
- Returns:
- void
Sets the radius of the the sphere in meters.
- Parameters:
-
newRadius | osg::Vec3 reference for the radius |
- Returns:
- void
The documentation for this class was generated from the following file:
- /home/pete/myRepos/grip2/osgGolems/Shapes.h