RAMSES Documentation  27.0.130
Information for RAMSES users and developers
AnimationSequence.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2014 BMW Car IT GmbH
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_ANIMATIONSEQUENCE_H
10 #define RAMSES_ANIMATIONSEQUENCE_H
11 
14 
15 namespace ramses
16 {
17  class Animation;
18 
26  {
27  public:
39  status_t addAnimation(const Animation& animation, sequenceTimeStamp_t startTimeInSequence = 0u, sequenceTimeStamp_t stopTimeInSequence = 0u);
40 
48  status_t removeAnimation(const Animation& animation);
49 
60 
69 
80 
89 
99 
108 
119  status_t setPlaybackSpeed(float playbackSpeed);
120 
127  float getPlaybackSpeed() const;
128 
143 
156 
168  status_t setAnimationLooping(const Animation& animation, timeMilliseconds_t loopDuration = 0);
169 
177  bool isAnimationRelative(const Animation& animation) const;
178 
185  bool isAnimationLooping(const Animation& animation) const;
186 
195 
201  uint32_t getNumberOfAnimations() const;
202 
209  bool containsAnimation(const Animation& animation) const;
210 
219 
228 
235 
239  class AnimationSequenceImpl& impl;
240 
241  protected:
245  friend class AnimationSystemData;
246 
252  explicit AnimationSequence(AnimationSequenceImpl& pimpl);
253 
260 
268 
273 
274  };
275 }
276 
277 #endif
#define RAMSES_API
Definition: APIExport.h:35
The AnimationObject is a base class for all client API objects owned by an AnimationSystem.
Definition: AnimationObject.h:20
The AnimationSequence is a container for multiple animations. AnimationSequence has its own virtual t...
Definition: AnimationSequence.h:26
virtual ~AnimationSequence()
Destructor of the AnimationSequence.
float getPlaybackSpeed() const
Gets sequence current playback speed. See setPlaybackSpeed() for meanings of the values.
status_t start(timeMilliseconds_t offset=0)
Starts the sequence of animations. Offset can be used to postpone start if positive or start sequence...
AnimationSequence & operator=(const AnimationSequence &other)
Assignment operator of AnimationSequence.
class AnimationSequenceImpl & impl
Stores internal data for implementation specifics of AnimationSequence.
Definition: AnimationSequence.h:239
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 ...
sequenceTimeStamp_t getAnimationStopTimeInSequence(const Animation &animation) const
Gives animation stop time within the AnimationSequence.
status_t setPlaybackSpeed(float playbackSpeed)
Sets sequence playback speed affecting all animations within the sequence. Default sequence playback ...
timeMilliseconds_t getAnimationLoopDuration(const Animation &animation) const
Gets loop duration for animation. See setAnimationLooping() for meaning of the value.
uint32_t getNumberOfAnimations() const
Returns number of animations within the sequence.
bool isAnimationLooping(const Animation &animation) const
Returns true if animation is set to loop.
bool containsAnimation(const Animation &animation) const
Checks if given animation is in the AnimationSequence.
status_t stopAt(globalTimeStamp_t timeStamp)
Stops the sequence of animations at given time.
status_t startReverse(timeMilliseconds_t offset=0)
Starts the sequence of animations in reverse. Offset can be used to postpone start if positive or sta...
status_t setAnimationAbsolute(const Animation &animation)
Sets animation absolute. By default animation is absolute, ie. data values from spline keys are direc...
status_t startReverseAt(globalTimeStamp_t timeStamp)
Starts the sequence of animations at given time in reverse.
status_t setAnimationLooping(const Animation &animation, timeMilliseconds_t loopDuration=0)
Enables animation looping. When animation reaches last spline key (or loopDuration passes) it begins ...
bool isAnimationRelative(const Animation &animation) const
Returns true if animation is set to relative. See setAnimationRelative().
status_t setAnimationRelative(const Animation &animation)
Sets animation relative. By default animation is absolute, ie. data values from spline keys are direc...
sequenceTimeStamp_t getAnimationSequenceStopTime() const
Gets the maximum timestamp of all animations in this sequence.
AnimationSequence(AnimationSequenceImpl &pimpl)
Constructor of the AnimationSequence.
status_t removeAnimation(const Animation &animation)
Remove animation from sequence.
status_t stop(timeMilliseconds_t delay=0)
Stops the sequence of animations. Delay can be used to postpone the stop.
sequenceTimeStamp_t getAnimationStartTimeInSequence(const Animation &animation) const
Gives animation start time within the AnimationSequence.
status_t startAt(globalTimeStamp_t timeStamp)
Starts the sequence of animations at given time.
AnimationSequence(const AnimationSequence &other)
Copy constructor of AnimationSequence.
The Animation combines spline with one or more AnimatedProperty instances and allows control of the a...
Definition: Animation.h:22
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
uint32_t status_t
Status is a handle to the result of an API call.
Definition: RamsesFrameworkTypes.h:26
uint64_t globalTimeStamp_t
Definition: AnimationTypes.h:17
int64_t timeMilliseconds_t
Definition: AnimationTypes.h:16
uint32_t sequenceTimeStamp_t
Definition: AnimationTypes.h:19