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

Appearance Class Reference

Appearance node instances. More...

Inheritance diagram for Appearance:

AbstractBase AppearanceNode Node Node List of all members.

Public Methods

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

virtual ~Appearance () 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 SFNodegetMaterial () const throw ()
 Get the material node.

virtual const SFNodegetTexture () const throw ()
 Get the texture node.

virtual const SFNodegetTextureTransform () const throw ()
 Get the texture transform node.


Private Methods

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

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

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


Private Attributes

SFNode material
SFNode texture
SFNode textureTransform

Friends

class AppearanceClass

Detailed Description

Appearance node instances.


Constructor & Destructor Documentation

Appearance const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

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

~Appearance   throw () [virtual]
 

Destructor.


Member Function Documentation

const SFNode & getMaterial   const throw () [virtual]
 

Get the material node.

Returns:
an SFNode object containing the Material node associated with this Appearance.

Implements AppearanceNode.

const SFNode & getTexture   const throw () [virtual]
 

Get the texture node.

Returns:
an SFNode object containing the texture node associated with this Appearance.

Implements AppearanceNode.

const SFNode & getTextureTransform   const throw () [virtual]
 

Get the texture transform node.

Returns:
an SFNode object containing the TextureTransform node associated with this Appearance.

Implements AppearanceNode.

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

set_material eventIn handler.

Parameters:
sfnode an SFNode value; should be a Material node.
timestamp the current time.
Exceptions:
std::bad_cast if sfnode is not an SFNode.
std::bad_alloc if memory allocation fails.

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

set_texture eventIn handler.

Parameters:
sfnode an SFNode value; should be a Texture node.
timestamp the current time.
Exceptions:
std::bad_cast if sfnode is not an SFNode.
std::bad_alloc if memory allocation fails.

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

set_textureTransform eventIn handler.

Parameters:
sfnode an SFNode value; should be a TextureTransform node.
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 = 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.