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

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

# openvrml::geometry_node Class Reference
[Nodes]

Inheritance diagram for openvrml::geometry_node:

[legend]
List of all members.

## Detailed Description

Abstract base class for geometry nodes.

## Public Member Functions
virtual | ~geometry_node ()=0 throw ()
| Destroy.
viewer::object_t | render_geometry (viewer &v, rendering_context context)
| Insert geometry into a viewer.
bool | emissive () const throw ()
| Indicates whether the geometry should be drawn with the emissive color.
virtual const color_node * | color () const throw ()
| Get the color node (if any) associated with this geometry.
## Protected Member Functions
| geometry_node (const node_type &type, const boost::shared_ptr< openvrml::scope > &scope) throw ()
| Construct.
## Private Member Functions
virtual viewer::object_t | do_render_geometry (viewer &v, rendering_context context)
| render_geometry implementation.
virtual bool | do_emissive () const throw ()
| emissive implementation.
virtual geometry_node * | to_geometry () throw ()
| Cast to a geometry_node.
## Private Attributes
viewer::object_t | geometry_reference
| Identifier for a geometry object in the renderer.

## Constructor & Destructor Documentation

openvrml::geometry_node::~geometry_node | ( |  | ) | throw ()`[pure virtual]`

| Destroy. Todo: Proper resource deallocation in the `viewer` depends on the `viewer` not having been decoupled from the browser. We need to handle this better via some refcounting scheme.

openvrml::geometry_node::geometry_node | ( | const node_type & | type,
|  | const boost::shared_ptr< openvrml::scope > & | scope
| ) | throw ()`[protected]`

  | Construct. Parameters:
  | type | the node_type associated with the node.
  | scope | the Scope the node belongs to.

## Member Function Documentation

viewer::object_t openvrml::geometry_node::render_geometry | ( | viewer & | v,
|  | rendering_context | context
| ) |

  | Insert geometry into a viewer. Parameters:
  | v | viewer.
  | context | rendering context.
Returns: object identifier for the inserted geometry.

bool openvrml::geometry_node::emissive | ( |  | ) | const throw ()

| Indicates whether the geometry should be drawn with the emissive color. Returns: `true` if the geometry should be drawn with the emissive color; `false` otherwise (if the geometry should be drawn with the diffuse color).

const color_node * openvrml::geometry_node::color | ( |  | ) | const throw ()`[virtual]`

| Get the color node (if any) associated with this geometry. Returns: the color_node associated associated with this geometry, or 0 if there is no such node. Todo: Reevaluate the way the renderer visits geometry nodes; potentially eliminate this method. Reimplemented in openvrml::vrml97_node::abstract_indexed_set_node.

viewer::object_t openvrml::geometry_node::do_render_geometry | ( | viewer & | v,
|  | rendering_context | context
| ) | `[private, virtual]`

  | render_geometry implementation. Parameters:
  | v | viewer.
  | context | rendering context.
Returns: object identifier for the inserted geometry. Reimplemented in openvrml::vrml97_node::box_node, openvrml::vrml97_node::cone_node, openvrml::vrml97_node::cylinder_node, openvrml::vrml97_node::elevation_grid_node, openvrml::vrml97_node::extrusion_node, openvrml::vrml97_node::indexed_face_set_node, openvrml::vrml97_node::indexed_line_set_node, openvrml::vrml97_node::point_set_node, openvrml::vrml97_node::sphere_node, and openvrml::vrml97_node::text_node.

bool openvrml::geometry_node::do_emissive | ( |  | ) | const throw ()`[private, virtual]`

| emissive implementation. Returns: `false`. Reimplemented in openvrml::vrml97_node::indexed_line_set_node, and openvrml::vrml97_node::point_set_node.

geometry_node * openvrml::geometry_node::to_geometry | ( |  | ) | throw ()`[private, virtual]`

| Cast to a geometry_node. Returns: a pointer to this geometry_node. Reimplemented from openvrml::node.

## Member Data Documentation

viewer::object_t openvrml::geometry_node::geometry_reference`[private]`

| Identifier for a geometry object in the renderer.