![]() |
RAMSES Documentation
27.0.130
Information for RAMSES users and developers
|
The AnimationSequence is a container for multiple animations. AnimationSequence has its own virtual time line where all its animations are put onto with given offsets. The sequence of animations can then be started/stopped altogether. More...
#include <AnimationSequence.h>
Public Member Functions | |
status_t | addAnimation (const Animation &animation, sequenceTimeStamp_t startTimeInSequence=0u, sequenceTimeStamp_t stopTimeInSequence=0u) |
Add animation to the sequence. Animation will be placed on to sequence time line at given time stamp if provided. The animation must not be added to multiple sequences, otherwise this will result in an undefined behavior. More... | |
status_t | removeAnimation (const Animation &animation) |
Remove animation from sequence. More... | |
status_t | start (timeMilliseconds_t offset=0) |
Starts the sequence of animations. Offset can be used to postpone start if positive or start sequence from a certain point if negative. More... | |
status_t | startAt (globalTimeStamp_t timeStamp) |
Starts the sequence of animations at given time. More... | |
status_t | startReverse (timeMilliseconds_t offset=0) |
Starts the sequence of animations in reverse. Offset can be used to postpone start if positive or start sequence from a certain point if negative. More... | |
status_t | startReverseAt (globalTimeStamp_t timeStamp) |
Starts the sequence of animations at given time in reverse. More... | |
status_t | stop (timeMilliseconds_t delay=0) |
Stops the sequence of animations. Delay can be used to postpone the stop. More... | |
status_t | stopAt (globalTimeStamp_t timeStamp) |
Stops the sequence of animations at given time. More... | |
status_t | setPlaybackSpeed (float playbackSpeed) |
Sets sequence playback speed affecting all animations within the sequence. Default sequence playback speed is 1, higher than 1 means faster (2 is double speed), lower than 1 means slower (0.5 is half speed). Zero and negative values are not allowed. More... | |
float | getPlaybackSpeed () const |
Gets sequence current playback speed. See setPlaybackSpeed() for meanings of the values. More... | |
status_t | setAnimationRelative (const Animation &animation) |
Sets animation relative. By default animation is absolute, ie. data values from spline keys are directly assigned to animated property. Relative animation takes value of the animated property at the point when animation starts and adds spline key value to it. More... | |
status_t | setAnimationAbsolute (const Animation &animation) |
Sets animation absolute. By default animation is absolute, ie. data values from spline keys are directly assigned to animated property. More... | |
status_t | setAnimationLooping (const Animation &animation, timeMilliseconds_t loopDuration=0) |
Enables animation looping. When animation reaches last spline key (or loopDuration passes) it begins playback from start. Looping animation can only be stopped by calling stop(). More... | |
bool | isAnimationRelative (const Animation &animation) const |
Returns true if animation is set to relative. See setAnimationRelative(). More... | |
bool | isAnimationLooping (const Animation &animation) const |
Returns true if animation is set to loop. More... | |
timeMilliseconds_t | getAnimationLoopDuration (const Animation &animation) const |
Gets loop duration for animation. See setAnimationLooping() for meaning of the value. More... | |
uint32_t | getNumberOfAnimations () const |
Returns number of animations within the sequence. More... | |
bool | containsAnimation (const Animation &animation) const |
Checks if given animation is in the AnimationSequence. More... | |
sequenceTimeStamp_t | getAnimationStartTimeInSequence (const Animation &animation) const |
Gives animation start time within the AnimationSequence. More... | |
sequenceTimeStamp_t | getAnimationStopTimeInSequence (const Animation &animation) const |
Gives animation stop time within the AnimationSequence. More... | |
sequenceTimeStamp_t | getAnimationSequenceStopTime () const |
Gets the maximum timestamp of all animations in this sequence. More... | |
![]() | |
sceneObjectId_t | getSceneObjectId () const |
Returns scene object id which is automatically assigned at creation time of object and is unique within scope of one scene. More... | |
sceneId_t | getSceneId () const |
Returns sceneid to which this object belongs to. More... | |
![]() | |
const char * | getName () const |
Returns the name of the object. More... | |
status_t | setName (const char *name) |
Changes the name of the object. More... | |
ERamsesObjectType | getType () const |
Gets type of the object. More... | |
bool | isOfType (ERamsesObjectType type) const |
Checks if the object is of given type. More... | |
![]() | |
status_t | validate () const |
Generates verbose validation of the object. More... | |
const char * | getValidationReport (EValidationSeverity minSeverity=EValidationSeverity_Info) const |
Provides verbose report in human readable form generated by validate. More... | |
const char * | getStatusMessage (status_t status) const |
Get the string description for a status provided by a RAMSES API function. More... | |
StatusObject (const StatusObject &other)=delete | |
Deleted copy constructor. More... | |
StatusObject & | operator= (const StatusObject &other)=delete |
Deleted copy assignment. More... | |
Public Attributes | |
class AnimationSequenceImpl & | impl |
Stores internal data for implementation specifics of AnimationSequence. More... | |
![]() | |
class AnimationObjectImpl & | impl |
![]() | |
class SceneObjectImpl & | impl |
![]() | |
class ClientObjectImpl & | impl |
![]() | |
class RamsesObjectImpl & | impl |
![]() | |
class StatusObjectImpl & | impl |
Protected Member Functions | |
AnimationSequence (AnimationSequenceImpl &pimpl) | |
Constructor of the AnimationSequence. More... | |
AnimationSequence (const AnimationSequence &other) | |
Copy constructor of AnimationSequence. More... | |
AnimationSequence & | operator= (const AnimationSequence &other) |
Assignment operator of AnimationSequence. More... | |
virtual | ~AnimationSequence () |
Destructor of the AnimationSequence. More... | |
![]() | |
AnimationObject (AnimationObjectImpl &pimpl) | |
Constructor for AnimationObject. More... | |
virtual | ~AnimationObject () |
Destructor of the AnimationObject. More... | |
![]() | |
SceneObject (SceneObjectImpl &pimpl) | |
Constructor for SceneObject. More... | |
virtual | ~SceneObject () |
Destructor of the SceneObject. More... | |
![]() | |
ClientObject (ClientObjectImpl &pimpl) | |
Constructor for ClientObject. More... | |
virtual | ~ClientObject () |
Destructor of the ClientObject. More... | |
![]() | |
RamsesObject (RamsesObjectImpl &pimpl) | |
Constructor for RamsesObject. More... | |
virtual | ~RamsesObject () |
Destructor of the RamsesObject. More... | |
![]() | |
StatusObject (StatusObjectImpl &pimpl) | |
Constructor for StatusObject. More... | |
virtual | ~StatusObject () |
Destructor of the StatusObject. More... | |
Friends | |
class | AnimationSystemData |
AnimationSystemData is the factory for creating AnimationSequence. More... | |
The AnimationSequence is a container for multiple animations. AnimationSequence has its own virtual time line where all its animations are put onto with given offsets. The sequence of animations can then be started/stopped altogether.
|
explicitprotected |
Constructor of the AnimationSequence.
[in] | pimpl | Internal data for implementation specifics of AnimationSequence (sink - instance becomes owner) |
|
protected |
Copy constructor of AnimationSequence.
[in] | other | Other instance of AnimationSequence class |
|
protectedvirtual |
Destructor of the AnimationSequence.
status_t ramses::AnimationSequence::addAnimation | ( | const Animation & | animation, |
sequenceTimeStamp_t | startTimeInSequence = 0u , |
||
sequenceTimeStamp_t | stopTimeInSequence = 0u |
||
) |
Add animation to the sequence. Animation will be placed on to sequence time line at given time stamp if provided. The animation must not be added to multiple sequences, otherwise this will result in an undefined behavior.
animation | Animation to be added to sequence. If animation already exists in sequence, only its start/stop time is updated. |
startTimeInSequence | Time stamp for animation to start within sequence time line. By default animation is added to the beginning of sequence. |
stopTimeInSequence | Time stamp for animation to stop within sequence time line. By default animation stops when its last spline key is reached. |
bool ramses::AnimationSequence::containsAnimation | ( | const Animation & | animation | ) | const |
Checks if given animation is in the AnimationSequence.
animation | Animation to check. |
timeMilliseconds_t ramses::AnimationSequence::getAnimationLoopDuration | ( | const Animation & | animation | ) | const |
Gets loop duration for animation. See setAnimationLooping() for meaning of the value.
animation | Animation in sequence for which looping duration has to be returned |
sequenceTimeStamp_t ramses::AnimationSequence::getAnimationSequenceStopTime | ( | ) | const |
Gets the maximum timestamp of all animations in this sequence.
sequenceTimeStamp_t ramses::AnimationSequence::getAnimationStartTimeInSequence | ( | const Animation & | animation | ) | const |
Gives animation start time within the AnimationSequence.
animation | Animation to check. |
sequenceTimeStamp_t ramses::AnimationSequence::getAnimationStopTimeInSequence | ( | const Animation & | animation | ) | const |
Gives animation stop time within the AnimationSequence.
animation | Animation to check. |
uint32_t ramses::AnimationSequence::getNumberOfAnimations | ( | ) | const |
Returns number of animations within the sequence.
float ramses::AnimationSequence::getPlaybackSpeed | ( | ) | const |
Gets sequence current playback speed. See setPlaybackSpeed() for meanings of the values.
bool ramses::AnimationSequence::isAnimationLooping | ( | const Animation & | animation | ) | const |
Returns true if animation is set to loop.
animation | Animation in sequence for which looping state has to be returned |
bool ramses::AnimationSequence::isAnimationRelative | ( | const Animation & | animation | ) | const |
Returns true if animation is set to relative. See setAnimationRelative().
animation | Animation in sequence for which relative state has to be returned |
|
protected |
Assignment operator of AnimationSequence.
[in] | other | Other instance of AnimationSequence class |
Remove animation from sequence.
animation | Animation to be removed from sequence. |
Sets animation absolute. By default animation is absolute, ie. data values from spline keys are directly assigned to animated property.
Note: Changing from relative to absolute animation during playback will cause undefined results.
animation | Animation in sequence for which absolute is to be set |
status_t ramses::AnimationSequence::setAnimationLooping | ( | const Animation & | animation, |
timeMilliseconds_t | loopDuration = 0 |
||
) |
Enables animation looping. When animation reaches last spline key (or loopDuration passes) it begins playback from start. Looping animation can only be stopped by calling stop().
animation | Animation in sequence for which looping is to be set |
loopDuration | Duration of one loop iteration. If 0 one loop iteration equals duration of whole animation (determined from last spline key). |
Sets animation relative. By default animation is absolute, ie. data values from spline keys are directly assigned to animated property. Relative animation takes value of the animated property at the point when animation starts and adds spline key value to it.
Note: Changing from absolute to relative animation during playback will cause undefined results.
animation | Animation in sequence for which relative is to be set |
status_t ramses::AnimationSequence::setPlaybackSpeed | ( | float | playbackSpeed | ) |
Sets sequence playback speed affecting all animations within the sequence. Default sequence playback speed is 1, higher than 1 means faster (2 is double speed), lower than 1 means slower (0.5 is half speed). Zero and negative values are not allowed.
playbackSpeed | Playback speed multiplier. |
status_t ramses::AnimationSequence::start | ( | timeMilliseconds_t | offset = 0 | ) |
Starts the sequence of animations. Offset can be used to postpone start if positive or start sequence from a certain point if negative.
offset | Offset start in milliseconds. |
status_t ramses::AnimationSequence::startAt | ( | globalTimeStamp_t | timeStamp | ) |
Starts the sequence of animations at given time.
timeStamp | Global time stamp for sequence to start. |
status_t ramses::AnimationSequence::startReverse | ( | timeMilliseconds_t | offset = 0 | ) |
Starts the sequence of animations in reverse. Offset can be used to postpone start if positive or start sequence from a certain point if negative.
offset | Offset start in milliseconds. |
status_t ramses::AnimationSequence::startReverseAt | ( | globalTimeStamp_t | timeStamp | ) |
Starts the sequence of animations at given time in reverse.
timeStamp | Global time stamp for sequence to start in reverse. |
status_t ramses::AnimationSequence::stop | ( | timeMilliseconds_t | delay = 0 | ) |
Stops the sequence of animations. Delay can be used to postpone the stop.
delay | Delay stop in milliseconds. |
status_t ramses::AnimationSequence::stopAt | ( | globalTimeStamp_t | timeStamp | ) |
Stops the sequence of animations at given time.
timeStamp | Global time stamp for sequence to stop. |
|
friend |
AnimationSystemData is the factory for creating AnimationSequence.
class AnimationSequenceImpl& ramses::AnimationSequence::impl |
Stores internal data for implementation specifics of AnimationSequence.