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

LOD Class Reference

Represents LOD node instances. More...

Inheritance diagram for LOD:

AbstractChild AbstractBase ChildNode Node Node List of all members.

Public Methods

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

virtual ~LOD () throw ()
 Destructor.

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

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

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

virtual const BVolumegetBVolume () const
 Get the bounding volume.


Private Methods

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

virtual void recalcBSphere ()
 Recalculate the bounding volume.


Private Attributes

MFNode level
SFVec3f center
MFFloat range
BSphere bsphere
 Cached copy of the BSphere enclosing this node's children.


Friends

class LODClass

Detailed Description

Represents LOD node instances.


Constructor & Destructor Documentation

LOD const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

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

~LOD   throw () [virtual]
 

Destructor.


Member Function Documentation

const BVolume * getBVolume   const [virtual]
 

Get the bounding volume.

Returns:
the bounding volume associated with the node.

Reimplemented from Node.

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.

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

set_level eventIn handler.

Parameters:
mfnode an MFNode value.
timestamp the current time.
Exceptions:
std::bad_cast if mfnode is not an MFNode.
std::bad_alloc if memory allocation fails.

void recalcBSphere   [private, virtual]
 

Recalculate the bounding volume.

void render Viewer   viewer,
VrmlRenderContext    context
[virtual]
 

Render the node.

Render one of the children.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from Node.

void updateModified NodePath &    path,
int    flags = 0x003
[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 [private]
 

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