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

SpotLight Class Reference

SpotLight node instances. More...

Inheritance diagram for SpotLight:

AbstractLight AbstractChild AbstractBase ChildNode Node Node List of all members.

Public Methods

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

virtual ~SpotLight () throw ()
 Destructor.

virtual SpotLight * toSpotLight () const
 Cast to a SpotLight.

virtual void renderScoped (Viewer *)
 Render the scoped light.


Private Methods

virtual void initializeImpl (double timestamp) throw ()
 Initialize.

void processSet_attenuation (const FieldValue &sfvec3f, double timestamp) throw (std::bad_cast)
 set_attenuation eventIn handler.

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

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

void processSet_direction (const FieldValue &sfvec3f, double timestamp) throw (std::bad_cast)
 set_direction eventIn handler.

void processSet_location (const FieldValue &sfvec3f, double timestamp) throw (std::bad_cast)
 set_location eventIn handler.

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


Private Attributes

SFVec3f attenuation
 attenuation exposedField.

SFFloat beamWidth
 beamWidth exposedField.

SFFloat cutOffAngle
 cutOffAngle exposedField.

SFVec3f direction
 direction exposedField.

SFVec3f location
 location exposedField.

SFFloat radius
 radius exposedField.


Friends

class SpotLightClass
 Class object for SpotLight instances.


Detailed Description

SpotLight node instances.


Constructor & Destructor Documentation

SpotLight const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

Parameters:
nodeType the NodeType associated with the node instance.
scope the Scope to which the node belongs.

~SpotLight   throw () [virtual]
 

Destructor.


Member Function Documentation

void initializeImpl double    timestamp throw () [private, virtual]
 

Initialize.

Parameters:
timestamp the current time.

Reimplemented from Node.

void processSet_attenuation const FieldValue   sfvec3f,
double    timestamp
throw (std::bad_cast) [private]
 

set_attenuation eventIn handler.

Parameters:
sfvec3f an SFVec3f.
timestamp the current time.
Exceptions:
std::bad_cast if sfvec3f is not an SFVec3f.

void processSet_beamWidth const FieldValue   sffloat,
double    timestamp
throw (std::bad_cast) [private]
 

set_beamWidth eventIn handler.

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

void processSet_cutOffAngle const FieldValue   sffloat,
double    timestamp
throw (std::bad_cast) [private]
 

set_cutOffAngle eventIn handler.

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

void processSet_direction const FieldValue   sfvec3f,
double    timestamp
throw (std::bad_cast) [private]
 

set_direction eventIn handler.

Parameters:
sfvec3f an SFVec3f.
timestamp the current time.
Exceptions:
std::bad_cast if sfvec3f is not an SFVec3f.

void processSet_location const FieldValue   sfvec3f,
double    timestamp
throw (std::bad_cast) [private]
 

set_location eventIn handler.

Parameters:
sfvec3f an SFVec3f.
timestamp the current time.
Exceptions:
std::bad_cast if sfvec3f is not an SFVec3f.

void processSet_radius const FieldValue   sffloat,
double    timestamp
throw (std::bad_cast) [private]
 

set_radius eventIn handler.

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

void renderScoped Viewer   viewer [virtual]
 

Render the scoped light.

This should be called before rendering any geometry in the scene. Since this is called from Scene::render before traversing the scene graph, the proper transformation matrix hasn't been set up. Somehow it needs to figure out the accumulated xforms of its parents and apply them before rendering. This is not easy with DEF/USEd nodes...

Parameters:
viewer a Viewer.

Reimplemented from AbstractLight.

SpotLight * toSpotLight   const [virtual]
 

Cast to a SpotLight.

Returns:
a pointer to the node.

Reimplemented from Node.


Friends And Related Function Documentation

SpotLightClass [friend]
 

Class object for SpotLight instances.


Member Data Documentation

SFVec3f attenuation [private]
 

attenuation exposedField.

SFFloat beamWidth [private]
 

beamWidth exposedField.

SFFloat cutOffAngle [private]
 

cutOffAngle exposedField.

SFVec3f direction [private]
 

direction exposedField.

SFVec3f location [private]
 

location exposedField.

SFFloat radius [private]
 

radius exposedField.