![]() |
AGX Dynamics 2.40.0.0
|
A node that can be associated with a collision geometry so that the transformation of this node is updated from the transformation of the Geometry. More...
#include <GeometryNode.h>
Public Types | |
enum | RenderFlag { RENDER_DATA =0x1 , GEOMETRY_DATA =0x2 } |
Public Member Functions | |
GeometryNode () | |
Default constructor. | |
GeometryNode (agxCollide::Geometry *geometry) | |
Constructor that associates this node's transformation with the transformation of the specified geometry. | |
GeometryNode (const GeometryNode &node, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
virtual const char * | className () const |
virtual osg::Object * | clone (const osg::CopyOp ©op) const |
virtual osg::Object * | cloneType () const |
bool | getAutoRemove () const |
agxCollide::Geometry * | getGeometry () |
Get the associated geometry. | |
osg::Node * | getRenderChild (RenderFlag flag) |
const osg::Node * | getRenderChild (RenderFlag flag) const |
RenderFlag | getSelectedRenderChild () const |
virtual bool | isSameKindAs (const osg::Object *obj) const |
virtual const char * | libraryName () const |
void | removeFromParents () |
void | removeNode (agxCollide::Space *space, agxCollide::Geometry *geometry) |
void | selectRenderChild (RenderFlag flag) |
void | setAutoRemove (bool flag) |
Specify whether this node should be removed when the destructor of the associated geometry is called. | |
void | setGeometry (agxCollide::Geometry *geometry) |
Associate this node's transformation with the transformation of the specified geometry. | |
void | setRenderChild (RenderFlag flag, osg::Node *node) |
Set a child to this node so it can be toggled with the setRenderFlag. | |
virtual void | traverse (osg::NodeVisitor &nv) |
void | updateTransform () |
Read the transform from the geometry and update the visual transform node. | |
Public Attributes | |
agxCollide::Geometry::ShapeChangeEvent::CallbackType | shapeCallback |
Protected Member Functions | |
virtual | ~GeometryNode () |
Protected Attributes | |
bool | m_autoRemove |
agx::observer_ptr< agxCollide::Geometry > | m_geometry |
osg::ref_ptr< osg::Group > | m_geometryParent |
osg::ref_ptr< osg::Group > | m_renderParent |
A node that can be associated with a collision geometry so that the transformation of this node is updated from the transformation of the Geometry.
If setAutoRemove() is set to true, this node will be removed from the scenegraph whenever the associated Geometry is deallocated.
Definition at line 41 of file GeometryNode.h.
Enumerator | |
---|---|
RENDER_DATA | Specify the RenderData data of a GeometryNode. |
GEOMETRY_DATA | Specify the renderable data generated directly from the AGX shapes. |
Definition at line 45 of file GeometryNode.h.
agxOSG::GeometryNode::GeometryNode | ( | ) |
Default constructor.
agxOSG::GeometryNode::GeometryNode | ( | agxCollide::Geometry * | geometry | ) |
Constructor that associates this node's transformation with the transformation of the specified geometry.
agxOSG::GeometryNode::GeometryNode | ( | const GeometryNode & | node, |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
) |
Copy constructor using CopyOp to manage deep vs shallow copy.
|
protectedvirtual |
|
inlinevirtual |
Definition at line 86 of file GeometryNode.h.
|
inlinevirtual |
Definition at line 84 of file GeometryNode.h.
|
inlinevirtual |
Definition at line 83 of file GeometryNode.h.
|
inline |
Definition at line 75 of file GeometryNode.h.
agxCollide::Geometry * agxOSG::GeometryNode::getGeometry | ( | ) |
Get the associated geometry.
osg::Node * agxOSG::GeometryNode::getRenderChild | ( | RenderFlag | flag | ) |
flag | - Specifies which child that should be returned- |
const osg::Node * agxOSG::GeometryNode::getRenderChild | ( | RenderFlag | flag | ) | const |
flag | - Specifies which child that should be returned- |
RenderFlag agxOSG::GeometryNode::getSelectedRenderChild | ( | ) | const |
|
inlinevirtual |
Definition at line 85 of file GeometryNode.h.
|
inlinevirtual |
Definition at line 87 of file GeometryNode.h.
void agxOSG::GeometryNode::removeFromParents | ( | ) |
void agxOSG::GeometryNode::removeNode | ( | agxCollide::Space * | space, |
agxCollide::Geometry * | geometry | ||
) |
void agxOSG::GeometryNode::selectRenderChild | ( | RenderFlag | flag | ) |
|
inline |
Specify whether this node should be removed when the destructor of the associated geometry is called.
Definition at line 81 of file GeometryNode.h.
void agxOSG::GeometryNode::setGeometry | ( | agxCollide::Geometry * | geometry | ) |
Associate this node's transformation with the transformation of the specified geometry.
void agxOSG::GeometryNode::setRenderChild | ( | RenderFlag | flag, |
osg::Node * | node | ||
) |
Set a child to this node so it can be toggled with the setRenderFlag.
flag | - Specifies which kind of render data this is: RENDER_DATA (as stored in Geometry as RenderData) or RENDER_GEOMETRY (parsed from the AGX Shape). |
node | - The node to add |
|
virtual |
void agxOSG::GeometryNode::updateTransform | ( | ) |
Read the transform from the geometry and update the visual transform node.
|
protected |
Definition at line 131 of file GeometryNode.h.
|
protected |
Definition at line 133 of file GeometryNode.h.
|
protected |
Definition at line 137 of file GeometryNode.h.
|
protected |
Definition at line 138 of file GeometryNode.h.
agxCollide::Geometry::ShapeChangeEvent::CallbackType agxOSG::GeometryNode::shapeCallback |
Definition at line 127 of file GeometryNode.h.