| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/sg/timemodifier.h>

Public Types | |
| enum | Mode { CONSTANT, DISCRETE, REPEAT, REVERSE, CREEP } |
Public Member Functions | |
| VRS_SERIALIZABLE_CLASS_ENUM (Mode) | |
| TimeModifier (Mode mode, BehaviorNode *child=NULL) | |
| void | setMode (Mode mode) |
| Mode | getMode () const |
| void | setConstTime (const VRSTime &time) |
| const VRSTime & | getConstTime () const |
| void | setCreepSpeed (double coeff) |
| double | getCreepSpeed () const |
| void | setDiscreteSteps (int steps) |
| int | getDiscreteSteps () const |
| void | setRepeatInterval (const VRSTime &t) |
| const VRSTime & | getRepeatInterval () const |
| void | setRepeatCount (const unsigned int count) |
| const unsigned int | getRepeatCount () const |
| virtual TimeRequirement | timeRequirement () const |
| virtual BehaviorNode::InvalidationHint | handle (Event *) |
| VRS_TYPEINFO (TimeModifier, MonoBehavior) | |
| VRS_SERIALIZABLE (TimeModifier) | |
Protected Member Functions | |
| TimeModifier () | |
| VRS::TimeModifier::TimeModifier | ( | Mode | mode, | |
| BehaviorNode * | child = NULL | |||
| ) |
| VRS::TimeModifier::TimeModifier | ( | ) | [inline, protected] |
| VRS::TimeModifier::VRS_SERIALIZABLE_CLASS_ENUM | ( | Mode | ) |
| void VRS::TimeModifier::setMode | ( | Mode | mode | ) |
| Mode VRS::TimeModifier::getMode | ( | ) | const |
| void VRS::TimeModifier::setConstTime | ( | const VRSTime & | time | ) |
| const VRSTime& VRS::TimeModifier::getConstTime | ( | ) | const |
The const-time mode sets the point in time contained in moments, which are sent by time events, to a constant time regardless of the begin and end of the moment.
| void VRS::TimeModifier::setCreepSpeed | ( | double | coeff | ) |
| double VRS::TimeModifier::getCreepSpeed | ( | ) | const |
The creep-time coefficient is constrained to the range [-10, 10]. The creep-time mode modifies the point in time contained in moments, which are set by time events, so that the time progress slows down or speeds up at the end of the time interval.
| void VRS::TimeModifier::setDiscreteSteps | ( | int | steps | ) |
| int VRS::TimeModifier::getDiscreteSteps | ( | ) | const |
The discrete-time mode modifies the point in time contained in moments, which are sent by time events, so that the continuous time progress is broken into a set of steps-many piecewise constant time intervals.
| void VRS::TimeModifier::setRepeatInterval | ( | const VRSTime & | t | ) |
| const VRSTime& VRS::TimeModifier::getRepeatInterval | ( | ) | const |
The repeat-time mode repeats a fixed period of time as long as it receives time events. The moment contained in a time event is modified so that the actual moment used has always the length specified by the period.
For example, this node can be used to split an infinite time interval into a sequence of finite intervals:
Say, the infinite time interval starts at 1000 and the current point in time is 5000. For a period of 3000, the time repeater would assign to its body the following moment:
| void VRS::TimeModifier::setRepeatCount | ( | const unsigned int | count | ) |
| const unsigned int VRS::TimeModifier::getRepeatCount | ( | ) | const |
The repeat count determines the number of repetitions of the interval specified via setRepeatInterval(). A count of 0 (default) indicates infinite repetition.
| virtual TimeRequirement VRS::TimeModifier::timeRequirement | ( | ) | const [virtual] |
The time requirement usually is the time requirement of its body. In repeat mode, the repetition interval and count determines the time requirement. If no body is specified, an "undefine" time requirement is returned.
Reimplemented from VRS::MonoBehavior.
| virtual BehaviorNode::InvalidationHint VRS::TimeModifier::handle | ( | Event * | ) | [virtual] |
A time modifier is transparent to events of any type except time events. For time events, the modifier node transform the moment and/or the point in time according to the current mode set of the TimeModifer.
Reimplemented from VRS::MonoBehavior.
| VRS::TimeModifier::VRS_TYPEINFO | ( | TimeModifier | , | |
| MonoBehavior | ||||
| ) |
| VRS::TimeModifier::VRS_SERIALIZABLE | ( | TimeModifier | ) |