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

IndexedFaceSet Class Reference

Represents IndexedFaceSet node instances. More...

Inheritance diagram for IndexedFaceSet:

AbstractIndexedSet AbstractGeometry AbstractBase GeometryNode Node Node List of all members.

Public Methods

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

virtual ~IndexedFaceSet () 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 Viewer::Object insertGeometry (Viewer &viewer, VrmlRenderContext context)
 Insert this geometry into viewer's display list.

virtual const BVolumegetBVolume () const
 Get the bounding volume.


Private Methods

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

void processSet_normalIndex (const FieldValue &mfint32, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_normalIndex eventIn handler.

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

void processSet_texCoordIndex (const FieldValue &mfint32, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_texCoordIndex eventIn handler.

void recalcBSphere ()
 Recalculate the bounding volume.


Private Attributes

SFBool ccw
SFBool convex
SFFloat creaseAngle
SFNode normal
MFInt32 normalIndex
SFBool normalPerVertex
SFBool solid
SFNode texCoord
MFInt32 texCoordIndex
BSphere bsphere

Friends

class IndexedFaceSetClass

Detailed Description

Represents IndexedFaceSet node instances.


Constructor & Destructor Documentation

IndexedFaceSet const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

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

~IndexedFaceSet   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.

Viewer::Object insertGeometry Viewer   viewer,
VrmlRenderContext    context
[virtual]
 

Insert this geometry into viewer's display list.

Parameters:
viewer a Viewer.
context the rendering context.

Todo:
stripify, crease angle, generate normals ...

Implements GeometryNode.

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 AbstractIndexedSet.

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

set_normal 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_normalIndex const FieldValue   mfint32,
double    timestamp
throw (std::bad_cast, std::bad_alloc) [private]
 

set_normalIndex eventIn handler.

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

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

set_texCoord 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_texCoordIndex const FieldValue   mfint32,
double    timestamp
throw (std::bad_cast, std::bad_alloc) [private]
 

set_texCoordIndex eventIn handler.

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

void recalcBSphere   [private]
 

Recalculate the bounding volume.

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 AbstractIndexedSet.