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

Shape Class Reference

Represents Shape node instances. More...

Inheritance diagram for Shape:

AbstractChild AbstractBase ChildNode Node Node List of all members.

Public Methods

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

virtual ~Shape () throw ()
 Destructor.

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 const BVolumegetBVolume () const
 Get the bounding volume.

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


Private Methods

void processSet_appearance (const FieldValue &sfnode, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_appearance eventIn handler.

void processSet_geometry (const FieldValue &sfnode, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_geometry eventIn handler.


Private Attributes

SFNode appearance
 appearance exposedField.

SFNode geometry
 geometry exposedField.

Viewer::Object viewerObject
 A reference to the node's previously used rendering data.


Friends

class ShapeClass
 Class object for Shape instances.


Detailed Description

Represents Shape node instances.


Constructor & Destructor Documentation

Shape const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

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

~Shape   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_appearance const FieldValue   sfnode,
double    timestamp
throw (std::bad_cast, std::bad_alloc) [private]
 

set_appearance eventIn handler.

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

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

set_geometry eventIn handler.

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

void render Viewer   viewer,
VrmlRenderContext    context
[virtual]
 

Render the node.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from Node.

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.


Friends And Related Function Documentation

ShapeClass [friend]
 

Class object for Shape instances.


Member Data Documentation

SFNode appearance [private]
 

appearance exposedField.

SFNode geometry [private]
 

geometry exposedField.

Viewer::Object viewerObject [private]
 

A reference to the node's previously used rendering data.

If supported by the Viewer implementation, this member holds a reference to the node's rendering data once the node has already been rendered once. The intent is to capitalize on USE references in the VRML scene graph.