IFXMotionResource

The IFXMotionResource interface is used to access animation data stored in separate tracks, with each track corresponding to the animation of one bone.

Interface Methods

Description

GetTrackCount

Gets the number of tracks

FindTrack

Finds the track index with a specific name

AddTrack

Adds a new track by name

GetTrackName

Gets the name of a track

ClearTrack

Removes all keyframes from a track

FilterAndCompress

Removes redundant data

InsertKeyFrames

Adds keyframes to a track

GetKeyFrameCount

Gets a specified number of keyframes from a track

GetKeyFrames

Gets key frames from track

GetInterpolatedFrame

Gets a frame from track

GetDuration

Gets the overall duration of all the tracks in the motion

GetDuration

Gets the duration of a single indexed track

GetSceneGraph

Gets a pointer to the scenegraph

GetMotionRef

Accesses the IFXMotion directly


IFXMotionResource::GetTrackCount(U32 *puTrackCount)

This method gets the number of tracks.

Parameters:

*puTrackCount

Pointer to the variable set counting the number of tracks

Return Values


IFXMotionResource::FindTrack(CIFXString *pTrackName, U32 *puTrackID)

This method finds the track index with a specific name.

Parameters:

*pTrackName

Pointer to the name of the track

*puTrackID

Pointer to the track ID number

Return Values


IFXMotionResource::AddTrack(CIFXString *pTrackName, U32 *puTrackID)

This methods adds a new track by name. The track index is returned.

Parameters:

*pTrackName

Pointer to the name of the new track

*puTrackID

Pointer to the new track ID number

Return Values


IFXMotionResource::GetTrackName(U32 uTrackID, CIFXString *pTrackName)

This method gets the name of a track.

Parameters:

uTrackID

Track ID number

*pTrackName

Pointer to the track name

Return Values


IFXMotionResource::ClearTrack(U32 uTrackID)

This method removes all keyframes from a track.

Parameters:

uTrackID

Track ID number

Return Values


IFXMotionResource::FilterAndCompress(F32 deltatime=0.01f,F2 deltalocation=0.01f,F32 deltarotation=0.001f)

This method removes redundant data.

Parameters:

deltatime=0.01f

Time data. Defaults to 0.01 if not specified.

deltalocation=0.01f

Location data. Defaults to 0.01 if not specified.

deltarotation=0.001f

Rotation data. Defaults to 0.01 if not specified.

Return Values


IFXMotionResource::InsertKeyFrames(U32 uTrackID,U32 uKeyFrameCount,IFXKeyFrame *pKeyFrameArray)

This method adds keyframes to a track.

Parameters:

uTrackID

Track ID number

uKeyFrameCount

Number of keyframes

*pKeyFrameArray

Pointer to the keyframe array

Return Values


IFXMotionResource::GetKeyFrameCount(U32 uTrackID, U32 *puKeyFrameCount)

This method gets key frames from a track.

Parameters:

uTrackID

Track ID number

*puKeyFrameCount

Pointer to the variable set for the total number of keyframes

Return Values


IFXMotionResource::GetKeyFrames(U32 uTrackID,U32 uKeyFrameStart,U32 uKeyFrameCount,IFXKeyFrame *pKeyFrameArray)

This method gets a specified number of keyframes from a track starting with a specified index. The pre-allocated size of the array should equal the requested number of keyframes.

Parameters:

uTrackID

Track ID number

uKeyFrameStart

Keyframe number of the first keyframe

uKeyFrameCount

The total number of keyframes

*pKeyFrameArray

Pointer to the array of keyframes

Return Values


IFXMotionResource::GetInterpolatedFrame(U32 uTrackID,F32 fTime,IFXKeyFrame *pKeyFrame)

This method gets a frame from track (not necessarily a keyframe). The frame which is returned will have an interpolated rotation and displacement if there is no keyframe for the input time.

Parameters:

uTrackID

Track ID number

fTime

Amount of time the track runs

*pKeyFrame

Pointer to the IFXKeyFrame

Return Values


IFXMotionResource::GetDuration(F32* pOutDuration)

This method gets the overall duration of all the tracks in the motion.

Parameters:

pOutDuration

Pointer to the amount of time all the tracks run

Return Values


IFXMotionResource::GetDuration(U32 uTrackID, F32* pOutDuration)

This method gets the duration of a single indexed track.

Parameters:

uTrackID

Track ID number

pOutDuration

Pointer to the amount of time the track runs

Return Values


IFXMotionResource::GetSceneGraph(IFXSceneGraph** ppOutSceneGraph)

This method gets a pointer to the scenegraph.

Parameters:

ppOutSceneGraph

Pointer to the scenegraph

Return Values


IFXMotionResource::GetMotionRef()

Internal use: This method accesses the IFXMotion directly.

Parameters:

None

Return Values:

IFXMotion*

 

§See asterisked (*) statement at Legal Information © 2001 Intel Corporation.