Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members   Related Pages  

AbstractLight Class Reference

Base class for all light nodes. More...

Inheritance diagram for AbstractLight:

AbstractChild AbstractBase ChildNode Node Node DirectionalLight PointLight SpotLight List of all members.

Public Methods

virtual ~AbstractLight ()=0 throw ()
 Destructor.

virtual void renderScoped (Viewer *)
 Render this node as scoped.

virtual AbstractLight * toLight () const
 Downcast to a light node.

float getAmbientIntensity () const
float getIntensity () const
bool getOn () const
SFColor::ConstArrayReference getColor () const

Protected Methods

 AbstractLight (const NodeType &nodeType, const ScopePtr &scope)
 Constructor.

void processSet_ambientIntensity (const FieldValue &sffloat, double timestamp) throw (std::bad_cast)
 set_ambientIntensity eventIn handler.

void processSet_color (const FieldValue &sfcolor, double timestamp) throw (std::bad_cast)
 set_color eventIn handler.

void processSet_intensity (const FieldValue &sffloat, double timestamp) throw (std::bad_cast)
 set_intensity eventIn handler.

void processSet_on (const FieldValue &sfbool, double timestamp) throw (std::bad_cast)
 set_on eventIn handler.


Protected Attributes

SFFloat ambientIntensity
SFColor color
SFFloat intensity
SFBool on

Detailed Description

Base class for all light nodes.


Constructor & Destructor Documentation

~AbstractLight   throw () [pure virtual]
 

Destructor.

AbstractLight const NodeType   nodeType,
const ScopePtr   scope
[protected]
 

Constructor.

Parameters:
nodeType the NodeType for the node.
scope the Scope to which the node belongs.

Member Function Documentation

void processSet_ambientIntensity const FieldValue   sffloat,
double    timestamp
throw (std::bad_cast) [protected]
 

set_ambientIntensity eventIn handler.

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

void processSet_color const FieldValue   sfcolor,
double    timestamp
throw (std::bad_cast) [protected]
 

set_color eventIn handler.

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

void processSet_intensity const FieldValue   sffloat,
double    timestamp
throw (std::bad_cast) [protected]
 

set_intensity eventIn handler.

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

void processSet_on const FieldValue   sfbool,
double    timestamp
throw (std::bad_cast) [protected]
 

set_on eventIn handler.

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

void renderScoped Viewer   viewer [virtual]
 

Render this node as scoped.

The default version of this method does nothing.

Parameters:
viewer a renderer.

Reimplemented in SpotLight.

AbstractLight * toLight   const [virtual]
 

Downcast to a light node.

Returns:
a pointer to this object.

Reimplemented from Node.