Home | Download | Screen shots | Discussion | Documentation |
---|
Inheritance diagram for openvrml::node:
Public Types | |
typedef std::list< route > | routes_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_ptr & | scope () const throw () |
Get the scope to which the node belongs. | |
openvrml::scene * | scene () 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_value & | field (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_value & | eventout (const std::string &id) const throw (unsupported_interface) |
Generalized eventOut accessor. | |
void | shutdown (double timestamp) throw () |
Shut down the node. | |
virtual const script_node * | to_script () const throw () |
Cast to a const script_node. | |
virtual script_node * | to_script () throw () |
Cast to a script_node. | |
virtual const appearance_node * | to_appearance () const throw () |
Cast to a const appearance_node. | |
virtual appearance_node * | to_appearance () throw () |
Cast to an appearance_node. | |
virtual const child_node * | to_child () const throw () |
Cast to a const child_node. | |
virtual child_node * | to_child () throw () |
Cast to a child_node. | |
virtual const color_node * | to_color () const throw () |
Cast to a const color_node. | |
virtual color_node * | to_color () throw () |
Cast to a color_node. | |
virtual const coordinate_node * | to_coordinate () const throw () |
Cast to a const CoordinateNode. | |
virtual coordinate_node * | to_coordinate () throw () |
Cast to a coordinate_node. | |
virtual const font_style_node * | to_font_style () const throw () |
Cast to a const FontStyleNode. | |
virtual font_style_node * | to_font_style () throw () |
Cast to a font_style_node. | |
virtual const geometry_node * | to_geometry () const throw () |
Cast to a const geometry_node. | |
virtual geometry_node * | to_geometry () throw () |
Cast to a geometry_node. | |
virtual const grouping_node * | to_grouping () const throw () |
Cast to a const grouping_node. | |
virtual grouping_node * | to_grouping () throw () |
Cast to a grouping_node. | |
virtual const material_node * | to_material () const throw () |
Cast to a const material_node. | |
virtual material_node * | to_material () throw () |
Cast to a material_node. | |
virtual const normal_node * | to_normal () const throw () |
Cast to a const normal_node. | |
virtual normal_node * | to_normal () throw () |
Cast to a normal_node. | |
virtual const sound_source_node * | to_sound_source () const throw () |
Cast to a const sound_source_node. | |
virtual sound_source_node * | to_sound_source () throw () |
Cast to a sound_source_node. | |
virtual const texture_node * | to_texture () const throw () |
Cast to a const texture_node. | |
virtual texture_node * | to_texture () throw () |
Cast to a texture_node. | |
virtual const texture_coordinate_node * | to_texture_coordinate () const throw () |
Cast to a const texture_coordinate_node. | |
virtual texture_coordinate_node * | to_texture_coordinate () throw () |
Cast to a texture_coordinate_node. | |
virtual const texture_transform_node * | to_texture_transform () const throw () |
Cast to a const texture_transform_node. | |
virtual texture_transform_node * | to_texture_transform () throw () |
Cast to a texture_transform_node. | |
virtual const transform_node * | to_transform () const throw () |
Cast to a const transform_node. | |
virtual transform_node * | to_transform () throw () |
Cast to a transform_node. | |
virtual const viewpoint_node * | to_viewpoint () const throw () |
Cast to a const viewpoint_node. | |
virtual viewpoint_node * | to_viewpoint () throw () |
Cast to a viewpoint_node. | |
virtual vrml97_node::anchor_node * | to_anchor () const |
Cast to an anchor_node. | |
virtual vrml97_node::audio_clip_node * | to_audio_clip () const |
Cast to an audio_clip_node. | |
virtual vrml97_node::cylinder_sensor_node * | to_cylinder_sensor () const |
Cast to a cylinder_sensor_node. | |
virtual vrml97_node::abstract_light_node * | to_light () const |
Cast to an abstract_light_node. | |
virtual vrml97_node::movie_texture_node * | to_movie_texture () const |
Cast to a movie_texture_node. | |
virtual vrml97_node::navigation_info_node * | to_navigation_info () const |
Cast to a navigation_info_node. | |
virtual vrml97_node::plane_sensor_node * | to_plane_sensor () const |
Cast to a plane_sensor_node. | |
virtual vrml97_node::point_light_node * | to_point_light () const |
Cast to a point_light_node. | |
virtual vrml97_node::sphere_sensor_node * | to_sphere_sensor () const |
Cast to a sphere_sensor_node. | |
virtual vrml97_node::spot_light_node * | to_spot_light () const |
Cast to a spot_light_node. | |
virtual vrml97_node::time_sensor_node * | to_time_sensor () const |
Cast to a time_sensor_node. | |
virtual vrml97_node::touch_sensor_node * | to_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_volume & | bounding_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_t & | routes () const |
Get the routes from this node. | |
virtual void | render (openvrml::viewer &viewer, rendering_context context) |
Render this node. | |
Public Attributes | |
const node_type & | type |
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. | |
node & | operator= (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_value & | do_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_value & | do_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::scene * | scene_ |
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. |
|
map of eventOut identifiers to polled_eventout_values.
For internal use only.
|
|
Destructor. Remove node name (if any) from the scope. |
|
Construct.
|
|
Construct a copy.
For internal use only. Not implemented. node is not copyable. |
|
Add a polled eventOut value. Used internally by the PROTO implementation.
|
|
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.
|
|
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.
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. |
|
Override a node's calculated bounding volume. Not implemented.
|
|
Return true if the node's bounding volume needs to be recalculated. |
|
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. |
|
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.
|
|
Called by node::eventout.
Implemented in openvrml::script_node, and openvrml::vrml97_node::abstract_base. |
|
Called by node::field to get a field.
Implemented in openvrml::script_node, and openvrml::vrml97_node::abstract_base. |
|
Called by node::field to set a field.
Implemented in openvrml::script_node, and openvrml::vrml97_node::abstract_base. |
|
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.
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. |
|
Called by node::process_event.
Implemented in openvrml::script_node, and openvrml::vrml97_node::abstract_base. |
|
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. |
|
node subclass-specific shut down.
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. |
|
Generalized eventOut accessor.
|
|
Generalized field mutator.
|
|
Generalized field accessor.
|
|
Set the name of the node.
|
|
Retrieve the name of this node.
|
|
Initialize the node.
This method works recursively, initializing any child nodes to the same
|
|
Set the modified flag. Indicates the node needs to be revisited for rendering.
|
|
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
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. |
|
Assign.
For internal use only. Not implemented. node is not copyable. |
|
Pretty print.
|
|
Process an event.
|
|
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.
|
|
|
Get the routes from this node.
|
|
Get the scene with which the node is associated.
|
|
Get the scope to which the node belongs.
|
|
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.
|
|
Cast to an anchor_node.
Reimplemented in openvrml::vrml97_node::anchor_node. |
|
Cast to an appearance_node. Default implementation returns 0.
Reimplemented in openvrml::appearance_node. |
|
Cast to a const appearance_node. Default implementation returns 0.
Reimplemented in openvrml::appearance_node. |
|
Cast to an audio_clip_node.
Reimplemented in openvrml::vrml97_node::audio_clip_node. |
|
Cast to a child_node. Default implementation returns 0.
Reimplemented in openvrml::child_node. |
|
Cast to a const child_node. Default implementation returns 0.
Reimplemented in openvrml::child_node. |
|
Cast to a color_node. Default implementation returns 0.
Reimplemented in openvrml::color_node. |
|
Cast to a const color_node. Default implementation returns 0.
Reimplemented in openvrml::color_node. |
|
Cast to a coordinate_node. Default implementation returns 0.
Reimplemented in openvrml::coordinate_node. |
|
Cast to a const CoordinateNode. Default implementation returns 0.
Reimplemented in openvrml::coordinate_node. |
|
Cast to a cylinder_sensor_node.
Reimplemented in openvrml::vrml97_node::cylinder_sensor_node. |
|
Cast to a font_style_node. Default implementation returns 0.
Reimplemented in openvrml::font_style_node. |
|
Cast to a const FontStyleNode. Default implementation returns 0.
Reimplemented in openvrml::font_style_node. |
|
Cast to a geometry_node. Default implementation returns 0.
Reimplemented in openvrml::geometry_node. |
|
Cast to a const geometry_node. Default implementation returns 0.
Reimplemented in openvrml::geometry_node. |
|
Cast to a grouping_node. Default implementation returns 0.
Reimplemented in openvrml::grouping_node. |
|
Cast to a const grouping_node. Default implementation returns 0.
Reimplemented in openvrml::grouping_node. |
|
Cast to an abstract_light_node.
Reimplemented in openvrml::vrml97_node::abstract_light_node. |
|
Cast to a material_node. Default implementation returns 0.
Reimplemented in openvrml::material_node. |
|
Cast to a const material_node. Default implementation returns 0.
Reimplemented in openvrml::material_node. |
|
Cast to a movie_texture_node.
Reimplemented in openvrml::vrml97_node::movie_texture_node. |
|
Cast to a navigation_info_node.
Reimplemented in openvrml::vrml97_node::navigation_info_node. |
|
Cast to a normal_node. Default implementation returns 0.
Reimplemented in openvrml::normal_node. |
|
Cast to a const normal_node. Default implementation returns 0.
Reimplemented in openvrml::normal_node. |
|
Cast to a plane_sensor_node.
Reimplemented in openvrml::vrml97_node::plane_sensor_node. |
|
Cast to a point_light_node.
Reimplemented in openvrml::vrml97_node::point_light_node. |
|
Cast to a script_node. Default implementation returns 0.
Reimplemented in openvrml::script_node. |
|
Cast to a const script_node. Default implementation returns 0.
Reimplemented in openvrml::script_node. |
|
Cast to a sound_source_node. Default implementation returns 0.
Reimplemented in openvrml::sound_source_node. |
|
Cast to a const sound_source_node. Default implementation returns 0.
Reimplemented in openvrml::sound_source_node. |
|
Cast to a sphere_sensor_node.
Reimplemented in openvrml::vrml97_node::sphere_sensor_node. |
|
Cast to a spot_light_node.
Reimplemented in openvrml::vrml97_node::spot_light_node. |
|
Cast to a texture_node. Default implementation returns 0.
Reimplemented in openvrml::texture_node. |
|
Cast to a const texture_node. Default implementation returns 0.
Reimplemented in openvrml::texture_node. |
|
Cast to a texture_coordinate_node. Default implementation returns 0.
Reimplemented in openvrml::texture_coordinate_node. |
|
Cast to a const texture_coordinate_node. Default implementation returns 0.
Reimplemented in openvrml::texture_coordinate_node. |
|
Cast to a texture_transform_node. Default implementation returns 0.
Reimplemented in openvrml::texture_transform_node. |
|
Cast to a const texture_transform_node. Default implementation returns 0.
Reimplemented in openvrml::texture_transform_node. |
|
Cast to a time_sensor_node.
Reimplemented in openvrml::vrml97_node::time_sensor_node. |
|
Cast to a touch_sensor_node.
Reimplemented in openvrml::vrml97_node::touch_sensor_node. |
|
Cast to a transform_node. Default implementation returns 0.
Reimplemented in openvrml::transform_node. |
|
Cast to a const transform_node. Default implementation returns 0.
Reimplemented in openvrml::transform_node. |
|
Cast to a viewpoint_node. Default implementation returns 0.
Reimplemented in openvrml::viewpoint_node. |
|
Cast to a const viewpoint_node. Default implementation returns 0.
Reimplemented in openvrml::viewpoint_node. |
|
Stream output.
|
|
Indicate whether the node's cached bounding volume needs updating.
For internal use only.
|
|
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. |
|
Indicate whether the node has been modified.
For internal use only.
|
|
routes from the node.
For internal use only.
|
|
The scene with which the node is associated.
For internal use only.
|
|
The scope to which the node belongs.
For internal use only.
|