openvrml::vrml97_node::lod_node Class Reference

Inheritance diagram for openvrml::vrml97_node::lod_node:
[legend]
List of all members.

Detailed Description

Represents LOD node instances.


Public Member Functions

 lod_node (const node_type &type, const boost::shared_ptr< openvrml::scope > &scope)
 Construct.
virtual ~lod_node () throw ()
 Destroy.
virtual bool modified () const
 Determine whether the node has been modified.
virtual const openvrml::bounding_volumebounding_volume () const
 Get the bounding volume.
virtual const std::vector<
node_ptr > & 
children () const throw ()
 Get the children in the scene graph.
virtual void activate (double timestamp, bool over, bool active, double *p)

Private Member Functions

virtual void do_render_child (openvrml::viewer &viewer, rendering_context context)
 Render the node.
virtual void recalcBSphere ()
 Recalculate the bounding volume.

Private Attributes

exposedfield< mfnodelevel_
 level exposedField.
sfvec3f center_
 center field.
mffloat range_
 range field.
mfnode children_
 Caches the active level for fast access by lod_node::children.
bounding_sphere bsphere
 Cached copy of the bounding_sphere enclosing this node's children.

Friends

class lod_class
 Class object for LOD nodes.

Constructor & Destructor Documentation

openvrml::vrml97_node::lod_node::lod_node ( const node_type type,
const boost::shared_ptr< openvrml::scope > &  scope 
)

Construct.

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

openvrml::vrml97_node::lod_node::~lod_node (  )  throw () [virtual]

Destroy.


Member Function Documentation

bool openvrml::vrml97_node::lod_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.

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

Get the bounding volume.

Returns:
the bounding volume associated with the node.

Reimplemented from openvrml::node.

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

Get the children in the scene graph.

Returns:
the child nodes in the scene graph.

Implements openvrml::grouping_node.

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

Pass on to enabled touchsensor child.

Implements openvrml::grouping_node.

void openvrml::vrml97_node::lod_node::do_render_child ( openvrml::viewer viewer,
rendering_context  context 
) [private, virtual]

Render the node.

Render one of the children.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from openvrml::child_node.

void openvrml::vrml97_node::lod_node::recalcBSphere (  )  [private, virtual]

Recalculate the bounding volume.


Friends And Related Function Documentation

openvrml::vrml97_node::lod_node::lod_class [friend]

Class object for LOD nodes.


Member Data Documentation

level exposedField.

center field.

range field.

Caches the active level for fast access by lod_node::children.

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