DX::IDXAnimation Struct Reference
#include <IDXAnimation.h>
Inherits DX::IDXUserData, and DX::IDXModelOwned.
List of all members.
|
Public Member Functions |
virtual const char *DXMCALL | GetID () const =0 |
virtual float DXMCALL | GetDuration () const =0 |
virtual float DXMCALL | GetSnap () const =0 |
virtual bool DXMCALL | GetAutoplay () const =0 |
virtual bool DXMCALL | GetLoop () const =0 |
virtual uint DXMCALL | GetNumGroupAnims () const =0 |
virtual uint DXMCALL | GetNumKeyframes () const =0 |
virtual DXError DXMCALL | GetGroupAnim (const char *groupID, IDXGroupAnimPtr *out) const =0 |
virtual DXError DXMCALL | GetGroupAnim (uint index, IDXGroupAnimPtr *out) const =0 |
virtual DXError DXMCALL | GetGroupAnims (IDXGroupAnimArray out) const =0 |
virtual DXError DXMCALL | GetGroupAnims (uint start, uint count, IDXGroupAnimArray out) const =0 |
virtual DXError DXMCALL | GetGroupAnimIndex (const char *groupID, uint *out) const =0 |
virtual DXError DXMCALL | GetGroupAnimIndex (IDXGroupAnimPtr groupAnim, uint *out) const =0 |
virtual DXError DXMCALL | GetKeyframe (uint index, IDXAnimationKeyframePtr *out) const =0 |
virtual DXError DXMCALL | GetKeyframes (IDXAnimationKeyframeArray out) const =0 |
virtual DXError DXMCALL | GetKeyframes (uint start, uint count, IDXAnimationKeyframeArray out) const =0 |
virtual DXError DXMCALL | GetKeyframeIndex (IDXAnimationKeyframePtr frame, uint *out) const =0 |
virtual DXError DXMCALL | SetID (const char *id)=0 |
virtual void DXMCALL | SetDuration (float duration)=0 |
virtual void DXMCALL | SetSnap (float snap)=0 |
virtual void DXMCALL | SetAutoplay (bool value)=0 |
virtual void DXMCALL | SetLoop (bool value)=0 |
virtual DXError DXMCALL | AddGroupAnim (const char *groupID, IDXGroupAnimPtr *out=0)=0 |
virtual DXError DXMCALL | AddKeyframe (float time, IDXAnimationKeyframePtr *out=0)=0 |
virtual DXError DXMCALL | RemoveGroupAnim (const char *groupID)=0 |
virtual DXError DXMCALL | RemoveGroupAnim (IDXGroupAnimPtr anim)=0 |
virtual DXError DXMCALL | RemoveGroupAnim (uint index)=0 |
virtual DXError DXMCALL | RemoveGroupAnim (uint start, uint count)=0 |
virtual DXError DXMCALL | RemoveKeyframe (IDXAnimationKeyframePtr frame)=0 |
virtual DXError DXMCALL | RemoveKeyframe (uint index)=0 |
virtual DXError DXMCALL | RemoveKeyframe (uint start, uint count)=0 |
virtual void DXMCALL | ClearGroupAnims ()=0 |
virtual void DXMCALL | ClearKeyframes ()=0 |
Detailed Description
IDXAnimation is a collection of IDXGroupAnims, which form a complete animation (such as run, walk, die).
Member Function Documentation
virtual DXError DXMCALL DX::IDXAnimation::AddGroupAnim |
( |
const char * |
groupID, |
|
|
IDXGroupAnimPtr * |
out = 0 | |
|
) |
| | [pure virtual] |
Create a new IDXGroupAnim. This will animate the specified groupID.
- Parameters:
-
| groupID | The ID of the group in the model to animate |
| out | A pointer to an IDXGroupAnimPtr where a copy will be saved. This may be null. |
- Returns:
- Error_NullParam if groupID was null.
Error_NotFound if the groupID specified could not be found in the model.
Error_Duplicate if an IDXGroupAnim already exists in the animation for the specified groupID.
Error_Success if the IDXGroupAnim was created and a copy saved in out.
virtual DXError DXMCALL DX::IDXAnimation::AddKeyframe |
( |
float |
time, |
|
|
IDXAnimationKeyframePtr * |
out = 0 | |
|
) |
| | [pure virtual] |
Create a new IDXAnimationKeyframe at the specified time.
- Parameters:
-
| time | The time index to create the keyframe at. |
| out | A pointer to an IDXAnimationKeyframePtr where the result will be stored. Optional. If the keyframe was added. |
virtual void DXMCALL DX::IDXAnimation::ClearGroupAnims |
( |
|
) |
[pure virtual] |
Removes all Group Animations from this Animation.
virtual void DXMCALL DX::IDXAnimation::ClearKeyframes |
( |
|
) |
[pure virtual] |
Removes all keyframes from this animation.
virtual bool DXMCALL DX::IDXAnimation::GetAutoplay |
( |
|
) |
const [pure virtual] |
Specifies if this animation will play automatically when an object using this mesh is created.
virtual float DXMCALL DX::IDXAnimation::GetDuration |
( |
|
) |
const [pure virtual] |
The time period over which this animation will be played.
virtual DXError DXMCALL DX::IDXAnimation::GetGroupAnim |
( |
uint |
index, |
|
|
IDXGroupAnimPtr * |
out | |
|
) |
| | const [pure virtual] |
Get the IDXGroupAnim at the specified index.
- Parameters:
-
| groupID | The index of the IDXGroupAnim to retrieve. |
| out | A pointer to an IDXGroupAnimPtr where a copy will be saved. |
- Returns:
- Error_NullParam if out was null.
Error_OutOfRange if index was greater than the number of GroupAnims in this Animation.
Error_Success if an IDXGroupAnimPtr was saved in out.
virtual DXError DXMCALL DX::IDXAnimation::GetGroupAnim |
( |
const char * |
groupID, |
|
|
IDXGroupAnimPtr * |
out | |
|
) |
| | const [pure virtual] |
Get the IDXGroupAnim with the specified groupID.
- Parameters:
-
| groupID | The groupID to search for |
| out | A pointer to an IDXGroupAnimPtr where a copy will be saved. |
- Returns:
- Error_NullParam if out was null.
Error_NullParam2 if groupID was null.
Error_NotFound if a IDXGroupAnimPtr with the specified groupID was not found.
Error_Success if the groupID was found and a pointer was saved in out.
virtual DXError DXMCALL DX::IDXAnimation::GetGroupAnimIndex |
( |
IDXGroupAnimPtr |
groupAnim, |
|
|
uint * |
out | |
|
) |
| | const [pure virtual] |
Get the index of the IDXGroupAnim with the specified groupID.
- Parameters:
-
| groupAnim | The IDXGroupAnim to search for |
| out | A pointer to a uint where the result will be stored. |
- Returns:
- Error_NullParam if out was null.
Error_NullParam2 if groupAnim was null.
Error_NotFound if there was no matching IDXGroupAnim on the IDXAnimation.
Error_Success if the result was stored in out.
virtual DXError DXMCALL DX::IDXAnimation::GetGroupAnimIndex |
( |
const char * |
groupID, |
|
|
uint * |
out | |
|
) |
| | const [pure virtual] |
Get the index of the IDXGroupAnim with the specified groupID.
- Parameters:
-
| groupID | The id of the IDXGroupAnim to search for. |
| out | A pointer to a uint where the result will be stored. |
- Returns:
- Error_NullParam if out was null.
Error_NullParam2 if groupID was null.
Error_NotFound if there was no IDXGroupAnim with the specified id.
Error_Success if the result was stored in out.
virtual DXError DXMCALL DX::IDXAnimation::GetGroupAnims |
( |
uint |
start, |
|
|
uint |
count, |
|
|
IDXGroupAnimArray |
out | |
|
) |
| | const [pure virtual] |
Get a range of IDXGroupAnim.
- Parameters:
-
| start | The index (inclusive) of the first elements to retrieve. |
| count | The number of elements to retrieve. |
| out | A user allocated array of IDXGroupAnimPtr at least GetNumGroupAnims big. |
- Returns:
- Error_NullParam if out was null.
Error_OutOfRange if start was out of range.
Error_Success if the result was stored in out.
virtual DXError DXMCALL DX::IDXAnimation::GetGroupAnims |
( |
IDXGroupAnimArray |
out |
) |
const [pure virtual] |
Get all IDXGroupAnim in this IDXAnimation.
- Parameters:
-
| out | A user allocated array of IDXGroupAnimPtr which is at least GetNumGroupAnims big. |
- Returns:
- Error_NullParam if out was null.
Error_Success if the result was stored in out.
virtual const char* DXMCALL DX::IDXAnimation::GetID |
( |
|
) |
const [pure virtual] |
The ID of this Animation.
virtual DXError DXMCALL DX::IDXAnimation::GetKeyframe |
( |
uint |
index, |
|
|
IDXAnimationKeyframePtr * |
out | |
|
) |
| | const [pure virtual] |
Get the IDXAnimationKeyframe at the specified index.
- Parameters:
-
| index | The index of the keyframe to retrieve. |
| out | A pointer to an IDXAnimationKeyframePtr where the result will be stored. |
- Returns:
- Error_NullParam if out was null.
Error_OutOfRange if index was out of range.
Error_Success if the result was stored in out.
virtual DXError DXMCALL DX::IDXAnimation::GetKeyframeIndex |
( |
IDXAnimationKeyframePtr |
frame, |
|
|
uint * |
out | |
|
) |
| | const [pure virtual] |
Get the index of a keyframe.
- Parameters:
-
| frame | The IDXAnimationKeyframe to get the index of. |
| out | A pointer to a uint where the result will be stored. |
- Returns:
- Error_NullParam if out was null.
Error_NullParam2 if frame was null.
Error_NotFound if the frame was not found on the animation.
Error_Success if the result was stored in out.
virtual DXError DXMCALL DX::IDXAnimation::GetKeyframes |
( |
uint |
start, |
|
|
uint |
count, |
|
|
IDXAnimationKeyframeArray |
out | |
|
) |
| | const [pure virtual] |
Get all IDXAnimationKeyframe.
- Parameters:
-
| start | The inclusive index of the first element to retrieve. |
| count | The number of elements to retrieve. |
| out | A user allocated array of IDXAnimationKeyFramePtr of length at least count |
- Returns:
- Error_NullParam if out was null.
Error_OutOfRange if start was out of range.
Error_Success if the result was stored in out.
virtual DXError DXMCALL DX::IDXAnimation::GetKeyframes |
( |
IDXAnimationKeyframeArray |
out |
) |
const [pure virtual] |
Get all IDXAnimationKeyframe.
- Parameters:
-
| out | A user allocated array of IDXAnimationKeyFramePtr of length at least GetNumKeyframes |
- Returns:
- Error_NullParam if out was null.
Error_Success if the result was stored in out.
virtual bool DXMCALL DX::IDXAnimation::GetLoop |
( |
|
) |
const [pure virtual] |
Specifies whether the animation will automatically loop when it reaches the end.
virtual uint DXMCALL DX::IDXAnimation::GetNumGroupAnims |
( |
|
) |
const [pure virtual] |
virtual uint DXMCALL DX::IDXAnimation::GetNumKeyframes |
( |
|
) |
const [pure virtual] |
virtual float DXMCALL DX::IDXAnimation::GetSnap |
( |
|
) |
const [pure virtual] |
Controls the interval at which keyframes can be added in the editor. This is only used in the editor.
virtual DXError DXMCALL DX::IDXAnimation::RemoveGroupAnim |
( |
uint |
start, |
|
|
uint |
count | |
|
) |
| | [pure virtual] |
Remove a range of IDXGroupAnim from this animation.
- Parameters:
-
| start | The index of the first Group Animation to remove |
| count | The number of elements to remove. |
- Returns:
- Error_OutOfRange if start was out of range.
Error_Success if the range was removed.
virtual DXError DXMCALL DX::IDXAnimation::RemoveGroupAnim |
( |
uint |
index |
) |
[pure virtual] |
Remove a Group Animation from this animation.
- Parameters:
-
| index | The index of the group animation to remove from the animation. |
- Returns:
- Error_OutOfRange if the index provided was not less than the number of GroupAnims in this Animation.
Error_Success if the GroupAnim was removed.
virtual DXError DXMCALL DX::IDXAnimation::RemoveGroupAnim |
( |
IDXGroupAnimPtr |
anim |
) |
[pure virtual] |
Remove a Group animation from this animation.
- Parameters:
-
- Returns:
- Error_NullParam if anim was null.
Error_NotFound if the GroupAnim specified is not part of this animation.
Error_Success if the GroupAnim was removed.
virtual DXError DXMCALL DX::IDXAnimation::RemoveGroupAnim |
( |
const char * |
groupID |
) |
[pure virtual] |
Remove a Group animation from this animation.
- Parameters:
-
| groupID | The group ID for the Group animation to remove. |
- Returns:
- Error_NullParam if groupID was null.
Error_NotFound if a groupAnim for the group specified by groupID was not found.
Error_Success if the GroupAnim was removed.
virtual DXError DXMCALL DX::IDXAnimation::RemoveKeyframe |
( |
uint |
start, |
|
|
uint |
count | |
|
) |
| | [pure virtual] |
Remove one or more keyframes from this animation.
- Parameters:
-
| start | The index of the first element to remove. |
| count | The number of elements to remove. |
- Returns:
- Error_OutOfRange if start was out of range.
Error_Success if the keyframes were removed.
virtual DXError DXMCALL DX::IDXAnimation::RemoveKeyframe |
( |
uint |
index |
) |
[pure virtual] |
Remove the keyframe at the specified index.
- Parameters:
-
| index | The index of the keyframe to remove. |
- Returns:
- Error_OutOfRange if index was out of range.
Error_Success if the frame was removed.
virtual DXError DXMCALL DX::IDXAnimation::RemoveKeyframe |
( |
IDXAnimationKeyframePtr |
frame |
) |
[pure virtual] |
Remove a keyframe from the animation.
- Parameters:
-
- Returns:
- Error_NullParam if frame was null.
Error_NotFound if the frame was not found in the animation.
Error_Success if the frame was removed and destroyed.
virtual void DXMCALL DX::IDXAnimation::SetAutoplay |
( |
bool |
value |
) |
[pure virtual] |
Set whether this should play automatically when this model is used.
virtual void DXMCALL DX::IDXAnimation::SetDuration |
( |
float |
duration |
) |
[pure virtual] |
Set the period of time the animation will play over.
- Parameters:
-
virtual DXError DXMCALL DX::IDXAnimation::SetID |
( |
const char * |
id |
) |
[pure virtual] |
Set the ID of this Animation.
- Parameters:
-
- Returns:
- Error_NullParam if id was null.
Error_InvalidParam if the id contained invalid characters.
Error_Duplicate if another animation already exists in the model with the same name.
Error_Success if the id was successfully updated.
virtual void DXMCALL DX::IDXAnimation::SetLoop |
( |
bool |
value |
) |
[pure virtual] |
Set whether this animation should loop when it reaches the end of its duration.
virtual void DXMCALL DX::IDXAnimation::SetSnap |
( |
float |
snap |
) |
[pure virtual] |
Set the snap value, which is used in the editor with keyframing.
- Parameters:
-
| snap | The new snap interval |