All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
MultiWidgets::AnimationClip Class Reference

AnimationClip contains one or more curves that animate different attributes. More...

#include <MultiWidgets/AnimationClip.hpp>

Public Types

enum  WrapMode { ONCE = (1 << 0), LOOP = (1 << 1), PING_PONG = (1 << 2), CLAMP = (1 << 3) }
 AnimationClip wrapping. More...
 

Public Member Functions

 AnimationClip ()
 Construct a new AnimationClip.
 
 AnimationClip (const AnimationClip &clip)
 Construct a copy. More...
 
void clearCurves ()
 Clear all curves from the clip.
 
void evaluate (float t, Valuable::Node &node) const
 Evaluate the animation clip at given point and apply the results to the given node. More...
 
float length () const
 Get the length of the animation clip. More...
 
AnimationClipoperator= (const AnimationClip &clip)
 Copy an animation clip. More...
 
void setCurve (const QByteArray &relativeAttributePath, const IAnimationCurve &curve)
 Specify an animation curve to animate the given attribute. More...
 
void setWrapMode (WrapMode mode)
 Set the wrap mode for the clip. More...
 
WrapMode wrapMode () const
 Get the wrap mode for the clip. More...
 
 ~AnimationClip ()
 Destroy the animation clip. All contained curves are destroyed.
 

Detailed Description

AnimationClip contains one or more curves that animate different attributes.

Examples:
AnimationExample.cpp.

Member Enumeration Documentation

AnimationClip wrapping.

Enumerator
ONCE 

Play once.

LOOP 

Looping playback.

PING_PONG 

Animation is played back and forth.

CLAMP 

Play once and keep the last key frame value.

Constructor & Destructor Documentation

MultiWidgets::AnimationClip::AnimationClip ( const AnimationClip clip)
inline

Construct a copy.

Parameters
clipanimation clip to copy

Member Function Documentation

void MultiWidgets::AnimationClip::evaluate ( float  t,
Valuable::Node node 
) const
inline

Evaluate the animation clip at given point and apply the results to the given node.

Parameters
tpoint to evaluate the curve at
nodenode to apply the results to
float MultiWidgets::AnimationClip::length ( ) const
inline

Get the length of the animation clip.

Returns the length of the longest animation curve.

Returns
length of the animation clip
AnimationClip& MultiWidgets::AnimationClip::operator= ( const AnimationClip clip)
inline

Copy an animation clip.

Parameters
clipanimation clip to copy
Returns
reference to this
void MultiWidgets::AnimationClip::setCurve ( const QByteArray &  relativeAttributePath,
const IAnimationCurve curve 
)
inline

Specify an animation curve to animate the given attribute.

Parameters
relativeAttributePathrelative path to the attribute to animate
curvecurve to animate with
Examples:
AnimationExample.cpp.
void MultiWidgets::AnimationClip::setWrapMode ( WrapMode  mode)
inline

Set the wrap mode for the clip.

Parameters
modewrap mode to set
Examples:
AnimationExample.cpp.
WrapMode MultiWidgets::AnimationClip::wrapMode ( ) const
inline

Get the wrap mode for the clip.

Returns
wrap mode for the clip