GlsAnimation Library  1.0.5
Provides classes and functions to support animating GL Studio objects programmatically or with script files
Public Types | Public Member Functions | List of all members
disti::GlsKeyframeAnimation Class Reference

#include <gls_animation.h>

Inheritance diagram for disti::GlsKeyframeAnimation:
disti::GlsAnimation

Public Types

typedef stdortr1::shared_ptr< GlsKeyframeAnimationPtr
 Alias for easier reading.
 
- Public Types inherited from disti::GlsAnimation
typedef stdortr1::shared_ptr< GlsAnimationPtr
 Alias for easier reading.
 
typedef GlsKeyframeCurveBase::Key Key
 Alias for easier reading.
 
typedef GlsKeyframeCurveBase::KeyPair KeyPair
 Alias for easier reading.
 
typedef GlsKeyframeCurveBase::Size Size
 Alias for easier reading.
 

Public Member Functions

 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< double > *keyframeCurve)
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< Vector > *keyframeCurve)
 Constructor – See first constructor description.
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< GlsQuaternionD > *keyframeCurve)
 Constructor – See first constructor description.
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< std::string > *keyframeCurve)
 Constructor – See first constructor description.
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< glsColor > *keyframeCurve)
 Constructor – See first constructor description.
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< double >::PtrConst &keyframeCurve)
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< Vector >::PtrConst &keyframeCurve)
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< GlsQuaternionD >::PtrConst &keyframeCurve)
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< std::string >::PtrConst &keyframeCurve)
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< glsColor >::PtrConst &keyframeCurve)
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< double >::Ptr &keyframeCurve)
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< Vector >::Ptr &keyframeCurve)
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< GlsQuaternionD >::Ptr &keyframeCurve)
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< std::string >::Ptr &keyframeCurve)
 
 GlsKeyframeAnimation (const std::string &name, const std::string &propertyName, const GlsKeyframeCurve< glsColor >::Ptr &keyframeCurve)
 
bool SetDisplayFrame (DisplayFrame *displayFrame)
 
bool IsReadyToAnimate () const
 Override from GlsAnimation.
 
Key GetKey () const
 Override from GlsAnimation.
 
void SetKey (const Key &key)
 Override from GlsAnimation.
 
Key GetKeyRange () const
 Override from GlsAnimation.
 
KeyPair GetMinMaxKeys () const
 Override from GlsAnimation.
 
void Reset ()
 Override from GlsAnimation.
 
GlsAnimation::Ptr Clone () const
 Override from GlsAnimation.
 
std::vector< std::string > GetPropertyNames () const
 Override from GlsAnimation.
 
void RetargetPropertyNames (const std::vector< std::string > &propertyNames)
 Override from GlsAnimation.
 
void RetargetPropertyNames (const std::string &findStr, const std::string &replaceStr)
 Override from GlsAnimation.
 
Size CountPropertyNames () const
 Override from GlsAnimation.
 
- Public Member Functions inherited from disti::GlsAnimation
virtual ~GlsAnimation ()
 Destructor.
 
virtual void SetKey (const Key &key)=0
 
const std::string & GetName () const
 Returns the given name of this animation sequence.
 

Additional Inherited Members

- Protected Member Functions inherited from disti::GlsAnimation
 GlsAnimation (const std::string &name)
 Constructor - for base classes only.
 
- Protected Attributes inherited from disti::GlsAnimation
DisplayFrame * _displayFrame
 The display frame used for retargeting.
 

Detailed Description

The GlsKeyframeAnimation class wraps up a GL Studio property and a keyframe curve to animate it.

Note
Some properties are not accessible to animation by this class by default. To turn on their values at runtime, check the appropriate boxes in the Runtime Attributes tab of GL Studio's Resources window.
The units for the key are usually time and run from 0 to some max time value.

Constructor & Destructor Documentation

disti::GlsKeyframeAnimation::GlsKeyframeAnimation ( const std::string &  name,
const std::string &  propertyName,
const GlsKeyframeCurve< double > *  keyframeCurve 
)

Constructor

Parameters
nameThe name of the animation sequence
propertyNameThe name of the property in the design to modify with this curve using the resources API. For example, "Location" will modify the Vector that handles the object's position. "SomeComponent.SomeObject.Visible" will modify.
keyframeCurveThe keyframe curve is a set of keyframes that will be interpolated as the animation is advanced.
Note
The animation object takes ownership of the keyframeCurve or shares ownership if a shared_ptr.
The property name must be valid and the keyframe type correct, or the animation will not execute properly.
Unlike some other colors, the fill color is defined as part of vertex properties rather than as its own property. To set the fill color for all vertices in code, the user can call "displayObj->SetFillColor( color )". To simulate this effect as a property name this class supports a special "FillColor" pseudo-property. So for a property name like "poly1.FillColor" the effect is the same as if the user had called poly1->SetFillColor( color ). If the object being modified by the script has a custom class that has added a "FillColor" property that does something else, this may not work properly.
Precondition
keyFrameCurve->GetKeyframeCount() > 0 to have a valid curve
disti::GlsKeyframeAnimation::GlsKeyframeAnimation ( const std::string &  name,
const std::string &  propertyName,
const GlsKeyframeCurve< double >::PtrConst &  keyframeCurve 
)

Constructor – See first constructor description

Note
This constructor allows shared ownership of the curve for re-use across multiple animations.
disti::GlsKeyframeAnimation::GlsKeyframeAnimation ( const std::string &  name,
const std::string &  propertyName,
const GlsKeyframeCurve< Vector >::PtrConst &  keyframeCurve 
)

Constructor – See first constructor description

Note
This constructor allows shared ownership of the curve for re-use across multiple animations.
disti::GlsKeyframeAnimation::GlsKeyframeAnimation ( const std::string &  name,
const std::string &  propertyName,
const GlsKeyframeCurve< GlsQuaternionD >::PtrConst &  keyframeCurve 
)

Constructor – See first constructor description

Note
This constructor allows shared ownership of the curve for re-use across multiple animations.
disti::GlsKeyframeAnimation::GlsKeyframeAnimation ( const std::string &  name,
const std::string &  propertyName,
const GlsKeyframeCurve< std::string >::PtrConst &  keyframeCurve 
)

Constructor – See first constructor description

Note
This constructor allows shared ownership of the curve for re-use
disti::GlsKeyframeAnimation::GlsKeyframeAnimation ( const std::string &  name,
const std::string &  propertyName,
const GlsKeyframeCurve< glsColor >::PtrConst &  keyframeCurve 
)

Constructor – See first constructor description

Note
This constructor allows shared ownership of the curve for re-use across multiple animations.
disti::GlsKeyframeAnimation::GlsKeyframeAnimation ( const std::string &  name,
const std::string &  propertyName,
const GlsKeyframeCurve< double >::Ptr keyframeCurve 
)

Constructor – See first constructor description

Note
This constructor allows shared ownership of the curve for re-use across multiple animations.
disti::GlsKeyframeAnimation::GlsKeyframeAnimation ( const std::string &  name,
const std::string &  propertyName,
const GlsKeyframeCurve< Vector >::Ptr keyframeCurve 
)

Constructor – See first constructor description

Note
This constructor allows shared ownership of the curve for re-use across multiple animations.
disti::GlsKeyframeAnimation::GlsKeyframeAnimation ( const std::string &  name,
const std::string &  propertyName,
const GlsKeyframeCurve< GlsQuaternionD >::Ptr keyframeCurve 
)

Constructor – See first constructor description

Note
This constructor allows shared ownership of the curve for re-use across multiple animations.
disti::GlsKeyframeAnimation::GlsKeyframeAnimation ( const std::string &  name,
const std::string &  propertyName,
const GlsKeyframeCurve< std::string >::Ptr keyframeCurve 
)

Constructor – See first constructor description

Note
This constructor allows shared ownership of the curve for re-use
disti::GlsKeyframeAnimation::GlsKeyframeAnimation ( const std::string &  name,
const std::string &  propertyName,
const GlsKeyframeCurve< glsColor >::Ptr keyframeCurve 
)

Constructor – See first constructor description

Note
This constructor allows shared ownership of the curve for re-use across multiple animations.

Member Function Documentation

bool disti::GlsKeyframeAnimation::SetDisplayFrame ( DisplayFrame *  displayFrame)
virtual

Override from GlsAnimation

Returns
True indicates that the given attribute exists in the display frame, and false indicates that it did not and that SetKey() will not animate the property.

Implements disti::GlsAnimation.


The documentation for this class was generated from the following files: