29 #ifndef __PERIODIC_UPDATE_H__
30 #define __PERIODIC_UPDATE_H__
72 template<
class BaseFieldType >
126 BaseFieldType::upToDate();
Abstract base class for all Fields that will be updated without anyone asking for a value.
Definition: PeriodicUpdate.h:40
virtual bool timeToUpdate()=0
Determines if it is time to check that the field is updated.
virtual ~PeriodicUpdateField()
Destructor.
Definition: PeriodicUpdate.h:43
The PeriodicUpdate is a template modifier that changes the way the field is updated.
Definition: PeriodicUpdate.h:74
void setPeriod(H3DFloat _period)
Set the period for the update.
Definition: PeriodicUpdate.h:119
PeriodicUpdate(H3DFloat _period=0, PeriodType _period_type=COUNT)
Constructor.
Definition: PeriodicUpdate.h:83
PeriodType
Type defining how the period should be interpreted.
Definition: PeriodicUpdate.h:77
@ COUNT
The period is specified in seconds.
Definition: PeriodicUpdate.h:79
~PeriodicUpdate()
Destructor.
Definition: PeriodicUpdate.h:92
TimeStamp last_up_to_date
The time of the last call to upToDate.
Definition: PeriodicUpdate.h:137
PeriodType period_type
The tye of the period.
Definition: PeriodicUpdate.h:133
H3DFloat period
The period of automatic updates/.
Definition: PeriodicUpdate.h:135
unsigned int counter
The number of calls to timeToUpdate() since the last update.
Definition: PeriodicUpdate.h:139
virtual bool timeToUpdate()
Determines if it is time to check that the field is updated.
Definition: PeriodicUpdate.h:99
void setPeriodType(PeriodType type)
Set the type of the period.
Definition: PeriodicUpdate.h:114
virtual void upToDate()
upToDate is specialized to record the time of the call to the function in the last_up_to_date member.
Definition: PeriodicUpdate.h:125
static H3DUniquePtr< EventSink > eventSink
Any field routed to this field will be updated once per frame.
Definition: Scene.h:520
H3D API namespace.
Definition: Anchor.h:38