#include <osgprimitive.h>
Inherited by OSGBox, OSGCapsule, OSGCylinder, OSGDummy, OSGHeightField, OSGMesh, OSGPlane, and OSGSphere.
Inheritance diagram for OSGPrimitive:

Public Types | |
| Low | |
| Middle | |
| High | |
| enum | Quality { Low, Middle, High } |
Public Member Functions | |
| OSGPrimitive () | |
| virtual | ~OSGPrimitive () |
| virtual void | init (const OsgHandle &osgHandle, Quality quality=Middle)=0 |
| Initialisation of the primitive. | |
| virtual void | setMatrix (const osg::Matrix &m4x4) |
| Sets the transformation matrix of this object (position and orientation). | |
| virtual osg::Group * | getGroup () |
| returns the group object which is the root of all subcomponents of this primitive | |
| virtual void | setTexture (const std::string &filename) |
| assigns a texture to the primitive | |
| virtual void | setTexture (const std::string &filename, bool repeatOnX, bool repeatOnY) |
| assigns a texture to the primitive, you can choose if the texture should be repeated | |
| virtual void | setColor (const Color &color) |
| sets the color for painting this primitive | |
| virtual osg::Transform * | getTransform () |
| returns a osg transformation object; | |
Protected Attributes | |
| osg::ref_ptr< osg::Geode > | geode |
| osg::ref_ptr< osg::MatrixTransform > | transform |
| osg::ref_ptr< osg::ShapeDrawable > | shape |
The idea is to hide all the details of the OSG implementation.
| enum Quality |
| OSGPrimitive | ( | ) |
| ~OSGPrimitive | ( | ) | [virtual] |
| Group * getGroup | ( | ) | [virtual] |
returns the group object which is the root of all subcomponents of this primitive
Reimplemented in OSGDummy.
| Transform * getTransform | ( | ) | [virtual] |
Initialisation of the primitive.
Must in order to place the object into the scene. This function should be overloaded
| void setColor | ( | const Color & | color | ) | [virtual] |
| void setMatrix | ( | const osg::Matrix & | m4x4 | ) | [virtual] |
Sets the transformation matrix of this object (position and orientation).
Reimplemented in OSGHeightField, and OSGDummy.
| void setTexture | ( | const std::string & | filename, | |
| bool | repeatOnX, | |||
| bool | repeatOnY | |||
| ) | [virtual] |
assigns a texture to the primitive, you can choose if the texture should be repeated
TODO: needs to be fixed (why does this not work???)
| void setTexture | ( | const std::string & | filename | ) | [virtual] |
osg::ref_ptr<osg::Geode> geode [protected] |
osg::ref_ptr<osg::ShapeDrawable> shape [protected] |
osg::ref_ptr<osg::MatrixTransform> transform [protected] |
1.4.7