📄 d3dx9anim.h
字号:
STDMETHOD_(D3DXEVENTHANDLE, KeyPriorityBlend)(THIS_ FLOAT NewBlendWeight, DOUBLE StartTime, DOUBLE Duration, D3DXTRANSITION_TYPE Transition) PURE;
// Event unkeying
STDMETHOD(UnkeyEvent)(THIS_ D3DXEVENTHANDLE hEvent) PURE;
STDMETHOD(UnkeyAllTrackEvents)(THIS_ UINT Track) PURE;
STDMETHOD(UnkeyAllPriorityBlends)(THIS) PURE;
// Event enumeration
STDMETHOD_(D3DXEVENTHANDLE, GetCurrentTrackEvent)(THIS_ UINT Track, D3DXEVENT_TYPE EventType) PURE;
STDMETHOD_(D3DXEVENTHANDLE, GetCurrentPriorityBlend)(THIS) PURE;
STDMETHOD_(D3DXEVENTHANDLE, GetUpcomingTrackEvent)(THIS_ UINT Track, D3DXEVENTHANDLE hEvent) PURE;
STDMETHOD_(D3DXEVENTHANDLE, GetUpcomingPriorityBlend)(THIS_ D3DXEVENTHANDLE hEvent) PURE;
STDMETHOD(ValidateEvent)(THIS_ D3DXEVENTHANDLE hEvent) PURE;
STDMETHOD(GetEventDesc)(THIS_ D3DXEVENTHANDLE hEvent, LPD3DXEVENT_DESC pDesc) PURE;
// Cloning
STDMETHOD(CloneAnimationController)(THIS_
UINT MaxNumAnimationOutputs,
UINT MaxNumAnimationSets,
UINT MaxNumTracks,
UINT MaxNumEvents,
LPD3DXANIMATIONCONTROLLER *ppAnimController) PURE;
};
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
//----------------------------------------------------------------------------
// D3DXLoadMeshHierarchyFromX:
// ---------------------------
// Loads the first frame hierarchy in a .X file.
//
// Parameters:
// Filename
// Name of the .X file
// MeshOptions
// Mesh creation options for meshes in the file (see d3dx9mesh.h)
// pD3DDevice
// D3D9 device on which meshes in the file are created in
// pAlloc
// Allocation interface used to allocate nodes of the frame hierarchy
// pUserDataLoader
// Application provided interface to allow loading of user data
// ppFrameHierarchy
// Returns root node pointer of the loaded frame hierarchy
// ppAnimController
// Returns pointer to an animation controller corresponding to animation
// in the .X file. This is created with default max tracks and events
//
//----------------------------------------------------------------------------
HRESULT WINAPI
D3DXLoadMeshHierarchyFromXA
(
LPCSTR Filename,
DWORD MeshOptions,
LPDIRECT3DDEVICE9 pD3DDevice,
LPD3DXALLOCATEHIERARCHY pAlloc,
LPD3DXLOADUSERDATA pUserDataLoader,
LPD3DXFRAME *ppFrameHierarchy,
LPD3DXANIMATIONCONTROLLER *ppAnimController
);
HRESULT WINAPI
D3DXLoadMeshHierarchyFromXW
(
LPCWSTR Filename,
DWORD MeshOptions,
LPDIRECT3DDEVICE9 pD3DDevice,
LPD3DXALLOCATEHIERARCHY pAlloc,
LPD3DXLOADUSERDATA pUserDataLoader,
LPD3DXFRAME *ppFrameHierarchy,
LPD3DXANIMATIONCONTROLLER *ppAnimController
);
#ifdef UNICODE
#define D3DXLoadMeshHierarchyFromX D3DXLoadMeshHierarchyFromXW
#else
#define D3DXLoadMeshHierarchyFromX D3DXLoadMeshHierarchyFromXA
#endif
HRESULT WINAPI
D3DXLoadMeshHierarchyFromXInMemory
(
LPCVOID Memory,
DWORD SizeOfMemory,
DWORD MeshOptions,
LPDIRECT3DDEVICE9 pD3DDevice,
LPD3DXALLOCATEHIERARCHY pAlloc,
LPD3DXLOADUSERDATA pUserDataLoader,
LPD3DXFRAME *ppFrameHierarchy,
LPD3DXANIMATIONCONTROLLER *ppAnimController
);
//----------------------------------------------------------------------------
// D3DXSaveMeshHierarchyToFile:
// ----------------------------
// Creates a .X file and saves the mesh hierarchy and corresponding animations
// in it
//
// Parameters:
// Filename
// Name of the .X file
// XFormat
// Format of the .X file (text or binary, compressed or not, etc)
// pFrameRoot
// Root node of the hierarchy to be saved
// pAnimController
// The animation controller whose animation sets are to be stored
// pUserDataSaver
// Application provided interface to allow adding of user data to
// data objects saved to .X file
//
//----------------------------------------------------------------------------
HRESULT WINAPI
D3DXSaveMeshHierarchyToFileA
(
LPCSTR Filename,
DWORD XFormat,
CONST D3DXFRAME *pFrameRoot,
LPD3DXANIMATIONCONTROLLER pAnimcontroller,
LPD3DXSAVEUSERDATA pUserDataSaver
);
HRESULT WINAPI
D3DXSaveMeshHierarchyToFileW
(
LPCWSTR Filename,
DWORD XFormat,
CONST D3DXFRAME *pFrameRoot,
LPD3DXANIMATIONCONTROLLER pAnimController,
LPD3DXSAVEUSERDATA pUserDataSaver
);
#ifdef UNICODE
#define D3DXSaveMeshHierarchyToFile D3DXSaveMeshHierarchyToFileW
#else
#define D3DXSaveMeshHierarchyToFile D3DXSaveMeshHierarchyToFileA
#endif
//----------------------------------------------------------------------------
// D3DXFrameDestroy:
// -----------------
// Destroys the subtree of frames under the root, including the root
//
// Parameters:
// pFrameRoot
// Pointer to the root node
// pAlloc
// Allocation interface used to de-allocate nodes of the frame hierarchy
//
//----------------------------------------------------------------------------
HRESULT WINAPI
D3DXFrameDestroy
(
LPD3DXFRAME pFrameRoot,
LPD3DXALLOCATEHIERARCHY pAlloc
);
//----------------------------------------------------------------------------
// D3DXFrameAppendChild:
// ---------------------
// Add a child frame to a frame
//
// Parameters:
// pFrameParent
// Pointer to the parent node
// pFrameChild
// Pointer to the child node
//
//----------------------------------------------------------------------------
HRESULT WINAPI
D3DXFrameAppendChild
(
LPD3DXFRAME pFrameParent,
CONST D3DXFRAME *pFrameChild
);
//----------------------------------------------------------------------------
// D3DXFrameFind:
// --------------
// Finds a frame with the given name. Returns NULL if no frame found.
//
// Parameters:
// pFrameRoot
// Pointer to the root node
// Name
// Name of frame to find
//
//----------------------------------------------------------------------------
LPD3DXFRAME WINAPI
D3DXFrameFind
(
CONST D3DXFRAME *pFrameRoot,
LPCSTR Name
);
//----------------------------------------------------------------------------
// D3DXFrameRegisterNamedMatrices:
// -------------------------------
// Finds all frames that have non-null names and registers each of those frame
// matrices to the given animation controller
//
// Parameters:
// pFrameRoot
// Pointer to the root node
// pAnimController
// Pointer to the animation controller where the matrices are registered
//
//----------------------------------------------------------------------------
HRESULT WINAPI
D3DXFrameRegisterNamedMatrices
(
LPD3DXFRAME pFrameRoot,
LPD3DXANIMATIONCONTROLLER pAnimController
);
//----------------------------------------------------------------------------
// D3DXFrameNumNamedMatrices:
// --------------------------
// Counts number of frames in a subtree that have non-null names
//
// Parameters:
// pFrameRoot
// Pointer to the root node of the subtree
// Return Value:
// Count of frames
//
//----------------------------------------------------------------------------
UINT WINAPI
D3DXFrameNumNamedMatrices
(
CONST D3DXFRAME *pFrameRoot
);
//----------------------------------------------------------------------------
// D3DXFrameCalculateBoundingSphere:
// ---------------------------------
// Computes the bounding sphere of all the meshes in the frame hierarchy.
//
// Parameters:
// pFrameRoot
// Pointer to the root node
// pObjectCenter
// Returns the center of the bounding sphere
// pObjectRadius
// Returns the radius of the bounding sphere
//
//----------------------------------------------------------------------------
HRESULT WINAPI
D3DXFrameCalculateBoundingSphere
(
CONST D3DXFRAME *pFrameRoot,
LPD3DXVECTOR3 pObjectCenter,
FLOAT *pObjectRadius
);
//----------------------------------------------------------------------------
// D3DXCreateKeyframedAnimationSet:
// --------------------------------
// This function creates a compressable keyframed animations set interface.
//
// Parameters:
// pName
// Name of the animation set
// TicksPerSecond
// Number of keyframe ticks that elapse per second
// Playback
// Playback mode of keyframe looping
// NumAnimations
// Number of SRT animations
// NumCallbackKeys
// Number of callback keys
// pCallbackKeys
// Array of callback keys
// ppAnimationSet
// Returns the animation set interface
//
//-----------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateKeyframedAnimationSet
(
LPCSTR pName,
DOUBLE TicksPerSecond,
D3DXPLAYBACK_TYPE Playback,
UINT NumAnimations,
UINT NumCallbackKeys,
CONST D3DXKEY_CALLBACK *pCallbackKeys,
LPD3DXKEYFRAMEDANIMATIONSET *ppAnimationSet
);
//----------------------------------------------------------------------------
// D3DXCreateCompressedAnimationSet:
// --------------------------------
// This function creates a compressed animations set interface from
// compressed data.
//
// Parameters:
// pName
// Name of the animation set
// TicksPerSecond
// Number of keyframe ticks that elapse per second
// Playback
// Playback mode of keyframe looping
// pCompressedData
// Compressed animation SRT data
// NumCallbackKeys
// Number of callback keys
// pCallbackKeys
// Array of callback keys
// ppAnimationSet
// Returns the animation set interface
//
//-----------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateCompressedAnimationSet
(
LPCSTR pName,
DOUBLE TicksPerSecond,
D3DXPLAYBACK_TYPE Playback,
LPD3DXBUFFER pCompressedData,
UINT NumCallbackKeys,
CONST D3DXKEY_CALLBACK *pCallbackKeys,
LPD3DXCOMPRESSEDANIMATIONSET *ppAnimationSet
);
//----------------------------------------------------------------------------
// D3DXCreateAnimationController:
// ------------------------------
// This function creates an animation controller object.
//
// Parameters:
// MaxNumMatrices
// Maximum number of matrices that can be animated
// MaxNumAnimationSets
// Maximum number of animation sets that can be played
// MaxNumTracks
// Maximum number of animation sets that can be blended
// MaxNumEvents
// Maximum number of outstanding events that can be scheduled at any given time
// ppAnimController
// Returns the animation controller interface
//
//-----------------------------------------------------------------------------
HRESULT WINAPI
D3DXCreateAnimationController
(
UINT MaxNumMatrices,
UINT MaxNumAnimationSets,
UINT MaxNumTracks,
UINT MaxNumEvents,
LPD3DXANIMATIONCONTROLLER *ppAnimController
);
#ifdef __cplusplus
}
#endif //__cplusplus
#endif //__D3DX9ANIM_H__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -