RAMSES Documentation  27.0.130
Information for RAMSES users and developers
AnimationSystem.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_ANIMATIONSYSTEM_H
10 #define RAMSES_ANIMATIONSYSTEM_H
11 
15 
16 namespace ramses
17 {
18  class Spline;
19  class SplineStepBool;
20  class SplineStepInt32;
21  class SplineStepFloat;
22  class SplineStepVector2f;
23  class SplineStepVector3f;
24  class SplineStepVector4f;
25  class SplineStepVector2i;
26  class SplineStepVector3i;
27  class SplineStepVector4i;
28  class SplineLinearInt32;
29  class SplineLinearFloat;
30  class SplineLinearVector2f;
31  class SplineLinearVector3f;
32  class SplineLinearVector4f;
33  class SplineLinearVector2i;
34  class SplineLinearVector3i;
35  class SplineLinearVector4i;
36  class SplineBezierInt32;
37  class SplineBezierFloat;
38  class SplineBezierVector2f;
39  class SplineBezierVector3f;
40  class SplineBezierVector4f;
41  class SplineBezierVector2i;
42  class SplineBezierVector3i;
43  class SplineBezierVector4i;
44  class Animation;
45  class AnimationSequence;
46  class Node;
47  class UniformInput;
48  class DataObject;
49  class Appearance;
50  class AnimationObject;
51  class PickableObject;
52 
57  {
58  public:
70 
78 
85  SplineStepBool* createSplineStepBool(const char* name = nullptr);
86 
93  SplineStepInt32* createSplineStepInt32(const char* name = nullptr);
94 
101  SplineStepFloat* createSplineStepFloat(const char* name = nullptr);
102 
109  SplineStepVector2f* createSplineStepVector2f(const char* name = nullptr);
110 
117  SplineStepVector3f* createSplineStepVector3f(const char* name = nullptr);
118 
125  SplineStepVector4f* createSplineStepVector4f(const char* name = nullptr);
126 
133  SplineStepVector2i* createSplineStepVector2i(const char* name = nullptr);
134 
141  SplineStepVector3i* createSplineStepVector3i(const char* name = nullptr);
142 
149  SplineStepVector4i* createSplineStepVector4i(const char* name = nullptr);
150 
157  SplineLinearInt32* createSplineLinearInt32(const char* name = nullptr);
158 
165  SplineLinearFloat* createSplineLinearFloat(const char* name = nullptr);
166 
173  SplineLinearVector2f* createSplineLinearVector2f(const char* name = nullptr);
174 
181  SplineLinearVector3f* createSplineLinearVector3f(const char* name = nullptr);
182 
189  SplineLinearVector4f* createSplineLinearVector4f(const char* name = nullptr);
190 
197  SplineLinearVector2i* createSplineLinearVector2i(const char* name = nullptr);
198 
205  SplineLinearVector3i* createSplineLinearVector3i(const char* name = nullptr);
206 
213  SplineLinearVector4i* createSplineLinearVector4i(const char* name = nullptr);
214 
221  SplineBezierInt32* createSplineBezierInt32(const char* name = nullptr);
222 
229  SplineBezierFloat* createSplineBezierFloat(const char* name = nullptr);
230 
237  SplineBezierVector2f* createSplineBezierVector2f(const char* name = nullptr);
238 
245  SplineBezierVector3f* createSplineBezierVector3f(const char* name = nullptr);
246 
253  SplineBezierVector4f* createSplineBezierVector4f(const char* name = nullptr);
254 
261  SplineBezierVector2i* createSplineBezierVector2i(const char* name = nullptr);
262 
269  SplineBezierVector3i* createSplineBezierVector3i(const char* name = nullptr);
270 
277  SplineBezierVector4i* createSplineBezierVector4i(const char* name = nullptr);
278 
287  Animation* createAnimation(const AnimatedProperty& animatedProperty, const Spline& spline, const char* name = nullptr);
288 
295  AnimationSequence* createAnimationSequence(const char* name = nullptr);
296 
306  status_t destroy(AnimationObject& animationObject);
307 
317  AnimatedProperty* createAnimatedProperty(const Node& propertyOwner, EAnimatedProperty property, EAnimatedPropertyComponent propertyComponent = EAnimatedPropertyComponent_All, const char* name = nullptr);
318 
328  AnimatedProperty* createAnimatedProperty(const UniformInput& propertyOwner, const Appearance& appearance, EAnimatedPropertyComponent propertyComponent = EAnimatedPropertyComponent_All, const char* name = nullptr);
329 
338  AnimatedProperty* createAnimatedProperty(const DataObject& propertyOwner, EAnimatedPropertyComponent propertyComponent = EAnimatedPropertyComponent_All, const char* name = nullptr);
339 
348 
359 
364 
371  const RamsesObject* findObjectByName(const char* name) const;
372 
376  RamsesObject* findObjectByName(const char* name);
377 
381  class AnimationSystemImpl& impl;
382 
383  protected:
387  friend class SceneImpl;
388 
394  explicit AnimationSystem(AnimationSystemImpl& pimpl);
395 
402 
410 
414  virtual ~AnimationSystem();
415  };
416 }
417 
418 #endif
#define RAMSES_API
Definition: APIExport.h:35
The AnimatedProperty holds a reference to data that can be animated.
Definition: AnimatedProperty.h:20
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
The AnimationSystem holds all animation related data.
Definition: AnimationSystem.h:57
Animation * getFinishedAnimationSincePreviousUpdate(uint32_t index)
Get animation that was finished in current update round. The animation system collects finished anima...
AnimationSequence * createAnimationSequence(const char *name=nullptr)
Creates AnimationSequence that can hold references to multiple animations and control them together.
RamsesObject * findObjectByName(const char *name)
Get an object from the animation system by name.
SplineLinearVector4i * createSplineLinearVector4i(const char *name=nullptr)
Creates a spline in this animation system using Vector4i data type and linear interpolation.
AnimationSystem(const AnimationSystem &other)
Copy constructor of animation system.
SplineBezierVector2f * createSplineBezierVector2f(const char *name=nullptr)
Creates a spline in this animation system using Vector2f data type and Bezier interpolation.
SplineBezierVector4i * createSplineBezierVector4i(const char *name=nullptr)
Creates a spline in this animation system using Vector4i data type and Bezier interpolation.
const Animation * getFinishedAnimationSincePreviousUpdate(uint32_t index) const
Get animation that was finished in current update round. The animation system collects finished anima...
SplineLinearFloat * createSplineLinearFloat(const char *name=nullptr)
Creates a spline in this animation system using float data type and linear interpolation.
SplineLinearVector3i * createSplineLinearVector3i(const char *name=nullptr)
Creates a spline in this animation system using Vector3i data type and linear interpolation.
SplineBezierVector4f * createSplineBezierVector4f(const char *name=nullptr)
Creates a spline in this animation system using Vector4f data type and Bezier interpolation.
SplineStepVector4f * createSplineStepVector4f(const char *name=nullptr)
Creates a spline in this animation system using Vector4f data type and step interpolation.
SplineStepVector4i * createSplineStepVector4i(const char *name=nullptr)
Creates a spline in this animation system using Vector4i data type and step interpolation.
SplineStepVector3i * createSplineStepVector3i(const char *name=nullptr)
Creates a spline in this animation system using Vector3i data type and step interpolation.
virtual ~AnimationSystem()
Destructor of the animation system.
SplineLinearVector2f * createSplineLinearVector2f(const char *name=nullptr)
Creates a spline in this animation system using Vector2f data type and linear interpolation.
SplineLinearVector4f * createSplineLinearVector4f(const char *name=nullptr)
Creates a spline in this animation system using Vector4f data type and linear interpolation.
SplineLinearInt32 * createSplineLinearInt32(const char *name=nullptr)
Creates a spline in this animation system using int32_t data type and linear interpolation.
AnimatedProperty * createAnimatedProperty(const Node &propertyOwner, EAnimatedProperty property, EAnimatedPropertyComponent propertyComponent=EAnimatedPropertyComponent_All, const char *name=nullptr)
Create a new animated property for Node.
SplineBezierInt32 * createSplineBezierInt32(const char *name=nullptr)
Creates a spline in this animation system using int32_t data type and Bezier interpolation.
SplineBezierFloat * createSplineBezierFloat(const char *name=nullptr)
Creates a spline in this animation system using float data type and Bezier interpolation.
globalTimeStamp_t getTime() const
Gets the current animation system time. The time stamp retrieved is the time stamp that was previousl...
const RamsesObject * findObjectByName(const char *name) const
Get an object from the animation system by name.
Animation * createAnimation(const AnimatedProperty &animatedProperty, const Spline &spline, const char *name=nullptr)
Creates Animation that can animate given property using given spline.
SplineStepFloat * createSplineStepFloat(const char *name=nullptr)
Creates a spline in this animation system using float data type and step interpolation.
SplineBezierVector2i * createSplineBezierVector2i(const char *name=nullptr)
Creates a spline in this animation system using Vector2i data type and Bezier interpolation.
SplineStepBool * createSplineStepBool(const char *name=nullptr)
Creates a spline in this animation system using bool data type and step interpolation.
SplineStepInt32 * createSplineStepInt32(const char *name=nullptr)
Creates a spline in this animation system using int32_t data type and step interpolation.
SplineLinearVector3f * createSplineLinearVector3f(const char *name=nullptr)
Creates a spline in this animation system using Vector3f data type and linear interpolation.
AnimationSystem & operator=(const AnimationSystem &other)
Assignment operator of animation system.
AnimatedProperty * createAnimatedProperty(const DataObject &propertyOwner, EAnimatedPropertyComponent propertyComponent=EAnimatedPropertyComponent_All, const char *name=nullptr)
Create a new animated property for a DataObject.
SplineBezierVector3i * createSplineBezierVector3i(const char *name=nullptr)
Creates a spline in this animation system using Vector3i data type and Bezier interpolation.
SplineStepVector2i * createSplineStepVector2i(const char *name=nullptr)
Creates a spline in this animation system using Vector2i data type and step interpolation.
SplineStepVector2f * createSplineStepVector2f(const char *name=nullptr)
Creates a spline in this animation system using Vector2f data type and step interpolation.
uint32_t getNumberOfFinishedAnimationsSincePreviousUpdate() const
Get number of animations that were finished in current update round. The animation system collects fi...
status_t destroy(AnimationObject &animationObject)
Release an animation system object and its data. The object must be owned by this animation system....
AnimatedProperty * createAnimatedProperty(const UniformInput &propertyOwner, const Appearance &appearance, EAnimatedPropertyComponent propertyComponent=EAnimatedPropertyComponent_All, const char *name=nullptr)
Create a new animated property for Appearance's input.
SplineStepVector3f * createSplineStepVector3f(const char *name=nullptr)
Creates a spline in this animation system using Vector3f data type and step interpolation.
status_t setTime(globalTimeStamp_t timeStamp)
Sets the animation system to a given time. Any unsigned integral values that are used in an increment...
AnimationSystem(AnimationSystemImpl &pimpl)
Constructor of the animation system.
SplineBezierVector3f * createSplineBezierVector3f(const char *name=nullptr)
Creates a spline in this animation system using Vector3f data type and Bezier interpolation.
SplineLinearVector2i * createSplineLinearVector2i(const char *name=nullptr)
Creates a spline in this animation system using Vector2i data type and linear interpolation.
class AnimationSystemImpl & impl
Definition: AnimationSystem.h:381
The Animation combines spline with one or more AnimatedProperty instances and allows control of the a...
Definition: Animation.h:22
The Appearance describes how an object should look like. This includes GLSL uniform values,...
Definition: Appearance.h:34
The DataObject is a base class for data container for storing data in a scene.
Definition: DataObject.h:29
The Node is the base class of all nodes and provides scene graph functionality which propagates to it...
Definition: Node.h:23
The RamsesObject is a base class for all client API objects owned by the framework.
Definition: RamsesObject.h:21
The SceneObject is a base class for all client API objects owned by a Scene.
Definition: SceneObject.h:20
The SplineBezierFloat stores spline keys of type float that can be used for animation with Bezier int...
Definition: SplineBezierFloat.h:21
The SplineBezierInt32 stores spline keys of type int32_t that can be used for animation with Bezier i...
Definition: SplineBezierInt32.h:21
The SplineBezierVector2f stores spline keys of type Vector2f that can be used for animation with Bezi...
Definition: SplineBezierVector2f.h:21
The SplineBezierVector2i stores spline keys of type Vector2i that can be used for animation with Bezi...
Definition: SplineBezierVector2i.h:21
The SplineBezierVector3f stores spline keys of type Vector3f that can be used for animation with Bezi...
Definition: SplineBezierVector3f.h:21
The SplineBezierVector3i stores spline keys of type Vector3i that can be used for animation with Bezi...
Definition: SplineBezierVector3i.h:21
The SplineBezierVector4f stores spline keys of type Vector4f that can be used for animation with Bezi...
Definition: SplineBezierVector4f.h:21
The SplineBezierVector4i stores spline keys of type Vector4i that can be used for animation with Bezi...
Definition: SplineBezierVector4i.h:21
The SplineLinearFloat stores spline keys of type float that can be used for animation with linear int...
Definition: SplineLinearFloat.h:21
The SplineLinearInt32 stores spline keys of type int32_t that can be used for animation with linear i...
Definition: SplineLinearInt32.h:21
The SplineLinearVector2f stores spline keys of type Vector2f that can be used for animation with line...
Definition: SplineLinearVector2f.h:21
The SplineLinearVector2i stores spline keys of type Vector2i that can be used for animation with line...
Definition: SplineLinearVector2i.h:21
The SplineLinearVector3f stores spline keys of type Vector3f that can be used for animation with line...
Definition: SplineLinearVector3f.h:21
The SplineLinearVector3i stores spline keys of type Vector3i that can be used for animation with line...
Definition: SplineLinearVector3i.h:21
The SplineLinearVector4f stores spline keys of type Vector4f that can be used for animation with line...
Definition: SplineLinearVector4f.h:21
The SplineLinearVector4i stores spline keys of type Vector4i that can be used for animation with line...
Definition: SplineLinearVector4i.h:21
The SplineStepBool stores spline keys of type bool that can be used for animation with step interpola...
Definition: SplineStepBool.h:21
The SplineStepFloat stores spline keys of type float that can be used for animation with step interpo...
Definition: SplineStepFloat.h:21
The SplineStepInt32 stores spline keys of type int32_t that can be used for animation with step inter...
Definition: SplineStepInt32.h:21
The SplineStepVector2f stores spline keys of type Vector2f that can be used for animation with step i...
Definition: SplineStepVector2f.h:21
The SplineStepVector2i stores spline keys of type Vector2i that can be used for animation with step i...
Definition: SplineStepVector2i.h:21
The SplineStepVector3f stores spline keys of type Vector3f that can be used for animation with step i...
Definition: SplineStepVector3f.h:21
The SplineStepVector3i stores spline keys of type Vector3i that can be used for animation with step i...
Definition: SplineStepVector3i.h:21
The SplineStepVector4f stores spline keys of type Vector4f that can be used for animation with step i...
Definition: SplineStepVector4f.h:21
The SplineStepVector4i stores spline keys of type Vector4i that can be used for animation with step i...
Definition: SplineStepVector4i.h:21
The Spline is a set of keys describing an animation.
Definition: Spline.h:20
The UniformInput is a description of an uniform effect input.
Definition: UniformInput.h:22
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
EAnimatedPropertyComponent
Vector component ID for binding single/multi component data.
Definition: AnimatedProperty.h:65
@ EAnimatedPropertyComponent_All
Definition: AnimatedProperty.h:70
EAnimatedProperty
Property to animate for objects that have more than one property that can be animated.
Definition: AnimatedProperty.h:75
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