Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

openvrml::vrml97_node::group_node Class Reference

Represents Group node instances. More...

Inheritance diagram for openvrml::vrml97_node::group_node:

Inheritance graph
[legend]
Collaboration diagram for openvrml::vrml97_node::group_node:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 group_node (const node_type &type, const scope_ptr &scope)
 Construct.

virtual ~group_node () throw ()
 Destroy.

virtual const openvrml::bounding_volume & bounding_volume () const
 Get the bounding volume.

virtual bool modified () const
 Determine whether the node has been modified.

virtual void render (openvrml::viewer &viewer, rendering_context context)
 Render the node.

virtual const std::vector<
node_ptr > & 
children () const throw ()
 Get the children in the scene graph.

virtual void activate (double timeStamp, bool isOver, bool isActive, double *p)
void render_nocull (openvrml::viewer &viewer, rendering_context context)

Protected Member Functions

void process_addChildren (const field_value &value, double timestamp) throw (std::bad_cast, std::bad_alloc)
 addChildren eventIn handler.

void process_removeChildren (const field_value &value, double timestamp) throw (std::bad_cast, std::bad_alloc)
 removeChildren eventIn handler.

void process_set_children (const field_value &value, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_children eventIn handler.

void recalc_bsphere ()
 Recalculate the bounding volume.


Protected Attributes

sfvec3f bboxCenter
 bboxCenter field.

sfvec3f bboxSize
 bboxSize field.

mfnode children_
 children exposedField.

viewer::object_t viewerObject
 Handle for the renderer.

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


Friends

class group_class
 Class object for Group nodes.


Detailed Description

Represents Group node instances.


Constructor & Destructor Documentation

openvrml::vrml97_node::group_node::group_node (  const node_type &  type,
const scope_ptr &  scope
) 
 

Construct.

Parameters:
type the node_type associated with the node.
scope the scope to which the node belongs.

Member Function Documentation

void openvrml::vrml97_node::group_node::activate (  double  time,
bool  isOver,
bool  isActive,
double *  p
)  [virtual]
 

Pass on to enabled touchsensor child.

Implements openvrml::grouping_node.

const bounding_volume & openvrml::vrml97_node::group_node::bounding_volume (   )  const [virtual]
 

Get the bounding volume.

Returns:
the bounding volume associated with the node.

Reimplemented from openvrml::node.

Reimplemented in openvrml::vrml97_node::anchor_node, and openvrml::vrml97_node::transform_node.

const std::vector< node_ptr > & openvrml::vrml97_node::group_node::children (   )  const throw () [virtual]
 

Get the children in the scene graph.

Returns:
the child nodes in the scene graph.

Implements openvrml::grouping_node.

bool openvrml::vrml97_node::group_node::modified (   )  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 openvrml::node.

Reimplemented in openvrml::vrml97_node::collision_node.

void openvrml::vrml97_node::group_node::process_addChildren (  const field_value &  value,
double  timestamp
)  throw (std::bad_cast, std::bad_alloc) [protected]
 

addChildren eventIn handler.

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

void openvrml::vrml97_node::group_node::process_removeChildren (  const field_value &  value,
double  timestamp
)  throw (std::bad_cast, std::bad_alloc) [protected]
 

removeChildren eventIn handler.

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

void openvrml::vrml97_node::group_node::process_set_children (  const field_value &  value,
double  timestamp
)  throw (std::bad_cast, std::bad_alloc) [protected]
 

set_children eventIn handler.

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

void openvrml::vrml97_node::group_node::render (  openvrml::viewer &  viewer,
rendering_context  context
)  [virtual]
 

Render the node.

Render each of the children.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from openvrml::node.

Reimplemented in openvrml::vrml97_node::anchor_node, openvrml::vrml97_node::billboard_node, and openvrml::vrml97_node::transform_node.

void openvrml::vrml97_node::group_node::render_nocull (  openvrml::viewer &  viewer,
rendering_context  context
) 
 

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