29 #ifndef __X3DTIMEDEPENDENTNODE_H__
30 #define __X3DTIMEDEPENDENTNODE_H__
54 virtual void activate(
H3DTime time );
58 virtual void deactivate(
H3DTime time );
65 virtual void update();
82 if( !time_node->
isActive->getValue() ) {
93 if( !time_node->
isActive->getValue() ) {
94 SFTime::propagateEvent( e );
112 if( time_node->
isActive->getValue() &&
113 time_node->timeHandler->getValue() == value ) {
114 time_node->timeHandler->deactivate( value );
119 friend class StopTime;
124 Inst< SFBool > _loop = 0,
125 Inst< SFTime > _pauseTime = 0,
126 Inst< SFTime > _resumeTime = 0,
127 Inst< StartTime > _startTime = 0,
128 Inst< StopTime > _stopTime = 0,
129 Inst< SFTime > _elapsedTime = 0,
130 Inst< SFBool > _isActive = 0,
131 Inst< SFBool > _isPaused = 0,
132 Inst< TimeHandler > _timeHandler = 0 );
136 virtual void initialize();
220 H3DUniquePtr< TimeHandler > timeHandler;
Contains the SFBool field class.
Contains the SFTime field class.
Header file for X3DChildNode, X3D scene-graph node.
The SFTime field contains a single time value.
Definition: SFTime.h:39
virtual void setValue(const H3DDouble &v, int id=0)
Set the value of the field.
Definition: SField.h:215
virtual void update()
Make the field up to date given that an event has occured.
Definition: SField.h:181
This abstract node type indicates that the concrete nodes which are instantiated based on it may be u...
Definition: X3DChildNode.h:42
The StartTime field is a specialization of the SFTime field so that the value cannot be changed when ...
Definition: X3DTimeDependentNode.h:75
virtual void setValue(const H3DDouble &time, int _id=0)
Overrides the setValue function so that the value is only changed if the owner X3DTimeDependentNode i...
Definition: X3DTimeDependentNode.h:79
virtual void propagateEvent(Event e)
Overrides the propagateEvent function so that the event is only propagated if the owner X3DTimeDepend...
Definition: X3DTimeDependentNode.h:90
The StopTime field is a specialization of the SFTime field so that the value is ignored if the X3DTim...
Definition: X3DTimeDependentNode.h:103
virtual void update()
Update is overriden to deactivate the time node if the value of the field updates to the to the curre...
Definition: X3DTimeDependentNode.h:108
The TimeHandler field updates once per scene-graph loop to monitor the current time and updates the f...
Definition: X3DTimeDependentNode.h:50
This abstract node type is the base node type from which all time-dependent nodes are derived.
Definition: X3DTimeDependentNode.h:41
H3DUniquePtr< SFBool > isActive
An isActive TRUE event is generated when the node becomes active and an isActive FALSE event is gener...
Definition: X3DTimeDependentNode.h:208
virtual void onResume()
This function will be called when the node is resumed after it has been in paused state.
Definition: X3DTimeDependentNode.h:143
virtual void onStart()
This function will be called when the time node is started.
Definition: X3DTimeDependentNode.h:146
H3DUniquePtr< SFBool > isPaused
An isPaused TRUE event is generated when the node becomes paused and an isPaused FALSE event is gener...
Definition: X3DTimeDependentNode.h:214
H3DUniquePtr< StopTime > stopTime
An active time-dependent node will become inactive when stopTime is reached if stopTime > startTime.
Definition: X3DTimeDependentNode.h:191
virtual void onStop()
This function will be called when the time node is stopped.
Definition: X3DTimeDependentNode.h:149
H3DUniquePtr< SFTime > resumeTime
A time at which to start generating events again after being paused.
Definition: X3DTimeDependentNode.h:174
static H3DNodeDatabase database
The H3DNodeDatabase for this node.
Definition: X3DTimeDependentNode.h:217
H3DUniquePtr< SFTime > elapsedTime
The elapsedTime outputOnly field delivers the current elapsed time since the X3DTimeDependentNode was...
Definition: X3DTimeDependentNode.h:199
H3DUniquePtr< StartTime > startTime
A time-dependent node is inactive until its startTime is reached.
Definition: X3DTimeDependentNode.h:183
H3DUniquePtr< SFBool > loop
If loop is TRUE at the end of a cycle, execution continues into the next cycle, otherwise it stops.
Definition: X3DTimeDependentNode.h:156
virtual void onPause()
This function will be called when the node is paused.
Definition: X3DTimeDependentNode.h:139
H3DUniquePtr< SFTime > pauseTime
A time at which to pause and stop generating events.
Definition: X3DTimeDependentNode.h:167
H3D API namespace.
Definition: Anchor.h:38
The AutoUpdate field is a template to force the BaseField to update itself as soon as an event is rec...
Definition: FieldTemplates.h:130
The H3DNodeDatabase contains a mapping between a name of a Node and the constructor for the Node with...
Definition: H3DNodeDatabase.h:194