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

TimeSensor Class Reference

TimeSensor node instances. More...

Inheritance diagram for TimeSensor:

AbstractChild AbstractBase ChildNode Node Node List of all members.

Public Methods

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

virtual ~TimeSensor () throw ()
 Destructor.

virtual TimeSensor * toTimeSensor () const
 Cast to a TimeSensor.

virtual const BVolumegetBVolume () const
 Get the bounding volume.

void update (double time)

Private Methods

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

void processSet_cycleInterval (const FieldValue &sftime, double timestamp) throw (std::bad_cast)
 set_cycleInterval eventIn handler.

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

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

void processSet_startTime (const FieldValue &sftime, double timestamp) throw (std::bad_cast)
 set_startTime eventIn handler.

void processSet_stopTime (const FieldValue &sftime, double timestamp) throw (std::bad_cast)
 set_stopTime eventIn handler.


Private Attributes

SFTime cycleInterval
 cycleInterval exposedField.

SFBool enabled
 enabled exposedField.

SFBool loop
 loop exposedField.

SFTime startTime
 startTime exposedField.

SFTime stopTime
 stopTime exposedField.

SFTime cycleTime
 cycleTime eventOut.

SFFloat fraction
 fraction_changed eventOut.

SFBool active
 isActive eventOut.

SFTime time
 time eventOut.

double lastTime
 The timestamp previously received.


Friends

class TimeSensorClass
 Class object for TimeSensor instances.


Detailed Description

TimeSensor node instances.


Constructor & Destructor Documentation

TimeSensor const NodeType   nodeType,
const ScopePtr   scope
 

Constructor.

Parameters:
nodeType the NodeType associated with the instance.
scope the Scope that the new node will belong to.

~TimeSensor   throw () [virtual]
 

Destructor.


Member Function Documentation

const BVolume * getBVolume   const [virtual]
 

Get the bounding volume.

Returns:
the bounding volume associated with the node.

Reimplemented from Node.

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

Initialize.

Parameters:
timestamp the current time.

Reimplemented from Node.

void processSet_cycleInterval const FieldValue   sftime,
double    timestamp
throw (std::bad_cast) [private]
 

set_cycleInterval eventIn handler.

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

void processSet_enabled const FieldValue   sfbool,
double    timestamp
throw (std::bad_cast) [private]
 

set_enabled eventIn handler.

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

void processSet_loop const FieldValue   sfbool,
double    timestamp
throw (std::bad_cast) [private]
 

set_loop eventIn handler.

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

void processSet_startTime const FieldValue   sftime,
double    timestamp
throw (std::bad_cast) [private]
 

set_startTime eventIn handler.

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

void processSet_stopTime const FieldValue   sftime,
double    timestamp
throw (std::bad_cast) [private]
 

set_stopTime eventIn handler.

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

TimeSensor * toTimeSensor   const [virtual]
 

Cast to a TimeSensor.

Returns:
a pointer to the object.

Reimplemented from Node.

void update double    time
 

Generate timer events. If necessary, events prior to the timestamp (inTime) are generated to respect stopTimes and cycleIntervals. The timestamp should never be increased. This assumes the event loop delivers pending events in order (ascending time stamps). Should inTime be modified? Should ensure continuous events are delivered before discrete ones (such as cycleTime, isActive).


Friends And Related Function Documentation

TimeSensorClass [friend]
 

Class object for TimeSensor instances.


Member Data Documentation

SFBool active [private]
 

isActive eventOut.

SFTime cycleInterval [private]
 

cycleInterval exposedField.

SFTime cycleTime [private]
 

cycleTime eventOut.

SFBool enabled [private]
 

enabled exposedField.

SFFloat fraction [private]
 

fraction_changed eventOut.

double lastTime [private]
 

The timestamp previously received.

SFBool loop [private]
 

loop exposedField.

SFTime startTime [private]
 

startTime exposedField.

SFTime stopTime [private]
 

stopTime exposedField.

SFTime time [private]
 

time eventOut.