Home | Download | Screen shots | Discussion | Documentation |
---|
#include <openvrml/node.h>
node
in the scene graph. openvrml::node::~node | ( | ) | throw () [pure virtual] |
openvrml::node::node | ( | const node_type & | type, | |
const boost::shared_ptr< openvrml::scope > & | scope | |||
) | throw () [protected] |
void openvrml::node::add_ref | ( | ) | const throw () [inline] |
Increment the reference count.
Add an owning reference.
void openvrml::node::remove_ref | ( | ) | const throw () [inline] |
Decrement the reference count.
Remove an owning reference; but do not destroy the instance if the reference count drops to zero. This function should be used with caution. It is really only appropriate when the caller is aware that the reference count may drop to zero but destroying the instance in that case would be inappropriate. In most cases it is appropriate to use release
.
void openvrml::node::release | ( | ) | const throw () [inline] |
Decrement the reference count; destroy the instance if the count drops to zero.
size_t openvrml::node::use_count | ( | ) | const throw () |
The number of owning references to the instance.
const openvrml::node_type & openvrml::node::type | ( | ) | const throw () |
The type information object for the node
.
node
. Reimplemented in openvrml::navigation_info_node.
const std::string & openvrml::node::id | ( | ) | const throw () |
void openvrml::node::id | ( | const std::string & | node_id | ) | throw ( std::bad_alloc ) |
const scope & openvrml::node::scope | ( | ) | const throw () [inline] |
openvrml::scene * openvrml::node::scene | ( | ) | const throw () |
std::ostream & openvrml::node::print | ( | std::ostream & | out, | |
size_t | indent | |||
) | const |
Pretty print.
[in,out] | out | output stream. |
[in] | indent | number of spaces per indentation level. |
out
. 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.
[in,out] | scene | the scene to which the node will belong. |
[in] | timestamp | the current time. |
std::bad_alloc | if memory allocation fails. |
const FieldValue openvrml::node::field | ( | const std::string & | id | ) | const throw ( unsupported_interface , std::bad_alloc ) [inline] |
Generalized field accessor.
[in] | id | the name of the field. |
unsupported_interface | if the node has no field named id . | |
std::bad_alloc | if memory allocation fails. |
[in] | id | the name of the field . |
unsupported_interface | if the node has no field named id . | |
std::bad_cast | if the node's id field is not a FieldValue . |
field_value_listener< FieldValue > & openvrml::node::event_listener | ( | const std::string & | id | ) | throw ( unsupported_interface ) [inline] |
Get an event listener.
[in] | id | an eventIn identifier. |
unsupported_interface | if the node has no eventIn id . |
[in] | id | an eventIn identifier. |
unsupported_interface | if the node has no eventIn id . | |
std::bad_cast | if the node 's id eventIn is not a FieldValue . |
field_value_emitter< FieldValue > & openvrml::node::event_emitter | ( | const std::string & | id | ) | throw ( unsupported_interface ) [inline] |
Get an event emitter.
[in] | id | an eventOut identifier. |
unsupported_interface | if the node has no eventOut id . |
[in] | id | an eventOut identifier. |
unsupported_interface | if the node has no eventOut id . | |
std::bad_cast | if the node 's id eventOut is not a FieldValue . |
void openvrml::node::shutdown | ( | double | timestamp | ) | throw () |
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.
true
if the node
has been modified; false
otherwise. void openvrml::node::modified | ( | bool | value | ) |
Set the modified flag.
Indicates the node needs to be revisited for rendering.
[in] | value |
void openvrml::node::emit_event | ( | openvrml::event_emitter & | emitter, | |
double | timestamp | |||
) | throw ( std::bad_alloc ) [static, protected] |
Emit an event.
[in,out] | emitter | an event_emitter . |
[in] | timestamp | the current time. |
std::bad_alloc | if memory allocation fails. |
void openvrml::node::do_initialize | ( | double | timestamp | ) | throw ( std::bad_alloc ) [private, virtual] |
node
subclass-specific initialization.
This method is called by initialize
. Subclasses of node should override this method for any subclass-specific initialization.
The default implementation of this method does nothing.
[in] | timestamp | the current time. |
std::bad_alloc | if memory allocation fails. |
Reimplemented in openvrml::script_node.
const openvrml::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
.
[in] | id | field identifier. |
unsupported_interface | if the node has no field id . |
Implemented in openvrml::node_impl_util::abstract_node< Derived >, and openvrml::script_node.
openvrml::event_listener & openvrml::node::do_event_listener | ( | const std::string & | id | ) | throw ( unsupported_interface ) [private, pure virtual] |
Get an event listener.
This method is called by event_listener
. Subclasses must implement this method.
[in] | id | eventIn identifier. |
unsupported_interface | if the node has no eventIn id . |
Implemented in openvrml::node_impl_util::abstract_node< Derived >, and openvrml::script_node.
openvrml::event_emitter & openvrml::node::do_event_emitter | ( | const std::string & | id | ) | throw ( unsupported_interface ) [private, pure virtual] |
Get an event emitter.
This method is called by event_emitter
. Subclasses must implement this method.
[in] | id | eventOut identifier. |
unsupported_interface | if the node has no eventOut id . |
Implemented in openvrml::node_impl_util::abstract_node< Derived >, and openvrml::script_node.
void openvrml::node::do_shutdown | ( | double | timestamp | ) | throw () [private, virtual] |
Called by node::shutdown.
node
subclass-specific shut down.
[in] | timestamp | the current time. |
shutdown
. Subclasses of node should override this method for any subclass-specific shut down. Note that this method cannot throw.The default implementation of this method does nothing.
[in] | timestamp | the current time. |
Reimplemented in openvrml::script_node.
openvrml::script_node * openvrml::node::to_script | ( | ) | throw () [private, virtual] |
Cast to a script_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::script_node.
openvrml::appearance_node * openvrml::node::to_appearance | ( | ) | throw () [private, virtual] |
Cast to an appearance_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::appearance_node.
openvrml::bounded_volume_node * openvrml::node::to_bounded_volume | ( | ) | throw () [private, virtual] |
Cast to a bounded_volume_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::bounded_volume_node.
openvrml::child_node * openvrml::node::to_child | ( | ) | throw () [private, virtual] |
Cast to a child_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::child_node.
openvrml::color_node * openvrml::node::to_color | ( | ) | throw () [private, virtual] |
Cast to a color_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::color_node.
openvrml::color_rgba_node * openvrml::node::to_color_rgba | ( | ) | throw () [private, virtual] |
Cast to a color_rgba_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::color_rgba_node.
openvrml::coordinate_node * openvrml::node::to_coordinate | ( | ) | throw () [private, virtual] |
Cast to a coordinate_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::coordinate_node.
openvrml::font_style_node * openvrml::node::to_font_style | ( | ) | throw () [private, virtual] |
Cast to a font_style_node.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::font_style_node.
openvrml::geometry_node * openvrml::node::to_geometry | ( | ) | throw () [private, virtual] |
Cast to a geometry_node.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::geometry_node.
openvrml::grouping_node * openvrml::node::to_grouping | ( | ) | throw () [private, virtual] |
Cast to a grouping_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::grouping_node.
openvrml::light_node * openvrml::node::to_light | ( | ) | throw () [private, virtual] |
Cast to a light_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::light_node.
openvrml::material_node * openvrml::node::to_material | ( | ) | throw () [private, virtual] |
Cast to a material_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::material_node.
openvrml::navigation_info_node * openvrml::node::to_navigation_info | ( | ) | throw () [private, virtual] |
Cast to a navigation_info_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::navigation_info_node.
openvrml::normal_node * openvrml::node::to_normal | ( | ) | throw () [private, virtual] |
Cast to a normal_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::normal_node.
openvrml::pointing_device_sensor_node * openvrml::node::to_pointing_device_sensor | ( | ) | throw () [private, virtual] |
Cast to a pointing_device_sensor_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::pointing_device_sensor_node.
openvrml::scoped_light_node * openvrml::node::to_scoped_light | ( | ) | throw () [private, virtual] |
Cast to a scoped_light_node
.
For internal use only.
Reimplemented in openvrml::scoped_light_node.
openvrml::sound_source_node * openvrml::node::to_sound_source | ( | ) | throw () [private, virtual] |
Cast to a sound_source_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::sound_source_node.
openvrml::texture_node * openvrml::node::to_texture | ( | ) | throw () [private, virtual] |
Cast to a texture_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::texture_node.
openvrml::texture_coordinate_node * openvrml::node::to_texture_coordinate | ( | ) | throw () [private, virtual] |
Cast to a texture_coordinate_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::texture_coordinate_node.
openvrml::texture_transform_node * openvrml::node::to_texture_transform | ( | ) | throw () [private, virtual] |
Cast to a texture_transform_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::texture_transform_node.
openvrml::time_dependent_node * openvrml::node::to_time_dependent | ( | ) | throw () [private, virtual] |
Cast to a time_dependent_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::time_dependent_node.
openvrml::transform_node * openvrml::node::to_transform | ( | ) | throw () [private, virtual] |
Cast to a transform_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::transform_node.
openvrml::viewpoint_node * openvrml::node::to_viewpoint | ( | ) | throw () [private, virtual] |
Cast to a viewpoint_node
.
For internal use only.
Default implementation returns 0.
Reimplemented in openvrml::viewpoint_node.
class openvrml::node::proto_node [friend] |
A PROTO
instance.
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::field_value_listener [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
class openvrml::node::exposedfield [friend] |
std::ostream & openvrml::node::operator<< | ( | std::ostream & | out, | |
const node & | n | |||
) | [friend] |
openvrml::viewpoint_node * openvrml::node::node_cast< viewpoint_node * > | ( | node * | n | ) | throw () [friend] |
Downcast a node
to one of the abstract node
types.
Cast to a viewpoint_node
.
Cast to a transform_node
.
Cast to a texture_transform_node
.
Cast to a texture_coordinate_node
.
Cast to a texture_node
.
Cast to a sound_source_node
.
Cast to a normal_node
.
Cast to a navigation_info_node
.
Cast to a material_node
.
Cast to a grouping_node
.
Cast to a geometry_node
.
Cast to a font_style_node
.
Cast to a coordinate_node
.
Cast to a color_rgba_node
.
Cast to a color_node
.
Cast to a child_node
.
Cast to a appearance_node
.
Cast to a script_node
.
[in] | n | a node . |
node
, or 0 if the cast fails. void intrusive_ptr_add_ref | ( | const node * | n | ) | [related] |
Increment the reference count.
This function is used by boost::intrusive_ptr<node>
.
void intrusive_ptr_release | ( | const node * | n | ) | [related] |
Decrement the reference count.
This function is used by boost::intrusive_ptr<node>
.
boost::mutex openvrml::node::ref_count_mutex_ [mutable, private] |
size_t openvrml::node::ref_count_ [mutable, private] |
The number of owning references to the instance.
For internal use only.
const openvrml::node_type & openvrml::node::type_ [private] |
boost::shared_ptr< openvrml::scope > openvrml::node::scope_ [private] |
openvrml::read_write_mutex openvrml::node::scene_mutex_ [mutable, private] |
openvrml::scene * openvrml::node::scene_ [private] |
openvrml::read_write_mutex openvrml::node::modified_mutex_ [mutable, private] |
bool openvrml::node::modified_ [private] |
const boost::intrusive_ptr< openvrml::node > openvrml::node::self_tag [static] |
Special value used when initializing a script_node
.
One should never attempt to dereference this value. It is useful only for comparison.