Home | Download | Screen shots | Discussion | Documentation
--- | --- | --- | --- | ---

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

# Nodes

## Classes
class | openvrml::unsupported_interface
| Exception to indicate that a node interface is not supported. More...
class | openvrml::node_interface
| Type information for an interface of a node. More...
struct | openvrml::node_interface_matches_eventin
| Determine if a node_interface matches an eventIn identifier. More...
struct | openvrml::node_interface_matches_eventout
| Determine if a node_interface matches an eventOut identifier. More...
struct | openvrml::node_interface_matches_exposedfield
| Determine if a node_interface matches an exposedField identifier. More...
struct | openvrml::node_interface_matches_field
| Determine if a node_interface matches an field identifier. More...
struct | openvrml::node_interface_compare
| Function object to compare two node_interfaces based on their id. More...
class | openvrml::node_class
| A class object for node instances. More...
class | openvrml::node_type
| Type information object for `node`s. More...
class | openvrml::field_value_type_mismatch
| Thrown when field value types do not match, generally in a `ROUTE` or `IS`. More...
class | openvrml::node
| A node in the scene graph. More...
class | openvrml::appearance_node
| Abstract base class for appearance nodes. More...
class | openvrml::child_node
| Abstract base class for child nodes. More...
class | openvrml::color_node
| Abstract base class for color nodes. More...
class | openvrml::font_style_node
| Abstract base class for font style nodes. More...
class | openvrml::geometry_node
| Abstract base class for geometry nodes. More...
class | openvrml::grouping_node
| Abstract base class for grouping nodes. More...
class | openvrml::material_node
| Abstract base class for material nodes. More...
class | openvrml::normal_node
| Abstract base class for normal nodes. More...
class | openvrml::sound_source_node
| Abstract base class for sound source nodes. More...
class | openvrml::texture_node
| Abstract base class for texture nodes. More...
class | openvrml::texture_coordinate_node
| Abstract base class for texture coordinate nodes. More...
class | openvrml::texture_transform_node
| Abstract base class for texture transform nodes. More...
class | openvrml::transform_node
| Abstract base class for texture transform nodes. More...
class | openvrml::viewpoint_node
| Abstract base class for texture transform nodes. More...
class | openvrml::node_traverser
| Traverse the children of each node in a node hierarchy only once. More...
## Typedefs
typedef std::set< node_interface, node_interface_compare > | openvrml::node_interface_set
| A group of unique `node_interface`s.
typedef std::deque< node * > | openvrml::node_path
| A path to a node in the scene starting with one of the scene root nodes and ending with the objective node.
## Functions
const node_interface_set::const_iterator | openvrml::find_interface (const node_interface_set &interfaces, const std::string &id) throw ()
| Find an interface matching `id`.
bool | openvrml::add_route (node &from_node, const std::string &from_eventout, node &to_node, const std::string &to_eventin) throw (std::bad_alloc, unsupported_interface, field_value_type_mismatch)
| Add a route from an eventOut of this node to an eventIn of another node.
bool | openvrml::delete_route (node &from, const std::string &eventout, node &to, const std::string &eventin) throw (unsupported_interface)
| Remove a route from an eventOut of this node to an eventIn of another node.
template<typename To>
To | openvrml::node_cast (node *n) throw ()
| Downcast a node to one of the abstract node types.

## Typedef Documentation

openvrml::node_interface_set

| A group of unique `node_interface`s. `node_interface_set`s are used to construct new `node_type`s. `node_type` objects also expose their interfaces as a `node_interface_set`. The interfaces in a `node_interface_set` are guaranteed to be unique and non-conflicting.

openvrml::node_path

| A path to a node in the scene starting with one of the scene root nodes and ending with the objective node.

## Function Documentation

const node_interface_set::const_iterator openvrml::find_interface | ( | const node_interface_set & | interfaces,
|  | const std::string & | id
| ) | throw ()

  | Find an interface matching `id`. If no interface is found with an interface identifier that is an exact match for `id`, this function will look for `set_` and `_changed` variants. If `interfaces` contains a field `zzz` along with an eventIn `set_zzz` and/or an eventOut `zzz_changed`, the eventIn or eventOut will only be found if the `set_zzz` or `zzz_changed` form, respectively, is used for `id`. Parameters:
  | interfaces | a set of `node_interface`s.
  | id | the interface id to look for.
Returns: a `const_iterator` to the interface, or `node_interface_set::end` if no interface is found.

bool openvrml::add_route | ( | node & | from_node,
|  | const std::string & | from_eventout,
|  | node & | to_node,
|  | const std::string & | to_eventin
| ) | throw (std::bad_alloc, 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 | source node.
  | eventout | an eventOut of `from`.
  | to | destination node.
  | eventin | an eventIn of `to`.
  Returns: `true` if a route was successfully added; `false` otherwise (if the route already existed). Exceptions:
  | std::bad_alloc | if memory allocation fails.
  | unsupported_interface | if the node has no eventOut `eventout`; or if `to` has no eventIn `eventin`.
  | field_value_type_mismatch | if `eventout` and `eventin` have different field value types.
Precondition: `to_node` is not null.

bool openvrml::delete_route | ( | node & | from,
|  | const std::string & | eventout,
|  | node & | to,
|  | const std::string & | eventin
| ) | throw (unsupported_interface)

  | 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 | source node.
  | eventout | an eventOut of `from`.
  | to | destination node.
  | eventin | an eventIn of `to`.
  Returns: `true` if a route was deleted; `false` otherwise (if no such route existed). Exceptions:
  | unsupported_interface | if `from` has no eventOut `eventout` or if `to` has no eventIn `eventin`.

template<typename To>
To * node_cast | ( | node * | n | ) | throw ()

  | Downcast a node to one of the abstract node types. Parameters:
  | n | a node.
Returns: a pointer to the downcast node, or 0 if the cast fails.