class RED::AnimationData

Base data for animation. More...

#include <REDAnimationData.h>

Inherits: Object.

Public functions:

AnimationData ( )
voidAdd ( const AnimationData & iData1, const AnimationData & iData2, double iWeight )
virtual void *As ( const RED::CID & iCID )
template< class T_As > const T_As *As ( ) const
virtual const void *As ( const RED::CID & iCID ) const
template< class T_As > T_As *As ( )
voidBlend ( const AnimationData & iData1, const AnimationData & iData2, double iWeight )
voidGetMatrix ( RED::Matrix & oMatrix ) const
voidSetNeutral ( )
voidSetPosition ( const RED::Vector3 & iPosition )
voidSetPosition ( double iX, double iY, double iZ )
voidSetRotation ( double iX, double iY, double iZ, double iW )
voidSetRotation ( const RED::Quaternion & iRotation )
voidSetScale ( const RED::Vector3 & iScale )
voidSetScale ( double iX, double iY, double iZ )
voidSub ( const AnimationData & iData1, const AnimationData & iData2, double iWeight )

Public static functions:

static RED::CIDGetClassID ( )

Public variables:

double_position [3]
double_rotation [4]
double_scale [3]

Detailed description:

Base data for animation.

Animation data is composed of:

This class provides functions for blending used in the RED animation system:

An animation data can be converted to a RED::Matrix using the RED::AnimationData::GetMatrix function.

Functions documentation

Default constructor.

public void RED::AnimationData::Add(const AnimationData &iData1,
const AnimationData &iData2,
doubleiWeight
)

Sets the animation data as an addition of two other data.

The Addition operation performs interpolations between iData1 and iData1 + iData2.

Parameters:

iData1:the first data.
iData2:the second data.
iWeight:the blending weight between 0 and 1 (0 = iData1, 1 = iData1 + iData2)
public virtual void * RED::AnimationData::As(const RED::CID &iCID)

Converts the object to an instance of the given type.

Parameters:

iCID:Requested class.

Returns:

An object pointer of the given class on success, NULL otherwise.

Reimplements: RED::Object::As.

template< class T_As > public const T_As * RED::AnimationData::As() const

Template version of the as const method.

Simply set T to be the class you want to retrieve an interface to.

Returns:

A pointer to a const instance of class T on success, NULL otherwise.

Reimplements: RED::Object::As.

public virtual const void * RED::AnimationData::As(const RED::CID &iCID) const

Converts the object to an instance of the given type.

Parameters:

iCID:Requested class.

Returns:

An object pointer of the given class on success, NULL otherwise.

Reimplements: RED::Object::As.

template< class T_As > public T_As * RED::AnimationData::As()

Template version of the as method.

Simply set T to be the class you want to retrieve an interface to.

Returns:

A pointer to an instance of class T on success, NULL otherwise.

Reimplements: RED::Object::As.

public void RED::AnimationData::Blend(const AnimationData &iData1,
const AnimationData &iData2,
doubleiWeight
)

Sets the animation data as a blend between two other data.

The blending operation performs interpolations between iData1 and iData2.

Parameters:

iData1:the first data.
iData2:the second data.
iWeight:the blending weight between 0 and 1 (0 = iData1, 1 = iData2)
public void RED::AnimationData::GetMatrix(RED::Matrix &oMatrix) const

Gets the transform matrix corresponding to the animation data.

Parameters:

oMatrix:returned transform matrix.

Sets the neutral transform (no position, rotation or scale).

public void RED::AnimationData::SetPosition(const RED::Vector3 &iPosition)

Sets the position.

Parameters:

iPosition:Position.
public void RED::AnimationData::SetPosition(doubleiX,
doubleiY,
doubleiZ
)

Sets the position from coordinates.

Parameters:

iX:Position x coordinate.
iY:Position y coordinate.
iZ:Position z coordinate.
public void RED::AnimationData::SetRotation(doubleiX,
doubleiY,
doubleiZ,
doubleiW
)

Sets the rotation from quaternion values.

Parameters:

iX:Quaternion x coordinate.
iY:Quaternion y coordinate.
iZ:Quaternion z coordinate.
iW:Quaternion w coordinate.
public void RED::AnimationData::SetRotation(const RED::Quaternion &iRotation)

Sets the rotation.

Parameters:

iRotation:Rotation as a quaternion.
public void RED::AnimationData::SetScale(const RED::Vector3 &iScale)

Sets the scale.

Parameters:

iScale:Scale.
public void RED::AnimationData::SetScale(doubleiX,
doubleiY,
doubleiZ
)

Sets the scale from coordinates.

Parameters:

iX:Scale x coordinate.
iY:Scale y coordinate.
iZ:Scale z coordinate.
public void RED::AnimationData::Sub(const AnimationData &iData1,
const AnimationData &iData2,
doubleiWeight
)

Sets the animation data as a substraction of two other data.

The Substraction operation performs interpolations between iData1 and iData1 - iData2.

Parameters:

iData1:the first data.
iData2:the second data.
iWeight:the blending weight between 0 and 1 (0 = iData1, 1 = iData1 - iData2)

Variables documentation

Position.

Quaternion rotation.

Scale.