H3D::X3DGroupingNode Class Reference
[Abstract nodes.]

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>

Inheritance diagram for H3D::X3DGroupingNode:

Inheritance graph

List of all members.

Classes

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  SFBound
 SFBound is specialized to update from the SFBound fields routed to it. More...

Public Member Functions

 X3DGroupingNode (Inst< MFChild > _addChildren=0, Inst< MFChild > _removeChildren=0, Inst< MFChild > _children=0, Inst< SFNode > _metadata=0, Inst< SFBound > _bound=0, Inst< SFVec3f > _bboxCenter=0, Inst< SFVec3f > _bboxSize=0)
 Constructor.
virtual void initialize ()
 Sets up the bound field using the bboxCenter and bboxSize fields.
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.
virtual void closestPoint (const Vec3f &p, NodeIntersectResult &result)
 Find closest point on Node to p.
virtual bool movingSphereIntersect (H3DFloat radius, const Vec3f &from, const Vec3f &to, NodeIntersectResult &result)
 Detect collision between a moving sphere and the Node.

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.
auto_ptr< MFChildaddChildren
 The addChildren event appends nodes to the children field of a grouping node.
auto_ptr< MFChildremoveChildren
 The removeChildren event removes nodes from the children field of the grouping node .
auto_ptr< MFChildchildren
 The nodes that are grouped together by this node.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

This abstract node type indicates that concrete node types derived from it contain children nodes and is the basis for all aggregation.

Internal routes:
X3DGroupingNode.dot

Member Function Documentation

void X3DGroupingNode::closestPoint ( const Vec3f &  p,
NodeIntersectResult &  result 
) [virtual]

Find closest point on Node to p.

Calls closestPoint for all children

Parameters:
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::Collision, and H3D::MatrixTransform.

References children, and H3DUtil::AutoRefVector< class >::size().

Referenced by H3D::Inline::closestPoint().

virtual void H3D::X3DGroupingNode::initialize (  )  [inline, virtual]

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.

References H3D::BoxBound::center, H3DUtil::RefCountedClass::initialize(), and H3D::BoxBound::size.

bool X3DGroupingNode::lineIntersect ( const Vec3f &  from,
const Vec3f &  to,
LineIntersectResult &  result 
) [virtual]

Detect intersection between a line segment and a Node.

Calls lineIntersect for all children

Parameters:
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.
Returns:
true if intersected, false otherwise.

Reimplemented from H3D::Node.

Reimplemented in H3D::Collision, and H3D::MatrixTransform.

References H3D::H3DBoundedObject::bound, children, H3D::Bound::lineSegmentIntersect(), and H3DUtil::AutoRefVector< class >::size().

Referenced by H3D::Inline::lineIntersect().

bool X3DGroupingNode::movingSphereIntersect ( H3DFloat  radius,
const Vec3f &  from,
const Vec3f &  to,
NodeIntersectResult &  result 
) [virtual]

Detect collision between a moving sphere and the Node.

Calls movingSphereIntersect for all children

Parameters:
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.
Returns:
true if intersected, false otherwise.

Reimplemented from H3D::Node.

Reimplemented in H3D::Collision, and H3D::MatrixTransform.

References H3D::H3DBoundedObject::bound, children, H3D::Bound::movingSphereIntersect(), and H3DUtil::AutoRefVector< class >::size().

Referenced by H3D::Inline::movingSphereIntersect().


Member Data Documentation

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

X3DGroupingNode_addChildren.dot

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

X3DGroupingNode_removeChildren.dot

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::X3DGroupingNode::MFChild::onAdd(), and H3D::X3DGroupingNode::MFChild::onRemove().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:31:26 2008 for H3D API by  doxygen 1.5.7