openvrml::geometry_node Class Reference

Abstract base class for geometry nodes. More...

#include <openvrml/node.h>

Inheritance diagram for openvrml::geometry_node:

List of all members.


Public Member Functions

virtual ~geometry_node ()=0 throw ()
 Destroy.
void 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.
const color_nodecolor () 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 void do_render_geometry (viewer &v, rendering_context context)
 render_geometry implementation.
virtual bool do_emissive () const throw ()
 emissive implementation.
virtual const color_nodedo_color () const throw ()
 Get the color node (if any) associated with this geometry.
virtual geometry_nodeto_geometry () throw ()
 Cast to a geometry_node.

Detailed Description

Abstract base class for geometry nodes.

Constructor & Destructor Documentation

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

Destroy.

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

Construct.

Parameters:
[in] type the node_type associated with the node.
[in] scope the scope the node belongs to.


Member Function Documentation

void openvrml::geometry_node::render_geometry ( viewer v,
rendering_context  context 
)

Insert geometry into a viewer.

Parameters:
[in,out] v viewer.
[in] context rendering context.

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 openvrml::color_node * openvrml::geometry_node::color (  )  const throw ()

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.

void openvrml::geometry_node::do_render_geometry ( viewer v,
rendering_context  context 
) [private, virtual]

render_geometry implementation.

Parameters:
[in,out] v viewer.
[in] context rendering context.

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

emissive implementation.

Returns:
false.

const openvrml::color_node * openvrml::geometry_node::do_color (  )  const throw () [private, 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.

openvrml::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.