Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

Group Class Reference

Represents Group node instances. More...

Inheritance diagram for Group:

AbstractChild AbstractBase ChildNode Node Node Anchor Billboard Collision Transform List of all members.

Public Methods

 Group (const NodeType &nodeType, const ScopePtr &scope)
 Constructor.

virtual ~Group () throw ()
 Destructor.

virtual Group * toGroup () const
virtual bool isModified () const
 Determine whether the node has been modified.

virtual void updateModified (NodePath &path, int flags)
 Propagate the bvolume dirty flag from children to parents.

virtual void render (Viewer &viewer, VrmlRenderContext context)
 Render the node.

virtual void accumulateTransform (Node *)
 Accumulate transforms.

void renderNoCull (Viewer &viewer, VrmlRenderContext context)
void activate (double timeStamp, bool isOver, bool isActive, double *p)
virtual NodegetParentTransform ()
const BVolumegetBVolume () const
 Get the bounding volume.


Protected Methods

void processAddChildren (const FieldValue &mfnode, double timestamp) throw (std::bad_cast, std::bad_alloc)
 addChildren eventIn handler.

void processRemoveChildren (const FieldValue &mfnode, double timestamp) throw (std::bad_cast, std::bad_alloc)
 removeChildren eventIn handler.

void processSet_children (const FieldValue &mfnode, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_children eventIn handler.

virtual void recalcBSphere ()
 Recalculate the bounding volume.


Protected Attributes

SFVec3f bboxCenter
SFVec3f bboxSize
MFNode children
SFString relative
NodeparentTransform
Viewer::Object viewerObject
BSphere bsphere

Friends

class GroupClass

Detailed Description

Represents Group node instances.


Constructor & Destructor Documentation

Group const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

Parameters:
nodeType the NodeType associated with the node.
scope the Scope to which the node belongs.

~Group   throw () [virtual]
 

Destructor.


Member Function Documentation

void accumulateTransform Node   parent [virtual]
 

Accumulate transforms.

Cache a pointer to (one of the) parent transforms for proper rendering of bindables.

Reimplemented from Node.

Reimplemented in Billboard, and Transform.

void activate double    time,
bool    isOver,
bool    isActive,
double *    p
 

Pass on to enabled touchsensor child.

const BVolume * getBVolume   const [virtual]
 

Get the bounding volume.

Returns:
the bounding volume associated with the node.

Reimplemented from Node.

Reimplemented in Anchor, and Transform.

bool isModified   const [virtual]
 

Determine whether the node has been modified.

Returns:
true if the node or one of its children has been modified, false otherwise.

Reimplemented from Node.

Reimplemented in Collision.

void processAddChildren const FieldValue   mfnode,
double    timestamp
throw (std::bad_cast, std::bad_alloc) [protected]
 

addChildren eventIn handler.

Parameters:
mfnode an MFNode containing nodes to add to this Group.
timestamp the current timestamp
Exceptions:
std::bad_cast if mfnode is not an MFNode.
std::bad_alloc if memory allocation fails.

void processRemoveChildren const FieldValue   mfnode,
double    timestamp
throw (std::bad_cast, std::bad_alloc) [protected]
 

removeChildren eventIn handler.

Parameters:
mfnode an MFNode containing nodes to remove from this Group.
timestamp the current timestamp
Exceptions:
std::bad_cast if mfnode is not an MFNode.
std::bad_alloc if memory allocation fails.

void processSet_children const FieldValue   mfnode,
double    timestamp
throw (std::bad_cast, std::bad_alloc) [protected]
 

set_children eventIn handler.

Parameters:
mfnode an MFNode containing nodes for this Group.
timestamp the current timestamp
Exceptions:
std::bad_cast if mfnode is not an MFNode.
std::bad_alloc if memory allocation fails.

void recalcBSphere   [protected, virtual]
 

Recalculate the bounding volume.

Construct a bounding sphere around this node's children. Store it in d_bsphere.

Reimplemented in Transform.

void render Viewer   viewer,
VrmlRenderContext    context
[virtual]
 

Render the node.

Render each of the children.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from Node.

Reimplemented in Anchor, Billboard, and Transform.

void renderNoCull Viewer   viewer,
VrmlRenderContext    context
 

because children will already have done the culling, we don't need to repeat it here.

void updateModified NodePath &    path,
int    flags
[virtual]
 

Propagate the bvolume dirty flag from children to parents.

Parameters:
path stack of ancestor nodes.
flags 1 indicates normal modified flag, 2 indicates the bvolume dirty flag, 3 indicates both.

Reimplemented from Node.


Member Data Documentation

BSphere bsphere [protected]
 

Cached copy of the bsphere enclosing this node's children.