Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

openvrml::vrml97_node::shape_node Class Reference

Represents Shape node instances. More...

Inheritance diagram for openvrml::vrml97_node::shape_node:

Inheritance graph
[legend]
Collaboration diagram for openvrml::vrml97_node::shape_node:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 shape_node (const node_type &type, const scope_ptr &scope)
 Construct.

virtual ~shape_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 void render (openvrml::viewer &viewer, rendering_context context)
 Render the node.


Private Member Functions

void process_set_appearance (const field_value &value, double timestamp) throw (std::bad_cast, std::bad_alloc)
 set_appearance eventIn handler.

void process_set_geometry (const field_value &value, 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_t viewerObject
 A reference to the node's previously used rendering data.


Friends

class shape_class
 Class object for Shape instances.


Detailed Description

Represents Shape node instances.


Constructor & Destructor Documentation

openvrml::vrml97_node::shape_node::shape_node const node_type type,
const scope_ptr scope
 

Construct.

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

Member Function Documentation

const bounding_volume & openvrml::vrml97_node::shape_node::bounding_volume  )  const [virtual]
 

Get the bounding volume.

Returns:
the bounding volume associated with the node.

Reimplemented from openvrml::node.

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

void openvrml::vrml97_node::shape_node::process_set_appearance const field_value value,
double  timestamp
throw (std::bad_cast, std::bad_alloc) [private]
 

set_appearance eventIn handler.

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

void openvrml::vrml97_node::shape_node::process_set_geometry const field_value value,
double  timestamp
throw (std::bad_cast, std::bad_alloc) [private]
 

set_geometry eventIn handler.

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

void openvrml::vrml97_node::shape_node::render openvrml::viewer viewer,
rendering_context  context
[virtual]
 

Render the node.

Parameters:
viewer a Viewer.
context a rendering context.

Reimplemented from openvrml::node.


Member Data Documentation

viewer::object_t openvrml::vrml97_node::shape_node::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.