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

openvrml::vrml97_node::abstract_light_node Class Reference

Base class for all light nodes. More...

Inheritance diagram for openvrml::vrml97_node::abstract_light_node:

Inheritance graph
[legend]
Collaboration diagram for openvrml::vrml97_node::abstract_light_node:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual ~abstract_light_node ()=0 throw ()
 Destroy.

virtual void renderScoped (openvrml::viewer &viewer)
 Render this node as scoped.

virtual abstract_light_nodeto_light () const
 Downcast to a light node.

float ambient_intensity () const throw ()
 Ambient intensity.

float intensity () const throw ()
 Intensity.

bool on () const throw ()
 Whether the light is on.

const openvrml::colorcolor () const throw ()
 Light color.


Protected Member Functions

 abstract_light_node (const node_type &type, const scope_ptr &scope)
 Construct.

void process_set_ambientIntensity (const field_value &value, double timestamp) throw (std::bad_cast)
 set_ambientIntensity eventIn handler.

void process_set_color (const field_value &value, double timestamp) throw (std::bad_cast)
 set_color eventIn handler.

void process_set_intensity (const field_value &value, double timestamp) throw (std::bad_cast)
 set_intensity eventIn handler.

void process_set_on (const field_value &value, double timestamp) throw (std::bad_cast)
 set_on eventIn handler.


Protected Attributes

sffloat ambientIntensity
 ambientIntensity exposedField.

sfcolor color_
 color exposedField.

sffloat intensity_
 intensity exposedField.

sfbool on_
 on exposedField.


Detailed Description

Base class for all light nodes.


Constructor & Destructor Documentation

openvrml::vrml97_node::abstract_light_node::abstract_light_node const node_type type,
const scope_ptr scope
[protected]
 

Construct.

Parameters:
type the node_type for the node.
scope the scope to which the node belongs.

Member Function Documentation

float openvrml::vrml97_node::abstract_light_node::ambient_intensity  )  const throw ()
 

Ambient intensity.

Returns:
the ambient intensity.

const openvrml::color & openvrml::vrml97_node::abstract_light_node::color  )  const throw ()
 

Light color.

Returns:
the light color.

float openvrml::vrml97_node::abstract_light_node::intensity  )  const throw ()
 

Intensity.

Returns:
the intensity.

bool openvrml::vrml97_node::abstract_light_node::on  )  const throw ()
 

Whether the light is on.

Returns:
true if the light is on; false otherwise.

void openvrml::vrml97_node::abstract_light_node::process_set_ambientIntensity const field_value value,
double  timestamp
throw (std::bad_cast) [protected]
 

set_ambientIntensity eventIn handler.

Parameters:
value an SFFloat value.
timestamp the current time.
Exceptions:
std::bad_cast if value is not an sffloat.

void openvrml::vrml97_node::abstract_light_node::process_set_color const field_value value,
double  timestamp
throw (std::bad_cast) [protected]
 

set_color eventIn handler.

Parameters:
value an sfcolor value.
timestamp the current time.
Exceptions:
std::bad_cast if value is not an sfcolor.

void openvrml::vrml97_node::abstract_light_node::process_set_intensity const field_value value,
double  timestamp
throw (std::bad_cast) [protected]
 

set_intensity eventIn handler.

Parameters:
value an sffloat value.
timestamp the current time.
Exceptions:
std::bad_cast if value is not an sffloat.

void openvrml::vrml97_node::abstract_light_node::process_set_on const field_value value,
double  timestamp
throw (std::bad_cast) [protected]
 

set_on eventIn handler.

Parameters:
value an sfbool value.
timestamp the current time.
Exceptions:
std::bad_cast if value is not an sfbool.

void openvrml::vrml97_node::abstract_light_node::renderScoped openvrml::viewer viewer  )  [virtual]
 

Render this node as scoped.

The default version of this method does nothing.

Parameters:
viewer a renderer.

Reimplemented in openvrml::vrml97_node::point_light_node, and openvrml::vrml97_node::spot_light_node.

abstract_light_node * openvrml::vrml97_node::abstract_light_node::to_light  )  const [virtual]
 

Downcast to a light node.

Returns:
a pointer to this object.

Reimplemented from openvrml::node.