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

#include <gls_animation.h>

Inheritance diagram for disti::GlsAnimationSubsetAdapter:
disti::GlsAnimation

Public Member Functions

 GlsAnimationSubsetAdapter (const std::string &name, GlsAnimation *animation, const KeyPair &clampLimits, const KeyPair &newMinMax=s_nanPair)
 
 GlsAnimationSubsetAdapter (const std::string &name, const GlsAnimation::Ptr &animation, const KeyPair &clampLimits, const KeyPair &newMinMax=s_nanPair)
 
bool SetDisplayFrame (DisplayFrame *displayFrame)
 Override from GlsAnimation.
 
bool IsReadyToAnimate () const
 Override from GlsAnimation.
 
Key GetKey () const
 
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.
 
virtual std::vector< std::string > GetPropertyNames () const
 Override from GlsAnimation.
 
virtual void RetargetPropertyNames (const std::vector< std::string > &propertyNames)
 Override from GlsAnimation.
 
virtual void RetargetPropertyNames (const std::string &findStr, const std::string &replaceStr)
 Override from GlsAnimation.
 
GlsAnimation::Ptr Clone () const
 Override from GlsAnimation.
 
Size CountPropertyNames () const
 Override from GlsAnimation.
 
- Public Member Functions inherited from disti::GlsAnimation
virtual ~GlsAnimation ()
 Destructor.
 
const std::string & GetName () const
 Returns the given name of this animation sequence.
 

Static Public Attributes

static const KeyPair s_nanPair = std::make_pair( Detail::g_nan, Detail::g_nan )
 Default value for remapping constructor parameter.
 

Additional Inherited Members

- 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.
 
- 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

An adapter class to limit an animation to a subset of its total key range and/or remap the key range. For instance, if the keys go from 1 to 10 and the begin and end clamp values are 3 and 7, the animation will behave as if its min/max keys are 3 and 7 (interpolating the values for those keys from the original animation as necessary). The optional second set of keys remaps the clamped range, so 3 to 7 in the above example could be remapped to something like 0 to 1.

Constructor & Destructor Documentation

disti::GlsAnimationSubsetAdapter::GlsAnimationSubsetAdapter ( const std::string &  name,
GlsAnimation animation,
const KeyPair clampLimits,
const KeyPair newMinMax = s_nanPair 
)
inline

Constructor

Parameters
nameThe name of this animation
animationThe animation to clamp. The adapter takes ownership of the animation.
clampLimitsThe key where the subset of the animation starts and ends. These values will be clamped within the original bounds of the animation's range.
newMinMaxThe new key range that this animation will respond to. The newMinMax.first will map to clampLimits.first and newMinMax.second to clampLimits.second.
Precondition
animation != 0
clampLimits.first <= clampLimits.second
newMinMax.first <= newMinMax.second || newMinMax is (NaN,NaN)
disti::GlsAnimationSubsetAdapter::GlsAnimationSubsetAdapter ( const std::string &  name,
const GlsAnimation::Ptr animation,
const KeyPair clampLimits,
const KeyPair newMinMax = s_nanPair 
)
inline

Constructor

Parameters
nameThe name of this animation
animationThe animation to clamp.
clampLimitsThe key where the subset of the animation starts and ends. These values will be clamped within the original bounds of the animation's range.
newMinMaxThe new key range that this animation will respond to. The newMinMax.first will map to clampLimits.first and newMinMax.second to clampLimits.second. If omitted (or NaN), no remapping of the clamped limits is performed.
Precondition
animation != 0
clampLimits.first <= clampLimits.second
newMinMax.first <= newMinMax.second || newMinMax is (NaN,NaN)

Member Function Documentation

Key disti::GlsAnimationSubsetAdapter::GetKey ( ) const
inlinevirtual

Override from GlsAnimation

Note
The key returned is the same as the key that was set, not the clamped or remapped key.

Implements disti::GlsAnimation.


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