#include <Shape.h>
Inherited by osgHaptics::ShapeComposite.
Inheritance diagram for osgHaptics::Shape:

Public Member Functions | |
| Shape (HapticDevice *device, int enabled=1) | |
| Default constructor. | |
| virtual void | setEnable (bool flag) |
| Enable the haptic rendering of this shape. | |
| bool | getEnable () const |
| Return if this shape is enabled for haptic rendering. | |
| void | setName (const std::string &name) |
| Set the name of the shape. | |
| std::string | getName () const |
| Return the name of the shape. | |
| Shape (const Shape &trans, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
| HLint | getShapeID () const |
| Return the HL shape id of this Shape. | |
| virtual int | compare (const osg::StateAttribute &sa) const |
| virtual void | postDraw () const |
| virtual void | preDraw () const |
| virtual void | apply (osg::State &state) const |
| Apply this StateAttribute. Will actually do nothing as we explicitly will call pre/postDraw(). | |
| void | setNode (osg::Node *node) |
| osg::Node * | getNode () |
Static Public Member Functions | |
| static osg::StateAttribute::Type | getSAType () |
| Get the StateAttribute type of this Shape. | |
This class stores a shape id as a osg StateAttribute. When a drawable is rendered in the HapticRenderBin, the shape id of the current applied Shape will be used.
|
||||||||||||
|
Copy constructor using CopyOp to manage deep vs shallow copy. |
|
|
Return -1 if *this < *rhs, 0 if *this==*rhs, 1 if *this>*rhs. Reimplemented in osgHaptics::ShapeComposite. |
|
|
Return the associated node |
|
|
Make this shape id the current one. Any openGL primitive will then be drawn into the HL buffer Should be called just before any drawable is drawn (but after any modelview/projection matrix is modified). Reimplemented in osgHaptics::ShapeComposite. |
|
|
Ends the current hl shape Should be called just after any drawable is drawn. Reimplemented in osgHaptics::ShapeComposite. |
|
|
During contact, it can be handy to have a node associated to the shape. By using setNode()/getNode() a node can be set and later retrieved from a shape. |
1.4.4