|
H3D API
2.4.1
|
This abstract node type indicates that concrete node types derived from it contain children nodes and is the basis for all aggregation. More...
#include <H3D/X3DGroupingNode.h>

Classes | |
| class | AddChildren |
| AddChildren is a class that adds any node added to it to the children field of its owner (X3DGroupingNode) if the node is not already in the children field. More... | |
| class | MFChild |
| MFChild sets up a routes from the Nodes that are added and removed from the field to the owner of the field. More... | |
| class | RemoveChildren |
| RemoveChildren is a class that removes any node added to it from the children field of its owner (X3DGroupingNode). More... | |
| class | SFBound |
| SFBound is specialized to update from the SFBound fields routed to it. More... | |
Public Member Functions | |
| X3DGroupingNode (Inst< AddChildren > _addChildren=0, Inst< RemoveChildren > _removeChildren=0, Inst< MFChild > _children=0, Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< SFVec3f > _bboxCenter=0, Inst< SFVec3f > _bboxSize=0) | |
| Constructor. | |
| virtual | ~X3DGroupingNode () |
| Destructor. | |
| virtual void | initialize () |
| Sets up the bound field using the bboxCenter and bboxSize fields. More... | |
| virtual void | render () |
| Render the children. | |
| virtual void | traverseSG (TraverseInfo &ti) |
| Traverse the scenegraph. traverseSG() is called in all children nodes. | |
| virtual bool | lineIntersect (const Vec3f &from, const Vec3f &to, LineIntersectResult &result) |
| Detect intersection between a line segment and a Node. More... | |
| virtual void | closestPoint (const Vec3f &p, NodeIntersectResult &result) |
| Find closest point on Node to p. More... | |
| virtual bool | movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result) |
| Detect collision between a moving sphere and the Node. More... | |
Public Member Functions inherited from H3D::X3DChildNode | |
| X3DChildNode (Inst< SFNode > _metadata=0) | |
| Constructor. | |
Public Member Functions inherited from H3D::X3DNode | |
| X3DNode (Inst< SFNode > _metadata=0) | |
| Constructor. | |
| X3DMetadataObject * | getMetadataByName (const string &_name) |
| Given a name, the first X3DMetadataObject in the metadata field that matches that name is returned. More... | |
Public Member Functions inherited from H3D::Node | |
| Node () | |
| Constructor. | |
| virtual Node * | clone (bool deepCopy=true, DeepCopyMap *deepCopyMap=NULL) |
| Returns a new instance of this node type with the same state as this one. More... | |
| virtual | ~Node () |
| Destructor. | |
| X3DPrototypeInstance * | getProtoInstanceParent () |
| If this node is the root node in the proto body of a X3DPrototypeInstance then this will return that node. More... | |
| void | setProtoInstanceParent (X3DPrototypeInstance *p) |
| Set the X3DPrototypeInstance this node is the the root node if applicaple. | |
| virtual string | defaultXMLContainerField () |
| Returns the default xml containerField attribute value. More... | |
| virtual Field * | getField (const string &_name) const |
| return a pointer to the field specified by name within this instance | |
| int | addDestructCallback (void(*func)(Node *, void *), void *args) |
| Add a callback function to be run on destruction of node. More... | |
| int | removeDestructCallback (void(*func)(Node *, void *), void *args) |
| Add a callback function to be run on destruction of node. More... | |
Public Member Functions inherited from H3D::H3DBoundedObject | |
| H3DBoundedObject (Inst< SFBound > _bound=0) | |
| Constructor. | |
Public Member Functions inherited from H3D::H3DDisplayListObject | |
| H3DDisplayListObject (Inst< DisplayList > _displayList=0) | |
| Constructor. | |
Public Attributes | |
| bool | use_union_bound |
| if true a route will be set up between the bound field of the nodes in children and the bound field of the grouping node. More... | |
| H3DUniquePtr< AddChildren > | addChildren |
| The addChildren event appends nodes to the children field of a grouping node. More... | |
| H3DUniquePtr< RemoveChildren > | removeChildren |
| The removeChildren event removes nodes from the children field of the grouping node . More... | |
| H3DUniquePtr< MFChild > | children |
| The nodes that are grouped together by this node. More... | |
Public Attributes inherited from H3D::X3DNode | |
| H3DUniquePtr< SFNode > | metadata |
| Meta data about the node. More... | |
Public Attributes inherited from H3D::X3DBoundedObject | |
| H3DUniquePtr< SFVec3f > | bboxCenter |
| Specifies a the center of an axis-aligned bounding box enclosing the node. More... | |
| H3DUniquePtr< SFVec3f > | bboxSize |
| Specifies a the size of an axis-aligned bounding box enclosing the node. More... | |
Public Attributes inherited from H3D::H3DBoundedObject | |
| H3DUniquePtr< SFBound > | bound |
| The field containing the bound object. More... | |
Public Attributes inherited from H3D::H3DDisplayListObject | |
| H3DUniquePtr< DisplayList > | displayList |
| The DisplayList instance handling the OpenGL caching of this object. | |
Static Public Attributes | |
| static H3DNodeDatabase | database |
| The H3DNodeDatabase for this node. | |
Static Public Attributes inherited from H3D::X3DNode | |
| static H3DNodeDatabase | database |
| The H3DNodeDatabase for this node. | |
Protected Attributes | |
| bool | children_multi_pass_transparency |
| Will be set in traverseSG to indicate if any of the children enables multi-pass transparency. More... | |
| vector< H3DRenderStateObject * > | render_states |
| A vector of all the H3DRenderStatesObject within this X3DGroupingNode. | |
| vector< ClipPlane * > | clip_planes |
| A vector of only ClipPlane children of this X3DGroupingNode. | |
Additional Inherited Members | |
Public Types inherited from H3D::Node | |
| typedef std::map< Node *, Node * > | DeepCopyMap |
| A map type used during a deep copy clone() to map from original nodes to cloned nodes. | |
Static Public Member Functions inherited from H3D::Node | |
| static unsigned int | nrNodesAlive () |
| Returns the nr of nodes currently alive, i.e. nodes created but not destructed. | |
| static int | nrNodesCreated () |
| Returns the number of nodes created in total since the start of the program. | |
Protected Member Functions inherited from H3D::Node | |
| void | cloneFieldValue (Field &_from, Field &_to, bool deepCopy, DeepCopyMap &deepCopyMap) |
| A helper function for the clone() method. More... | |
Static Protected Member Functions inherited from H3D::Node | |
| static Node * | getClonedInstance (Node *original, bool deepCopy, DeepCopyMap &deepCopyMap) |
| A helper function for nodes that implement clone() More... | |
This abstract node type indicates that concrete node types derived from it contain children nodes and is the basis for all aggregation.
|
virtual |
Find closest point on Node to p.
Calls closestPoint for all children
| p | The point to find the closest point to. |
| result | A struct containing various results of closest points such as which geometries the closest points where detected on. |
Reimplemented from H3D::Node.
Reimplemented in H3D::ToggleGroup, H3D::Switch, H3D::MatrixTransform, H3D::LOD, and H3D::Collision.
References children, and H3DUtil::AutoRefVector< class >::size().
Referenced by H3D::Collision::closestPoint(), H3D::Inline::closestPoint(), H3D::MatrixTransform::closestPoint(), and H3D::ToggleGroup::closestPoint().
|
inlinevirtual |
Sets up the bound field using the bboxCenter and bboxSize fields.
If bboxSize is (-1, -1, -1) the bound will be the union of all the bound objects of the Nodes in the children field. Otherwise it will be a BoxBound with center and origin determined by the bboxCenter and bboxOrigin fields.
Reimplemented from H3DUtil::RefCountedClass.
Reimplemented in H3D::FrameBufferTextureGenerator.
References H3D::BoxBound::center, H3DUtil::RefCountedClass::initialize(), and H3D::BoxBound::size.
Referenced by H3D::FrameBufferTextureGenerator::initialize().
|
virtual |
Detect intersection between a line segment and a Node.
Calls lineIntersect for all children
| from | The start of the line segment. |
| to | The end of the line segment. |
| result | Contains info about the closest intersection for every object that intersects the line. |
Reimplemented from H3D::Node.
Reimplemented in H3D::ToggleGroup, H3D::Switch, H3D::MatrixTransform, H3D::LOD, and H3D::Collision.
References H3D::H3DBoundedObject::bound, children, clip_planes, H3D::Node::LineIntersectResult::detect_pt_device, H3D::Node::NodeIntersectResult::getCurrentTransform(), H3D::Bound::lineSegmentIntersect(), H3D::Node::LineIntersectResult::popCurrentPtDevice(), H3D::Node::LineIntersectResult::pushCurrentPtDevice(), and H3DUtil::AutoRefVector< class >::size().
Referenced by H3D::Collision::lineIntersect(), H3D::Inline::lineIntersect(), H3D::MatrixTransform::lineIntersect(), and H3D::ToggleGroup::lineIntersect().
|
virtual |
Detect collision between a moving sphere and the Node.
Calls movingSphereIntersect for all children
| radius | The radius of the sphere |
| from | The start position of the sphere |
| to | The end position of the sphere. |
| result | A struct containing various results of intersections such as which geometries intersected the moving sphere. |
Reimplemented from H3D::Node.
Reimplemented in H3D::ToggleGroup, H3D::Switch, H3D::MatrixTransform, H3D::LOD, and H3D::Collision.
References H3D::H3DBoundedObject::bound, children, H3D::Bound::movingSphereIntersect(), and H3DUtil::AutoRefVector< class >::size().
Referenced by H3D::Collision::movingSphereIntersect(), H3D::Inline::movingSphereIntersect(), H3D::MatrixTransform::movingSphereIntersect(), and H3D::ToggleGroup::movingSphereIntersect().
| H3DUniquePtr< AddChildren > H3D::X3DGroupingNode::addChildren |
The addChildren event appends nodes to the children field of a grouping node.
Any nodes passed to the addChildren field that are already in the children list of the grouping node are ignored.
Access type: inputOnly
| H3DUniquePtr< MFChild > H3D::X3DGroupingNode::children |
The nodes that are grouped together by this node.
Access type: inputOutput
Referenced by H3D::LOD::closestPoint(), H3D::Switch::closestPoint(), closestPoint(), H3D::X3D::createVRMLFromStream(), H3D::X3D::createVRMLFromString(), H3D::X3D::createVRMLFromURL(), H3D::X3D::createVRMLNodeFromStream(), H3D::X3D::createVRMLNodeFromString(), H3D::X3D::createVRMLNodeFromURL(), H3D::X3D::createX3DFromStream(), H3D::FrameBufferTextureGenerator::initialize(), H3D::HAnimHumanoid::initialize(), H3D::Anchor::isAnchorInScene(), H3D::LOD::lineIntersect(), H3D::Switch::lineIntersect(), lineIntersect(), H3D::LOD::movingSphereIntersect(), H3D::Switch::movingSphereIntersect(), movingSphereIntersect(), H3D::X3DGroupingNode::AddChildren::onAdd(), H3D::X3DGroupingNode::RemoveChildren::onAdd(), H3D::FrameBufferTextureGenerator::render(), H3D::LOD::render(), H3D::Switch::render(), H3D::HAnimJoint::renderSkeleton(), H3D::Anchor::replaceScene(), H3D::Anchor::replaceSceneRoot(), H3D::HAnimJoint::traverseSG(), H3D::HapticLayeredGroup::traverseSG(), H3D::LOD::traverseSG(), H3D::Switch::traverseSG(), X3DGroupingNode(), and ~X3DGroupingNode().
|
protected |
Will be set in traverseSG to indicate if any of the children enables multi-pass transparency.
We use this flag to avoid traversing into children without transparent objects when multi-pass rendered transparent objects are to be rendered.
Referenced by H3D::FrameBufferTextureGenerator::render().
| H3DUniquePtr< RemoveChildren > H3D::X3DGroupingNode::removeChildren |
The removeChildren event removes nodes from the children field of the grouping node .
Any nodes in the removeChildren event that are not in the children list of the grouping node are ignored.
Access type: inputOnly
| bool H3D::X3DGroupingNode::use_union_bound |
if true a route will be set up between the bound field of the nodes in children and the bound field of the grouping node.
Referenced by H3D::FrameBufferTextureGenerator::initialize(), H3D::X3DGroupingNode::MFChild::onAdd(), and H3D::X3DGroupingNode::MFChild::onRemove().