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

openvrml::vrml97_node::fog_class Class Reference

Inheritance diagram for openvrml::vrml97_node::fog_class:

Inheritance graph
[legend]
List of all members.

Detailed Description

Class object for Fog nodes.


Public Member Functions

 fog_class (openvrml::browser &browser)
 Construct.
virtual ~fog_class () throw ()
 Destroy.
void set_first (fog_node &fog) throw ()
 Set the first Fog node in the world.
bool has_first () const throw ()
 Check to see if the first node has been set.
void bind (fog_node &fog, double timestamp) throw (std::bad_alloc)
 Push a Fog on the top of the bound node stack.
void unbind (fog_node &fog, double timestamp) throw ()
 Remove a Fog from the bound node stack.

Private Types

typedef std::vector< fog_node * > bound_nodes_t
 A bound Fog node stack.

Private Member Functions

virtual void do_initialize (viewpoint_node *initialViewpoint, double timestamp) throw ()
virtual void do_render (viewer &v) const throw ()
 node_class-specific rendering.
virtual const node_type_ptr do_create_type (const std::string &id, const node_interface_set &interfaces) const throw (unsupported_interface, std::bad_alloc)
 Create a node_type.

Private Attributes

fog_nodefirst
 The first Fog node in the initial scene graph.
bound_nodes_t bound_nodes
 The bound Fog node stack.

Member Typedef Documentation

openvrml::vrml97_node::fog_class::bound_nodes_t [private]
 

A bound Fog node stack.


Constructor & Destructor Documentation

openvrml::vrml97_node::fog_class::fog_class openvrml::browser browser  )  [explicit]
 

Construct.

Parameters:
browser the browser associated with this class object.

openvrml::vrml97_node::fog_class::~fog_class  )  throw () [virtual]
 

Destroy.


Member Function Documentation

void openvrml::vrml97_node::fog_class::set_first fog_node fog  )  throw ()
 

Set the first Fog node in the world.

The first Fog node in the world is used for the initial fog. This method is used by fog_node::do_initialize.

Parameters:
fog a Fog node.

bool openvrml::vrml97_node::fog_class::has_first  )  const throw ()
 

Check to see if the first node has been set.

This method is used by fog_node::do_initialize.

Returns:
true if the first node has already been set; false otherwise.

void openvrml::vrml97_node::fog_class::bind fog_node fog,
double  timestamp
throw (std::bad_alloc)
 

Push a Fog on the top of the bound node stack.

Parameters:
fog the node to bind.
timestamp the current time.

void openvrml::vrml97_node::fog_class::unbind fog_node fog,
double  timestamp
throw ()
 

Remove a Fog from the bound node stack.

Parameters:
fog the node to unbind.
timestamp the current time.

void openvrml::vrml97_node::fog_class::do_render viewer v  )  const throw () [private, virtual]
 

node_class-specific rendering.

Render the active Fog node.

Parameters:
v a viewer.

Reimplemented from openvrml::node_class.

const node_type_ptr openvrml::vrml97_node::fog_class::do_create_type const std::string &  id,
const node_interface_set interfaces
const throw (unsupported_interface, std::bad_alloc) [private, virtual]
 

Create a node_type.

Parameters:
id the name for the new node_type.
interfaces the interfaces for the new node_type.
Returns:
a node_type_ptr to a node_type capable of creating Fog nodes.
Exceptions:
unsupported_interface if interfaces includes an interface not supported by fog_class.
std::bad_alloc if memory allocation fails.

Implements openvrml::node_class.


Member Data Documentation

fog_node * openvrml::vrml97_node::fog_class::first [private]
 

The first Fog node in the initial scene graph.

fog_class::bound_nodes_t openvrml::vrml97_node::fog_class::bound_nodes [private]
 

The bound Fog node stack.