H3D::X3DTimeDependentNode Class Reference

This abstract node type is the base node type from which all time-dependent nodes are derived. More...

#include <H3D/X3DTimeDependentNode.h>

Inheritance diagram for H3D::X3DTimeDependentNode:

Inheritance graph

List of all members.

Classes

class  StartTime
 The StartTime field is a specialization of the SFTime field so that the value cannot be changed when the isActive field of the X3DTimeDependentNode it resides in is true. More...
class  StopTime
 The StopTime field is a specialization of the SFTime field so that the value is ignored if the X3DTimeDependentNode is active and stopTime <= startTime as according to the X3D spec. More...
class  TimeHandler
 The TimeHandler field updates once per scene-graph loop to monitor the current time and updates the fields in the owner X3DTimeDependentNode if any state changes has to be made. More...

Public Member Functions

 X3DTimeDependentNode (Inst< SFNode > _metadata=0, Inst< SFBool > _loop=0, Inst< SFTime > _pauseTime=0, Inst< SFTime > _resumeTime=0, Inst< StartTime > _startTime=0, Inst< StopTime > _stopTime=0, Inst< SFTime > _elapsedTime=0, Inst< SFBool > _isActive=0, Inst< SFBool > _isPaused=0, Inst< TimeHandler > _timeHandler=0)
 Constructor.
virtual void initialize ()
 Activates the node if the conditions for a time node to be active from the start are met.
virtual void onPause ()
 This function will be called when the node is paused.
virtual void onResume ()
 This function will be called when the node is resumed after it has been in paused state.
virtual void onStart ()
 This function will be called when the time node is started.
virtual void onStop ()
 This function will be called when the time node is stopped.

Public Attributes

auto_ptr< SFBoolloop
 If loop is TRUE at the end of a cycle, execution continues into the next cycle, otherwise it stops.
auto_ptr< SFTimepauseTime
 A time at which to pause and stop generating events.
auto_ptr< SFTimeresumeTime
 A time at which to start generating events again after being paused.
auto_ptr< StartTimestartTime
 A time-dependent node is inactive until its startTime is reached.
auto_ptr< StopTimestopTime
 An active time-dependent node will become inactive when stopTime is reached if stopTime > startTime.
auto_ptr< SFTimeelapsedTime
 The elapsedTime outputOnly field delivers the current elapsed time since the X3DTimeDependentNode was activated and running, cumulative in seconds and not counting any time while in a paused state.
auto_ptr< SFBoolisActive
 An isActive TRUE event is generated when the node becomes active and an isActive FALSE event is generated when it becomes inactive.
auto_ptr< SFBoolisPaused
 An isPaused TRUE event is generated when the node becomes paused and an isPaused FALSE event is generated when it is resumed.

Static Public Attributes

static H3DNodeDatabase database
 The H3DNodeDatabase for this node.


Detailed Description

This abstract node type is the base node type from which all time-dependent nodes are derived.


Member Function Documentation

void X3DTimeDependentNode::initialize (  )  [virtual]

Activates the node if the conditions for a time node to be active from the start are met.

Reimplemented from H3DUtil::RefCountedClass.

References loop, startTime, and stopTime.

virtual void H3D::X3DTimeDependentNode::onResume (  )  [inline, virtual]

This function will be called when the node is resumed after it has been in paused state.

Reimplemented in H3D::X3DSoundSourceNode.

Referenced by H3D::X3DTimeDependentNode::TimeHandler::update().


Member Data Documentation

The elapsedTime outputOnly field delivers the current elapsed time since the X3DTimeDependentNode was activated and running, cumulative in seconds and not counting any time while in a paused state.

Access type: outputOnly

Referenced by H3D::X3DTimeDependentNode::TimeHandler::activate(), H3D::TimeSensor::TimeHandler::activate(), H3D::X3DTimeDependentNode::TimeHandler::update(), and X3DTimeDependentNode().

An isActive TRUE event is generated when the node becomes active and an isActive FALSE event is generated when it becomes inactive.

These are the only times at which an isActive event is generated. In particular, isActive events are not sent at each tick of a simulation.

Access type: outputOnly

Referenced by H3D::X3DTimeDependentNode::TimeHandler::activate(), H3D::AudioClip::ALrender(), H3D::X3DTimeDependentNode::TimeHandler::deactivate(), H3D::X3DTimeDependentNode::StartTime::propagateEvent(), H3D::X3DSoundSourceNode::registerSoundNode(), H3D::X3DTimeDependentNode::StartTime::setValue(), H3D::X3DTimeDependentNode::StopTime::update(), H3D::X3DTimeDependentNode::TimeHandler::update(), H3D::X3DSoundSourceNode::TimeHandler::update(), H3D::TimeSensor::TimeHandler::update(), and X3DTimeDependentNode().

An isPaused TRUE event is generated when the node becomes paused and an isPaused FALSE event is generated when it is resumed.

Access type: outputOnly

Referenced by H3D::X3DTimeDependentNode::TimeHandler::activate(), H3D::AudioClip::ALrender(), H3D::X3DSoundSourceNode::registerSoundNode(), H3D::X3DTimeDependentNode::TimeHandler::update(), H3D::X3DSoundSourceNode::TimeHandler::update(), H3D::TimeSensor::TimeHandler::update(), and X3DTimeDependentNode().

A time at which to pause and stop generating events.

While an active time-dependent node is paused, it generates a TRUE isPaused event and ceases to generate all other output events, while maintaining (or "freezing") its state (holding the last output values and the clock's internal time when the pausing conditions are met).

Access type: inputOutput
Default value: 0

Referenced by H3D::X3DTimeDependentNode::TimeHandler::activate(), H3D::X3DTimeDependentNode::TimeHandler::update(), and X3DTimeDependentNode().

A time at which to start generating events again after being paused.

Access type: inputOutput
Default value: 0

Referenced by H3D::X3DTimeDependentNode::TimeHandler::activate(), H3D::X3DTimeDependentNode::TimeHandler::update(), and X3DTimeDependentNode().

A time-dependent node is inactive until its startTime is reached.

When current time becomes greater than or equal to startTime, an isActive TRUE event is generated and the time-dependent node becomes active.

Access type: inputOutput
Default value: 0

Referenced by H3D::X3DTimeDependentNode::TimeHandler::activate(), H3D::TimeSensor::TimeHandler::activate(), initialize(), H3D::X3DTimeDependentNode::TimeHandler::update(), H3D::TimeSensor::TimeHandler::update(), and X3DTimeDependentNode().

An active time-dependent node will become inactive when stopTime is reached if stopTime > startTime.

The value of stopTime is ignored if stopTime = startTime.

Access type: inputOutput
Default value: 0

Referenced by initialize(), H3D::X3DTimeDependentNode::TimeHandler::update(), H3D::TimeSensor::TimeHandler::update(), and X3DTimeDependentNode().


The documentation for this class was generated from the following files:

Generated on Fri Nov 7 10:31:33 2008 for H3D API by  doxygen 1.5.7