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

openvrml::node Class Reference

A node in the scene graph. More...

Inheritance diagram for openvrml::node:

Inheritance graph
[legend]
Collaboration diagram for openvrml::node:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::list< routeroutes_t
 list of routes.


Public Member Functions

virtual ~node ()=0 throw ()
 Destructor.

const std::string & id () const throw ()
 Retrieve the name of this node.

void id (const std::string &node_id) throw (std::bad_alloc)
 Set the name of the node.

const scope_ptrscope () const throw ()
 Get the scope to which the node belongs.

openvrml::scenescene () const throw ()
 Get the scene with which the node is associated.

std::ostream & print (std::ostream &out, size_t indent) const
 Pretty print.

void add_eventout_is (const std::string &eventout_id, polled_eventout_value &eventout_value) throw (unsupported_interface, std::bad_alloc)
 Add a polled eventOut value.

void initialize (openvrml::scene &scene, double timestamp) throw (std::bad_alloc)
 Initialize the node.

void relocate () throw (std::bad_alloc)
 Called when the node is relocated to a new position in the scene graph.

const field_valuefield (const std::string &id) const throw (unsupported_interface)
 Generalized field accessor.

void field (const std::string &id, const field_value &value) throw (unsupported_interface, std::bad_cast, std::bad_alloc)
 Generalized field mutator.

void process_event (const std::string &id, const field_value &value, double timestamp) throw (unsupported_interface, std::bad_cast, std::bad_alloc)
 Process an event.

const field_valueeventout (const std::string &id) const throw (unsupported_interface)
 Generalized eventOut accessor.

void shutdown (double timestamp) throw ()
 Shut down the node.

virtual const script_nodeto_script () const throw ()
 Cast to a const script_node.

virtual script_nodeto_script () throw ()
 Cast to a script_node.

virtual const appearance_nodeto_appearance () const throw ()
 Cast to a const appearance_node.

virtual appearance_nodeto_appearance () throw ()
 Cast to an appearance_node.

virtual const child_nodeto_child () const throw ()
 Cast to a const child_node.

virtual child_nodeto_child () throw ()
 Cast to a child_node.

virtual const color_nodeto_color () const throw ()
 Cast to a const color_node.

virtual color_nodeto_color () throw ()
 Cast to a color_node.

virtual const coordinate_nodeto_coordinate () const throw ()
 Cast to a const CoordinateNode.

virtual coordinate_nodeto_coordinate () throw ()
 Cast to a coordinate_node.

virtual const font_style_nodeto_font_style () const throw ()
 Cast to a const FontStyleNode.

virtual font_style_nodeto_font_style () throw ()
 Cast to a font_style_node.

virtual const geometry_nodeto_geometry () const throw ()
 Cast to a const geometry_node.

virtual geometry_nodeto_geometry () throw ()
 Cast to a geometry_node.

virtual const grouping_nodeto_grouping () const throw ()
 Cast to a const grouping_node.

virtual grouping_nodeto_grouping () throw ()
 Cast to a grouping_node.

virtual const material_nodeto_material () const throw ()
 Cast to a const material_node.

virtual material_nodeto_material () throw ()
 Cast to a material_node.

virtual const normal_nodeto_normal () const throw ()
 Cast to a const normal_node.

virtual normal_nodeto_normal () throw ()
 Cast to a normal_node.

virtual const sound_source_nodeto_sound_source () const throw ()
 Cast to a const sound_source_node.

virtual sound_source_nodeto_sound_source () throw ()
 Cast to a sound_source_node.

virtual const texture_nodeto_texture () const throw ()
 Cast to a const texture_node.

virtual texture_nodeto_texture () throw ()
 Cast to a texture_node.

virtual const texture_coordinate_nodeto_texture_coordinate () const throw ()
 Cast to a const texture_coordinate_node.

virtual texture_coordinate_nodeto_texture_coordinate () throw ()
 Cast to a texture_coordinate_node.

virtual const texture_transform_nodeto_texture_transform () const throw ()
 Cast to a const texture_transform_node.

virtual texture_transform_nodeto_texture_transform () throw ()
 Cast to a texture_transform_node.

virtual const transform_nodeto_transform () const throw ()
 Cast to a const transform_node.

virtual transform_nodeto_transform () throw ()
 Cast to a transform_node.

virtual const viewpoint_nodeto_viewpoint () const throw ()
 Cast to a const viewpoint_node.

virtual viewpoint_nodeto_viewpoint () throw ()
 Cast to a viewpoint_node.

virtual vrml97_node::anchor_nodeto_anchor () const
 Cast to an anchor_node.

virtual vrml97_node::audio_clip_nodeto_audio_clip () const
 Cast to an audio_clip_node.

virtual vrml97_node::cylinder_sensor_nodeto_cylinder_sensor () const
 Cast to a cylinder_sensor_node.

virtual vrml97_node::abstract_light_nodeto_light () const
 Cast to an abstract_light_node.

virtual vrml97_node::movie_texture_nodeto_movie_texture () const
 Cast to a movie_texture_node.

virtual vrml97_node::navigation_info_nodeto_navigation_info () const
 Cast to a navigation_info_node.

virtual vrml97_node::plane_sensor_nodeto_plane_sensor () const
 Cast to a plane_sensor_node.

virtual vrml97_node::point_light_nodeto_point_light () const
 Cast to a point_light_node.

virtual vrml97_node::sphere_sensor_nodeto_sphere_sensor () const
 Cast to a sphere_sensor_node.

virtual vrml97_node::spot_light_nodeto_spot_light () const
 Cast to a spot_light_node.

virtual vrml97_node::time_sensor_nodeto_time_sensor () const
 Cast to a time_sensor_node.

virtual vrml97_node::touch_sensor_nodeto_touch_sensor () const
 Cast to a touch_sensor_node.

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

void modified (bool value)
 Set the modified flag.

virtual void bounding_volume (const openvrml::bounding_volume &v)
virtual const openvrml::bounding_volumebounding_volume () const
 Get this node's bounding volume.

virtual void bounding_volume_dirty (bool f)
virtual bool bounding_volume_dirty () const
void add_route (const std::string &from_eventout, const node_ptr &to_node, const std::string &to_eventin) throw (unsupported_interface, field_value_type_mismatch)
 Add a route from an eventOut of this node to an eventIn of another node.

void delete_route (const std::string &from_eventout, const node_ptr &to_node, const std::string &to_eventin) throw ()
 Remove a route from an eventOut of this node to an eventIn of another node.

const routes_troutes () const
 Get the routes from this node.

virtual void render (openvrml::viewer &viewer, rendering_context context)
 Render this node.


Public Attributes

const node_typetype
 The type information object for the node.


Protected Member Functions

 node (const node_type &type, const scope_ptr &scope) throw ()
 Construct.

void emit_event (const std::string &id, const field_value &value, double timestamp) throw (std::bad_cast, std::bad_alloc)
 Send an event from this node.


Private Types

typedef std::map< std::string,
polled_eventout_value * > 
eventout_is_map_t
 map of eventOut identifiers to polled_eventout_values.


Private Member Functions

 node (const node &)
 Construct a copy.

nodeoperator= (const node &)
 Assign.

virtual void do_initialize (double timestamp) throw (std::bad_alloc)
 node subclass-specific initialization.

virtual void do_relocate () throw (std::bad_alloc)
 node subclass-specific relocation update.

virtual void do_field (const std::string &id, const field_value &value)=0 throw (unsupported_interface, std::bad_cast, std::bad_alloc)
 Called by node::field to set a field.

virtual const field_valuedo_field (const std::string &id) const=0 throw (unsupported_interface)
 Called by node::field to get a field.

virtual void do_process_event (const std::string &id, const field_value &value, double timestamp)=0 throw (unsupported_interface, std::bad_cast, std::bad_alloc)
 Called by node::process_event.

virtual const field_valuedo_eventout (const std::string &id) const=0 throw (unsupported_interface)
 Called by node::eventout.

virtual void do_shutdown (double timestamp) throw ()
 node subclass-specific shut down.


Private Attributes

scope_ptr scope_
 The scope to which the node belongs.

openvrml::scenescene_
 The scene with which the node is associated.

bool modified_
 Indicate whether the node has been modified.

bool bounding_volume_dirty_
 Indicate whether the node's cached bounding volume needs updating.

routes_t routes_
 routes from the node.

eventout_is_map_t eventout_is_map
 map of eventOut identifiers to polled_eventout_values.


Friends

std::ostream & operator<< (std::ostream &out, const node &n)
 Stream output.


Detailed Description

A node in the scene graph.


Member Typedef Documentation

openvrml::node::eventout_is_map_t [private]
 

map of eventOut identifiers to polled_eventout_values.

For internal use only.


Constructor & Destructor Documentation

openvrml::node::~node  )  throw () [pure virtual]
 

Destructor.

Remove node name (if any) from the scope.

openvrml::node::node const node_type type,
const scope_ptr scope
throw () [protected]
 

Construct.

Parameters:
type the node_type associated with the instance.
scope the Scope associated with the instance.

openvrml::node::node const node  )  [private]
 

Construct a copy.

For internal use only.

Not implemented. node is not copyable.


Member Function Documentation

void openvrml::node::add_eventout_is const std::string &  eventout_id,
polled_eventout_value eventout_value
throw (unsupported_interface, std::bad_alloc)
 

Add a polled eventOut value.

Used internally by the PROTO implementation.

Parameters:
eventout_id eventOut name.
eventout_value a polled_eventout_value.
Exceptions:
unsupported_interface if the node has no eventOut eventout_id.
std::bad_alloc if memory allocation fails.

void openvrml::node::add_route const std::string &  from_eventout,
const node_ptr to_node,
const std::string &  to_eventin
throw (unsupported_interface, field_value_type_mismatch)
 

Add a route from an eventOut of this node to an eventIn of another node.

If the route being added already exists, this method has no effect.

Parameters:
from_eventout an eventOut of the node.
to_node a node.
to_eventin an eventIn of to_node.
Exceptions:
unsupported_interface if the node has no eventOut from_eventout; or if to_node has no eventIn to_eventin.
field_value_type_mismatch if from_eventout and to_eventin have different field value types.
Precondition:
to_node is not null.

const bounding_volume & openvrml::node::bounding_volume  )  const [virtual]
 

Get this node's bounding volume.

Nodes that have no bounding volume, or have a difficult to calculate bvolume (like, say, Extrusion or Billboard) can just return an infinite bsphere. Note that returning an infinite bvolume means that all the node's ancestors will also end up with an infinite bvolume, and will never be culled.

Returns:
a maximized bounding volume.

Reimplemented in openvrml::vrml97_node::group_node, openvrml::vrml97_node::anchor_node, openvrml::vrml97_node::box_node, openvrml::vrml97_node::indexed_face_set_node, openvrml::vrml97_node::lod_node, openvrml::vrml97_node::point_set_node, openvrml::vrml97_node::shape_node, openvrml::vrml97_node::sphere_node, openvrml::vrml97_node::switch_node, and openvrml::vrml97_node::transform_node.

void openvrml::node::bounding_volume const openvrml::bounding_volume v  )  [virtual]
 

Override a node's calculated bounding volume. Not implemented.

Todo:
Implement me!

bool openvrml::node::bounding_volume_dirty  )  const [virtual]
 

Return true if the node's bounding volume needs to be recalculated.

void openvrml::node::bounding_volume_dirty bool  f  )  [virtual]
 

Indicate that a node's bounding volume needs to be recalculated (or not). If a node's bvolume is invalid, then the bvolumes of all that node's ancestors are also invalid. Normally, the node itself will determine when its bvolume needs updating.

void openvrml::node::delete_route const std::string &  from_eventout,
const node_ptr to_node,
const std::string &  to_eventin
throw ()
 

Remove a route from an eventOut of this node to an eventIn of another node.

If no such route exists, this method has no effect.

Parameters:
from_eventout an eventOut of the node.
to_node a node.
to_eventin an eventIn of to_node.

const field_value & openvrml::node::do_eventout const std::string &  id  )  const throw (unsupported_interface) [private, pure virtual]
 

Called by node::eventout.

Parameters:
id eventOut identifier.
Returns:
the last value sent from the eventOut.
Exceptions:
unsupported_interface if the node has no eventOut id.

Implemented in openvrml::script_node, and openvrml::vrml97_node::abstract_base.

const field_value & openvrml::node::do_field const std::string &  id  )  const throw (unsupported_interface) [private, pure virtual]
 

Called by node::field to get a field.

Parameters:
id field identifier.
Returns:
the field value.
Exceptions:
unsupported_interface if the node has no field id.

Implemented in openvrml::script_node, and openvrml::vrml97_node::abstract_base.

void openvrml::node::do_field const std::string &  id,
const field_value value
throw (unsupported_interface, std::bad_cast, std::bad_alloc) [private, pure virtual]
 

Called by node::field to set a field.

Parameters:
id field identifier.
value value.
Exceptions:
unsupported_interface if the node has no field id.
std::bad_cast if value is not the correct type.
std::bad_alloc if memory allocation fails.

Implemented in openvrml::script_node, and openvrml::vrml97_node::abstract_base.

void openvrml::node::do_initialize double  timestamp  )  throw (std::bad_alloc) [private, virtual]
 

node subclass-specific initialization.

This method is called by node::initialize. Subclasses of node should override this method for any subclass-specific initialization.

The default implementation of this method does nothing.

Parameters:
timestamp the current time.
Exceptions:
std::bad_alloc if memory allocation fails.

Reimplemented in openvrml::script_node, openvrml::vrml97_node::audio_clip_node, openvrml::vrml97_node::background_node, openvrml::vrml97_node::fog_node, openvrml::vrml97_node::movie_texture_node, openvrml::vrml97_node::navigation_info_node, openvrml::vrml97_node::point_light_node, openvrml::vrml97_node::spot_light_node, openvrml::vrml97_node::text_node, openvrml::vrml97_node::time_sensor_node, and openvrml::vrml97_node::viewpoint_node.

void openvrml::node::do_process_event const std::string &  id,
const field_value value,
double  timestamp
throw (unsupported_interface, std::bad_cast, std::bad_alloc) [private, pure virtual]
 

Called by node::process_event.

Parameters:
id eventIn identifier.
value event value.
timestamp the current time.
Exceptions:
unsupported_interface if the node has no eventIn id.
std::bad_cast if value is not the correct time.
std::bad_alloc if memory allocation fails.

Implemented in openvrml::script_node, and openvrml::vrml97_node::abstract_base.

void openvrml::node::do_relocate  )  throw (std::bad_alloc) [private, virtual]
 

node subclass-specific relocation update.

This method is called by node::relocate. Subclasses of node should override this method for any subclass-specific updates that need to be performed following relocation of a node to a new position in the scene graph (for example, updating a NodePath).

The default implementation of this method does nothing.

Reimplemented in openvrml::vrml97_node::viewpoint_node.

void openvrml::node::do_shutdown double  timestamp  )  throw () [private, virtual]
 

node subclass-specific shut down.

Parameters:
timestamp the current time.

Reimplemented in openvrml::script_node, openvrml::vrml97_node::audio_clip_node, openvrml::vrml97_node::background_node, openvrml::vrml97_node::fog_node, openvrml::vrml97_node::movie_texture_node, openvrml::vrml97_node::navigation_info_node, openvrml::vrml97_node::point_light_node, openvrml::vrml97_node::spot_light_node, openvrml::vrml97_node::text_node, openvrml::vrml97_node::time_sensor_node, and openvrml::vrml97_node::viewpoint_node.

const field_value & openvrml::node::eventout const std::string &  id  )  const throw (unsupported_interface)
 

Generalized eventOut accessor.

Parameters:
id the name of the eventOut.
Exceptions:
unsupported_interface if the node has no eventOut named id.

void openvrml::node::field const std::string &  id,
const field_value value
throw (unsupported_interface, std::bad_cast, std::bad_alloc)
 

Generalized field mutator.

Parameters:
id the name of the field.
value the new value.
Exceptions:
unsupported_interface if the node has no field named id.
std::bad_cast if value is not the correct type.
std::bad_alloc if memory allocation fails.
Precondition:
value must be the appropriate type for the interface.

const field_value & openvrml::node::field const std::string &  id  )  const throw (unsupported_interface)
 

Generalized field accessor.

Parameters:
id the name of the field.
Returns:
the field value.
Exceptions:
unsupported_interface if the node has no field named id.

void openvrml::node::id const std::string &  node_id  )  throw (std::bad_alloc)
 

Set the name of the node.

Parameters:
node_id the name for the node.
Exceptions:
std::bad_alloc if memory allocation fails.

const std::string & openvrml::node::id  )  const throw ()
 

Retrieve the name of this node.

Returns:
the node name.

void openvrml::node::initialize openvrml::scene scene,
double  timestamp
throw (std::bad_alloc)
 

Initialize the node.

This method works recursively, initializing any child nodes to the same scene and timestamp. If the node has already been initialized, this method has no effect.

Parameters:
scene the Scene to which the node will belong.
timestamp the current time.
Exceptions:
std::bad_alloc if memory allocation fails.
Postcondition:
scene points to scene.

void openvrml::node::modified bool  value  ) 
 

Set the modified flag.

Indicates the node needs to be revisited for rendering.

Parameters:
value 

bool openvrml::node::modified  )  const [virtual]
 

Determine whether the node has been modified.

The default implementation returns whether this node has been modified. Subclasses that can have child nodes should override this method and return true if any of their children have been modified.

Returns:
true if the node has been modified; false otherwise.

Reimplemented in openvrml::vrml97_node::abstract_indexed_set_node, openvrml::vrml97_node::group_node, openvrml::vrml97_node::appearance_node, openvrml::vrml97_node::collision_node, openvrml::vrml97_node::elevation_grid_node, openvrml::vrml97_node::indexed_face_set_node, openvrml::vrml97_node::lod_node, openvrml::vrml97_node::point_set_node, openvrml::vrml97_node::shape_node, openvrml::vrml97_node::switch_node, and openvrml::vrml97_node::text_node.

node & openvrml::node::operator= const node  )  [private]
 

Assign.

For internal use only.

Not implemented. node is not copyable.

std::ostream & openvrml::node::print std::ostream &  out,
size_t  indent
const
 

Pretty print.

Parameters:
out output stream.
indent number of spaces per indentation level.
Returns:
out.

void openvrml::node::process_event const std::string &  id,
const field_value value,
double  timestamp
throw (unsupported_interface, std::bad_cast, std::bad_alloc)
 

Process an event.

Parameters:
id the name of the eventIn to which the event is being sent.
value the new value.
timestamp the current time.
Exceptions:
unsupported_interface if the node has no eventIn named id.
std::bad_cast if value is not the correct type.
std::bad_alloc if memory allocation fails.

void openvrml::node::relocate  )  throw (std::bad_alloc)
 

Called when the node is relocated to a new position in the scene graph.

This function delegates to the virtual function do_relocate. relocate should be called by eventIn handlers that receive nodes.

Exceptions:
std::bad_alloc if memory allocation fails.

void openvrml::node::render openvrml::viewer viewer,
rendering_context  context
[virtual]
 

Render this node.

Actually, most of the rendering work is delegated to the viewer, but this method is responsible for traversal to the node's renderable children, including culling. Each node class needs to implement this routine appropriately. It's not abstract since it doesn't make sense to call render on some nodes. Alternative would be to break render out into a seperate mixins class, but that's probably overkill.

Parameters:
viewer viewer implementation responsible for actually doing the drawing.
context generic context argument; holds things like the accumulated modelview transform.

Reimplemented in openvrml::vrml97_node::abstract_geometry_node, openvrml::vrml97_node::group_node, openvrml::vrml97_node::anchor_node, openvrml::vrml97_node::appearance_node, openvrml::vrml97_node::billboard_node, openvrml::vrml97_node::cylinder_sensor_node, openvrml::vrml97_node::directional_light_node, openvrml::vrml97_node::image_texture_node, openvrml::vrml97_node::inline_node, openvrml::vrml97_node::lod_node, openvrml::vrml97_node::movie_texture_node, openvrml::vrml97_node::pixel_texture_node, openvrml::vrml97_node::plane_sensor_node, openvrml::vrml97_node::proximity_sensor_node, openvrml::vrml97_node::shape_node, openvrml::vrml97_node::sound_node, openvrml::vrml97_node::sphere_sensor_node, openvrml::vrml97_node::switch_node, openvrml::vrml97_node::texture_transform_node, openvrml::vrml97_node::transform_node, and openvrml::vrml97_node::visibility_sensor_node.

const node::routes_t & openvrml::node::routes  )  const
 

Get the routes from this node.

Returns:
an std::vector of Routes from this node.

openvrml::scene * openvrml::node::scene  )  const throw () [inline]
 

Get the scene with which the node is associated.

Returns:
the scene with which the node is associated.

const scope_ptr & openvrml::node::scope  )  const throw () [inline]
 

Get the scope to which the node belongs.

Returns:
the scope to which the node belongs.

void openvrml::node::shutdown double  timestamp  )  throw ()
 

Shut down the node.

This method works recursively, shutting down any child nodes. If the node has already been shut down, this method has no effect.

Parameters:
timestamp the current time.
Postcondition:
scene is 0.

vrml97_node::anchor_node * openvrml::node::to_anchor  )  const [virtual]
 

Cast to an anchor_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::anchor_node.

appearance_node * openvrml::node::to_appearance  )  throw () [virtual]
 

Cast to an appearance_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::appearance_node.

const appearance_node * openvrml::node::to_appearance  )  const throw () [virtual]
 

Cast to a const appearance_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::appearance_node.

vrml97_node::audio_clip_node * openvrml::node::to_audio_clip  )  const [virtual]
 

Cast to an audio_clip_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::audio_clip_node.

child_node * openvrml::node::to_child  )  throw () [virtual]
 

Cast to a child_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::child_node.

const child_node * openvrml::node::to_child  )  const throw () [virtual]
 

Cast to a const child_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::child_node.

color_node * openvrml::node::to_color  )  throw () [virtual]
 

Cast to a color_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::color_node.

const color_node * openvrml::node::to_color  )  const throw () [virtual]
 

Cast to a const color_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::color_node.

coordinate_node * openvrml::node::to_coordinate  )  throw () [virtual]
 

Cast to a coordinate_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::coordinate_node.

const coordinate_node * openvrml::node::to_coordinate  )  const throw () [virtual]
 

Cast to a const CoordinateNode.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::coordinate_node.

vrml97_node::cylinder_sensor_node * openvrml::node::to_cylinder_sensor  )  const [virtual]
 

Cast to a cylinder_sensor_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::cylinder_sensor_node.

font_style_node * openvrml::node::to_font_style  )  throw () [virtual]
 

Cast to a font_style_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::font_style_node.

const font_style_node * openvrml::node::to_font_style  )  const throw () [virtual]
 

Cast to a const FontStyleNode.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::font_style_node.

geometry_node * openvrml::node::to_geometry  )  throw () [virtual]
 

Cast to a geometry_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::geometry_node.

const geometry_node * openvrml::node::to_geometry  )  const throw () [virtual]
 

Cast to a const geometry_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::geometry_node.

grouping_node * openvrml::node::to_grouping  )  throw () [virtual]
 

Cast to a grouping_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::grouping_node.

const grouping_node * openvrml::node::to_grouping  )  const throw () [virtual]
 

Cast to a const grouping_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::grouping_node.

vrml97_node::abstract_light_node * openvrml::node::to_light  )  const [virtual]
 

Cast to an abstract_light_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::abstract_light_node.

material_node * openvrml::node::to_material  )  throw () [virtual]
 

Cast to a material_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::material_node.

const material_node * openvrml::node::to_material  )  const throw () [virtual]
 

Cast to a const material_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::material_node.

vrml97_node::movie_texture_node * openvrml::node::to_movie_texture  )  const [virtual]
 

Cast to a movie_texture_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::movie_texture_node.

vrml97_node::navigation_info_node * openvrml::node::to_navigation_info  )  const [virtual]
 

Cast to a navigation_info_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::navigation_info_node.

normal_node * openvrml::node::to_normal  )  throw () [virtual]
 

Cast to a normal_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::normal_node.

const normal_node * openvrml::node::to_normal  )  const throw () [virtual]
 

Cast to a const normal_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::normal_node.

vrml97_node::plane_sensor_node * openvrml::node::to_plane_sensor  )  const [virtual]
 

Cast to a plane_sensor_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::plane_sensor_node.

vrml97_node::point_light_node * openvrml::node::to_point_light  )  const [virtual]
 

Cast to a point_light_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::point_light_node.

script_node * openvrml::node::to_script  )  throw () [virtual]
 

Cast to a script_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::script_node.

const script_node * openvrml::node::to_script  )  const throw () [virtual]
 

Cast to a const script_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::script_node.

sound_source_node * openvrml::node::to_sound_source  )  throw () [virtual]
 

Cast to a sound_source_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::sound_source_node.

const sound_source_node * openvrml::node::to_sound_source  )  const throw () [virtual]
 

Cast to a const sound_source_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::sound_source_node.

vrml97_node::sphere_sensor_node * openvrml::node::to_sphere_sensor  )  const [virtual]
 

Cast to a sphere_sensor_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::sphere_sensor_node.

vrml97_node::spot_light_node * openvrml::node::to_spot_light  )  const [virtual]
 

Cast to a spot_light_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::spot_light_node.

texture_node * openvrml::node::to_texture  )  throw () [virtual]
 

Cast to a texture_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::texture_node.

const texture_node * openvrml::node::to_texture  )  const throw () [virtual]
 

Cast to a const texture_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::texture_node.

texture_coordinate_node * openvrml::node::to_texture_coordinate  )  throw () [virtual]
 

Cast to a texture_coordinate_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::texture_coordinate_node.

const texture_coordinate_node * openvrml::node::to_texture_coordinate  )  const throw () [virtual]
 

Cast to a const texture_coordinate_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::texture_coordinate_node.

texture_transform_node * openvrml::node::to_texture_transform  )  throw () [virtual]
 

Cast to a texture_transform_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::texture_transform_node.

const texture_transform_node * openvrml::node::to_texture_transform  )  const throw () [virtual]
 

Cast to a const texture_transform_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::texture_transform_node.

vrml97_node::time_sensor_node * openvrml::node::to_time_sensor  )  const [virtual]
 

Cast to a time_sensor_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::time_sensor_node.

vrml97_node::touch_sensor_node * openvrml::node::to_touch_sensor  )  const [virtual]
 

Cast to a touch_sensor_node.

Returns:
0.

Reimplemented in openvrml::vrml97_node::touch_sensor_node.

transform_node * openvrml::node::to_transform  )  throw () [virtual]
 

Cast to a transform_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::transform_node.

const transform_node * openvrml::node::to_transform  )  const throw () [virtual]
 

Cast to a const transform_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::transform_node.

viewpoint_node * openvrml::node::to_viewpoint  )  throw () [virtual]
 

Cast to a viewpoint_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::viewpoint_node.

const viewpoint_node * openvrml::node::to_viewpoint  )  const throw () [virtual]
 

Cast to a const viewpoint_node.

Default implementation returns 0.

Returns:
0

Reimplemented in openvrml::viewpoint_node.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  out,
const node n
[friend]
 

Stream output.

Parameters:
out output stream.
n a node.
Returns:
out.

Member Data Documentation

bool openvrml::node::bounding_volume_dirty_ [private]
 

Indicate whether the node's cached bounding volume needs updating.

For internal use only.

See also:
node::bounding_volume_dirty

node::eventout_is_map_t openvrml::node::eventout_is_map [private]
 

map of eventOut identifiers to polled_eventout_values.

For internal use only.

This is an ugly artifact of the PROTO implementation. When an eventOut of a node in a PROTO definition is IS'd to an eventOut in the PROTO definition, an entry is added to this map. When emitting an event, the node checks to see if any entries in the map need updating, thereby propagating the event out of the PROTO instance.

bool openvrml::node::modified_ [private]
 

Indicate whether the node has been modified.

For internal use only.

See also:
node::modified

node::routes_t openvrml::node::routes_ [private]
 

routes from the node.

For internal use only.

scene * openvrml::node::scene_ [private]
 

The scene with which the node is associated.

For internal use only.

scope_ptr openvrml::node::scope_ [private]
 

The scope to which the node belongs.

For internal use only.