|
|
|
ID3DXKeyframedAnimationSet Interface |
|
' ****************************************************************************************
' ID3DXKeyframedAnimationSet interface
' $IID_ID3DXKeyframedAnimationSet = GUID$("{FA4E8E3A-9786-407d-8B4C-5995893764AF}")
' ****************************************************************************************
' ****************************************************************************************
' An application uses the methods of this interface to implement a key frame animation set.
' Remarks
' Create a keyframed animation set with D3DXCreateKeyframedAnimationSet.
' Interface Information
' Stock Implementation d3d9.dll
' Custom Implementation No
' Inherits from ID3DXAnimationSet
' Header d3dx9anim.h
' Import library d3dx9.lib
' Minimum operating systems Windows 98
' ****************************************************************************************
' ****************************************************************************************
'DECLARE_INTERFACE_(ID3DXKeyframedAnimationSet, ID3DXAnimationSet)
'{
' // ID3DXAnimationSet
' 0. STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
' 1. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
' 2. STDMETHOD_(ULONG, Release)(THIS) PURE;
' // Name
' 3. STDMETHOD_(LPCSTR, GetName)(THIS) PURE;
' // Period
' 4. STDMETHOD_(DOUBLE, GetPeriod)(THIS) PURE;
' 5. STDMETHOD_(DOUBLE, GetPeriodicPosition)(THIS_ DOUBLE Position) PURE; // Maps position into animation period
' // Animation names
' 6. STDMETHOD_(UINT, GetNumAnimations)(THIS) PURE;
' 7. STDMETHOD(GetAnimationNameByIndex)(THIS_ UINT Index, LPCSTR *ppName) PURE;
' 8. STDMETHOD(GetAnimationIndexByName)(THIS_ LPCSTR pName, UINT *pIndex) PURE;
' // SRT
' 9. STDMETHOD(GetSRT)(THIS_
' DOUBLE PeriodicPosition, // Position mapped to period (use GetPeriodicPosition)
' UINT Animation, // Animation index
' D3DXVECTOR3 *pScale, // Returns the scale
' D3DXQUATERNION *pRotation, // Returns the rotation as a quaternion
' D3DXVECTOR3 *pTranslation) PURE; // Returns the translation
' // Callbacks
' 10. STDMETHOD(GetCallback)(THIS_
' DOUBLE Position, // Position from which to find callbacks
' DWORD Flags, // Callback search flags
' DOUBLE *pCallbackPosition, // Returns the position of the callback
' LPVOID *ppCallbackData) PURE; // Returns the callback data pointer
' // Playback
' 11. STDMETHOD_(D3DXPLAYBACK_TYPE, GetPlaybackType)(THIS) PURE;
' 12. STDMETHOD_(DOUBLE, GetSourceTicksPerSecond)(THIS) PURE;
' // Scale keys
' 13. STDMETHOD_(UINT, GetNumScaleKeys)(THIS_ UINT Animation) PURE;
' 14. STDMETHOD(GetScaleKeys)(THIS_ UINT Animation, LPD3DXKEY_VECTOR3 pScaleKeys) PURE;
' 15. STDMETHOD(GetScaleKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pScaleKey) PURE;
' 16. STDMETHOD(SetScaleKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pScaleKey) PURE;
' // Rotation keys
' 17. STDMETHOD_(UINT, GetNumRotationKeys)(THIS_ UINT Animation) PURE;
' 18. STDMETHOD(GetRotationKeys)(THIS_ UINT Animation, LPD3DXKEY_QUATERNION pRotationKeys) PURE;
' 19. STDMETHOD(GetRotationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_QUATERNION pRotationKey) PURE;
' 20. STDMETHOD(SetRotationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_QUATERNION pRotationKey) PURE;
' // Translation keys
' 21. STDMETHOD_(UINT, GetNumTranslationKeys)(THIS_ UINT Animation) PURE;
' 22. STDMETHOD(GetTranslationKeys)(THIS_ UINT Animation, LPD3DXKEY_VECTOR3 pTranslationKeys) PURE;
' 23. STDMETHOD(GetTranslationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pTranslationKey) PURE;
' 24. STDMETHOD(SetTranslationKey)(THIS_ UINT Animation, UINT Key, LPD3DXKEY_VECTOR3 pTranslationKey) PURE;
' // Callback keys
' 25. STDMETHOD_(UINT, GetNumCallbackKeys)(THIS) PURE;
' 26. STDMETHOD(GetCallbackKeys)(THIS_ LPD3DXKEY_CALLBACK pCallbackKeys) PURE;
' 27. STDMETHOD(GetCallbackKey)(THIS_ UINT Key, LPD3DXKEY_CALLBACK pCallbackKey) PURE;
' 28. STDMETHOD(SetCallbackKey)(THIS_ UINT Key, LPD3DXKEY_CALLBACK pCallbackKey) PURE;
' // Key removal methods. These are slow, and should not be used once the animation starts playing
' 29. STDMETHOD(UnregisterScaleKey)(THIS_ UINT Animation, UINT Key) PURE;
' 30. STDMETHOD(UnregisterRotationKey)(THIS_ UINT Animation, UINT Key) PURE;
' 31. STDMETHOD(UnregisterTranslationKey)(THIS_ UINT Animation, UINT Key) PURE;
' // One-time animaton SRT keyframe registration
' 32. STDMETHOD(RegisterAnimationSRTKeys)(THIS_
' LPCSTR pName, // Animation name
' UINT NumScaleKeys, // Number of scale keys
' UINT NumRotationKeys, // Number of rotation keys
' UINT NumTranslationKeys, // Number of translation keys
' CONST D3DXKEY_VECTOR3 *pScaleKeys, // Array of scale keys
' CONST D3DXKEY_QUATERNION *pRotationKeys, // Array of rotation keys
' CONST D3DXKEY_VECTOR3 *pTranslationKeys, // Array of translation keys
' DWORD *pAnimationIndex) PURE; // Returns the animation index
' // Compression
' 33. STDMETHOD(Compress)(THIS_
' DWORD Flags, // Compression flags (use D3DXCOMPRESS_STRONG for better results)
' FLOAT Lossiness, // Compression loss ratio in the [0, 1] range
' LPD3DXFRAME pHierarchy, // Frame hierarchy (optional)
' LPD3DXBUFFER *ppCompressedData) PURE; // Returns the compressed animation set
' 34. STDMETHOD(UnregisterAnimation)(THIS_ UINT Index) PURE;
'};
' ****************************************************************************************
' ****************************************************************************************
' GetPlaybackType
' Gets the type of the animation set playback loop.
' D3DXPLAYBACK_TYPE GetPlaybackType(VOID);
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetPlaybackType ALIAS "ID3DXKeyframedAnimationSet_GetPlaybackType" (BYVAL pthis AS DWORD PTR) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[11] USING ID3DXKeyframedAnimationSet_GetPlaybackType(pthis) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetSourceTicksPerSecond
' Gets the number of animation key frame ticks that occur per second.
' DOUBLE GetSourceTicksPerSecond(VOID);
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetSourceTicksPerSecond ALIAS "ID3DXKeyframedAnimationSet_GetSourceTicksPerSecond" (BYVAL pthis AS DWORD PTR) EXPORT AS DOUBLE
LOCAL DRESULT AS DOUBLE
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[12] USING ID3DXKeyframedAnimationSet_GetSourceTicksPerSecond(pthis) TO DRESULT
FUNCTION = DRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetNumScaleKeys
' Gets the number of scale keys in the specified key frame animation.
' UINT GetNumScaleKeys(
' UINT Animation
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetNumScaleKeys ALIAS "ID3DXKeyframedAnimationSet_GetNumScaleKeys" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[13] USING ID3DXKeyframedAnimationSet_GetNumScaleKeys(pthis, Animation) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetScaleKeys
' Fills an array with scale key data used for key frame animation
' HRESULT GetScaleKeys(
' UINT Animation,
' LPD3DXKEY_VECTOR3 pScaleKeys
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetScaleKeys ALIAS "ID3DXKeyframedAnimationSet_GetScaleKeys" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYREF pScaleKeys AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[14] USING ID3DXKeyframedAnimationSet_GetScaleKeys(pthis, Animation, pScaleKeys) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetScaleKey
' Get scale information for a specific key frame in the animation set.
' HRESULT GetScaleKey(
' UINT Animation,
' UINT Key,
' LPD3DXKEY_VECTOR3 pScaleKeys
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetScaleKey ALIAS "ID3DXKeyframedAnimationSet_GetScaleKey" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYVAL KEY AS DWORD, _
BYREF pScaleKeys AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[15] USING ID3DXKeyframedAnimationSet_GetScaleKey(pthis, Animation, KEY, pScaleKeys) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' SetScaleKey
' Set scale information for a specific key frame in the animation set.
' HRESULT SetScaleKey(
' UINT Animation,
' UINT Key,
' LPD3DXKEY_VECTOR3 pScaleKeys
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_SetScaleKey ALIAS "ID3DXKeyframedAnimationSet_SetScaleKey" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYVAL KEY AS DWORD, _
BYVAL pScaleKeys AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[16] USING ID3DXKeyframedAnimationSet_SetScaleKey(pthis, Animation, KEY, pScaleKeys) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetNumRotationKeys method
' Gets the number of rotation keys in the specified key frame animation.
' UINT GetNumRotationKeys(
' UINT Animation
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetNumRotationKeys ALIAS "ID3DXKeyframedAnimationSet_GetNumRotationKeys" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[17] USING ID3DXKeyframedAnimationSet_GetNumRotationKeys(pthis, Animation) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetRotationKeys method
' Fills an array with rotational key data used for key frame animation.
' HRESULT GetRotationKeys(
' UINT Animation,
' LPD3DXKEY_QUATERNION pRotationKeys
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetRotationKeys ALIAS "ID3DXKeyframedAnimationSet_GetRotationKeys" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYVAL pRotationKeys AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[18] USING ID3DXKeyframedAnimationSet_GetRotationKeys(pthis, Animation, pRotationKeys) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetRotationKey method
' Get rotation information for a specific key frame in the animation set.
' HRESULT GetRotationKey(
' UINT Animation,
' UINT Key,
' LPD3DXKEY_QUATERNION pRotationKeys
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetRotationKey ALIAS "ID3DXKeyframedAnimationSet_GetRotationKey" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYVAL KEY AS DWORD, _
BYVAL pRotationKeys AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[19] USING ID3DXKeyframedAnimationSet_GetRotationKey(pthis, Animation, KEY, pRotationKeys) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' SetRotationKey method
' Set rotation information for a specific key frame in the animation set.
' HRESULT SetRotationKey(
' UINT Animation,
' UINT Key,
' LPD3DXKEY_QUATERNION pRotationKeys
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_SetRotationKey ALIAS "ID3DXKeyframedAnimationSet_SetRotationKey" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYVAL KEY AS DWORD, _
BYVAL pRotationKeys AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[20] USING ID3DXKeyframedAnimationSet_SetRotationKey(pthis, Animation, KEY, pRotationKeys) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetNumTranslationKeys method
' Gets the number of translation keys in the specified key frame animation.
' UINT GetNumTranslationKeys(
' UINT Animation
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetNumTranslationKeys ALIAS "ID3DXKeyframedAnimationSet_GetNumTranslationKeys" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[21] USING ID3DXKeyframedAnimationSet_GetNumTranslationKeys(pthis, Animation) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetTranslationKeys method
' Fills an array with translational key data used for key frame animation.
' HRESULT GetTranslationKeys(
' UINT Animation,
' LPD3DXKEY_VECTOR3 pTranslationKeys
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetTranslationKeys ALIAS "ID3DXKeyframedAnimationSet_GetTranslationKeys" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYVAL pTranslationKeys AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[22] USING ID3DXKeyframedAnimationSet_GetTranslationKeys(pthis, Animation, pTranslationKeys) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetTranslationKey method
' Get translation information for a specific key frame in the animation set.
' HRESULT GetTranslationKey(
' UINT Animation,
' UINT Key,
' LPD3DXKEY_VECTOR3 pTranslationKey
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetTranslationKey ALIAS "ID3DXKeyframedAnimationSet_GetTranslationKey" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYVAL KEY AS DWORD, _
BYREF pTranslationKey AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[23] USING ID3DXKeyframedAnimationSet_GetTranslationKey(pthis, Animation, KEY, pTranslationKey) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' SetTranslationKey method
' Set translation information for a specific key frame in the animation set.
' HRESULT SetTranslationKey(
' UINT Animation,
' UINT Key,
' LPD3DXKEY_VECTOR3 pTranslationKey
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_SetTranslationKey ALIAS "ID3DXKeyframedAnimationSet_SetTranslationKey" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYVAL KEY AS DWORD, _
BYVAL pTranslationKey AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[24] USING ID3DXKeyframedAnimationSet_SetTranslationKey(pthis, Animation, KEY, pTranslationKey) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetNumCallbackKeys method
' Gets the number of callback keys in the animation set.
' UINT GetNumCallbackKeys(VOID);
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetNumCallbackKeys ALIAS "ID3DXKeyframedAnimationSet_GetNumCallbackKeys" (BYVAL pthis AS DWORD PTR) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[25] USING ID3DXKeyframedAnimationSet_GetNumCallbackKeys(pthis) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetCallbackKeys method
' Fills an array with callback key data used for key frame animation.
' HRESULT GetCallbackKeys(
' LPD3DXKEY_CALLBACK pCallbackKeys
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetCallbackKeys ALIAS "ID3DXKeyframedAnimationSet_GetCallbackKeys" ( _
BYVAL pthis AS DWORD PTR, BYREF pCallbackKeys AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[26] USING ID3DXKeyframedAnimationSet_GetCallbackKeys(pthis, pCallbackKeys) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetCallbackKey method
' Gets information about a specific callback in the animation set.
' HRESULT GetCallbackKey(
' UINT Animation,
' LPD3DXKEY_CALLBACK pCallbackKeys
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_GetCallbackKey ALIAS "ID3DXKeyframedAnimationSet_GetCallbackKey" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYREF pCallbackKeys AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[27] USING ID3DXKeyframedAnimationSet_GetCallbackKey(pthis, Animation, pCallbackKeys) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' SetCallbackKey method
' Sets information about a specific callback in the animation set.
' HRESULT SetCallbackKey(
' UINT Animation,
' LPD3DXKEY_CALLBACK pCallbackKeys
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_SetCallbackKey ALIAS "ID3DXKeyframedAnimationSet_SetCallbackKey" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYREF pCallbackKeys AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[28] USING ID3DXKeyframedAnimationSet_SetCallbackKey(pthis, Animation, pCallbackKeys) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' UnregisterScaleKey method
' Removes the scale data at the specified key frame.
' HRESULT UnregisterScaleKey(
' UINT Animation,
' UINT Key
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_UnregisterScaleKey ALIAS "ID3DXKeyframedAnimationSet_UnregisterScaleKey" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYVAL KEY AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[29] USING ID3DXKeyframedAnimationSet_UnregisterScaleKey(pthis, Animation, KEY) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' UnregisterRotationKey method
' Removes the rotation data at the specified key frame.
' HRESULT UnregisterRotationKey(
' UINT Animation,
' UINT Key
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_UnregisterRotationKey ALIAS "ID3DXKeyframedAnimationSet_UnregisterRotationKey" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYVAL KEY AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[30] USING ID3DXKeyframedAnimationSet_UnregisterRotationKey(pthis, Animation, KEY) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' UnregisterTranslationKey method
' Removes the translation data at the specified key frame.
' HRESULT UnregisterTranslationKey(
' UINT Animation,
' UINT Key
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_UnregisterTranslationKey ALIAS "ID3DXKeyframedAnimationSet_UnregisterTranslationKey" ( _
BYVAL pthis AS DWORD PTR, BYVAL Animation AS DWORD, BYVAL KEY AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[31] USING ID3DXKeyframedAnimationSet_UnregisterTranslationKey(pthis, Animation, KEY) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' RegisterAnimationSRTKeys
' Register the scale, rotate, and translate (SRT) key frame data for an animation.
' HRESULT RegisterAnimationSRTKeys(
' LPCSTR pName,
' UINT NumScaleKeys,
' UINT NumRotationKeys,
' UINT NumTranslationKeys,
' CONST LPD3DXKEY_VECTOR3 *pScaleKeys,
' CONST LPD3DXKEY_QUATERNION *pRotationKeys,
' CONST LPD3DXKEY_VECTOR3 *pTranslationKeys,
' DWORD *pAnimationIndex
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_RegisterAnimationSRTKeys ALIAS "ID3DXKeyframedAnimationSet_RegisterAnimationSRTKeys" ( _
BYVAL pthis AS DWORD PTR, BYREF pName AS ASCIIZ, BYVAL NumScaleKeys AS DWORD, _
BYVAL NumRotationKeys AS DWORD, BYVAL NumTranslationKeys AS DWORD, _
BYVAL pScaleKeys AS DWORD, BYVAL pRotationKeys AS DWORD, _
BYVAL pTranslationKeys AS DWORD, BYREF pAnimationIndex AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[32] USING ID3DXKeyframedAnimationSet_RegisterAnimationSRTKeys(pthis, pName, NumScaleKeys, NumRotationKeys, NumTranslationKeys, pScaleKeys, pRotationKeys, pTranslationKeys, pAnimationIndex) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' UnregisterAnimation method
' Remove the animation data from the animation set.
' HRESULT UnregisterAnimation(
' UINT Index
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_UnregisterAnimation ALIAS "ID3DXKeyframedAnimationSet_UnregisterAnimation" ( _
BYVAL pthis AS DWORD PTR, BYVAL Index AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[33] USING ID3DXKeyframedAnimationSet_UnregisterAnimation(pthis, Index) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Compress method
' Transforms animations in an animation set into a compressed format and returns a pointer to
' the buffer that stores the compressed data.
' HRESULT Compress(
' DWORD Flags,
' FLOAT Lossiness,
' LPD3DXFRAME pHierarchy,
' LPD3DXBUFFER *ppCompressedData
' );
' ****************************************************************************************
FUNCTION ID3DXKeyframedAnimationSet_Compress ALIAS "ID3DXKeyframedAnimationSet_Compress" ( _
BYVAL pthis AS DWORD PTR, BYVAL Flags AS DWORD, BYVAL Lossiness AS SINGLE, _
BYVAL pHierarchy AS DWORD, BYREF ppCompressedData AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[34] USING ID3DXKeyframedAnimationSet_Compress(pthis, Flags, Lossiness, pHierarchy, ppCompressedData) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
|
Page last updated on Wednesday, 15 March 2006 00:01:05 +0100