|
|
|
ID3DXSkinInfo Interface |
|
' ****************************************************************************************
' ID3DXSkinInfo interface
' $IID_ID3DXSkinInfo = GUID$("{11EAA540-F9A6-4d49-AE6A-E19221F70CC4}")
' ****************************************************************************************
' ****************************************************************************************
' Applications use the methods of the ID3DXSkinInfo interface to manipulate bone matrices,
' which are used to skin vertex data for animation. This interface is no longer strictly tied
' to ID3DXMesh and can be used to skin any set of vertex data.
' Remarks
' Create a ID3DXSkinInfo interface with D3DXCreateSkinInfo, D3DXCreateSkinInfoFromBlendedMesh,
' or D3DXCreateSkinInfoFVF.
' Interface Information
' Stock Implementation d3d9.dll
' Custom Implementation No
' Inherits from IUnknown
' Header d3dx9mesh.h
' Import library d3dx9.lib
' Minimum operating systems Windows 98
' ****************************************************************************************
' ****************************************************************************************
'DECLARE_INTERFACE_(ID3DXSkinInfo, IUnknown)
'{
' // IUnknown
' 0. STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
' 1. STDMETHOD_(ULONG, AddRef)(THIS) PURE;
' 2. STDMETHOD_(ULONG, Release)(THIS) PURE;
' // Specify the which vertices do each bones influence and by how much
' 3. STDMETHOD(SetBoneInfluence)(THIS_ DWORD bone, DWORD numInfluences, CONST DWORD* vertices, CONST FLOAT* weights) PURE;
' 4. STDMETHOD(SetBoneVertexInfluence)(THIS_ DWORD boneNum, DWORD influenceNum, float weight) PURE;
' 5. STDMETHOD_(DWORD, GetNumBoneInfluences)(THIS_ DWORD bone) PURE;
' 6. STDMETHOD(GetBoneInfluence)(THIS_ DWORD bone, DWORD* vertices, FLOAT* weights) PURE;
' 7. STDMETHOD(GetBoneVertexInfluence)(THIS_ DWORD boneNum, DWORD influenceNum, float *pWeight, DWORD *pVertexNum) PURE;
' 8. STDMETHOD(GetMaxVertexInfluences)(THIS_ DWORD* maxVertexInfluences) PURE;
' 9. STDMETHOD_(DWORD, GetNumBones)(THIS) PURE;
' 10. STDMETHOD(FindBoneVertexInfluenceIndex)(THIS_ DWORD boneNum, DWORD vertexNum, DWORD *pInfluenceIndex) PURE;
' // This gets the max face influences based on a triangle mesh with the specified index buffer
' 11. STDMETHOD(GetMaxFaceInfluences)(THIS_ LPDIRECT3DINDEXBUFFER9 pIB, DWORD NumFaces, DWORD* maxFaceInfluences) PURE;
' // Set min bone influence. Bone influences that are smaller than this are ignored
' 12. STDMETHOD(SetMinBoneInfluence)(THIS_ FLOAT MinInfl) PURE;
' // Get min bone influence.
' 13. STDMETHOD_(FLOAT, GetMinBoneInfluence)(THIS) PURE;
' // Bone names are returned by D3DXLoadSkinMeshFromXof. They are not used by any other method of this object
' 14. STDMETHOD(SetBoneName)(THIS_ DWORD Bone, LPCSTR pName) PURE; // pName is copied to an internal string buffer
' 15. STDMETHOD_(LPCSTR, GetBoneName)(THIS_ DWORD Bone) PURE; // A pointer to an internal string buffer is returned. Do not free this.
' // Bone offset matrices are returned by D3DXLoadSkinMeshFromXof. They are not used by any other method of this object
' 16. STDMETHOD(SetBoneOffsetMatrix)(THIS_ DWORD Bone, CONST D3DXMATRIX *pBoneTransform) PURE; // pBoneTransform is copied to an internal buffer
' 17. STDMETHOD_(LPD3DXMATRIX, GetBoneOffsetMatrix)(THIS_ DWORD Bone) PURE; // A pointer to an internal matrix is returned. Do not free this.
' // Clone a skin info object
' 18. STDMETHOD(Clone)(THIS_ LPD3DXSKININFO* ppSkinInfo) PURE;
' // Update bone influence information to match vertices after they are reordered. This should be called
' // if the target vertex buffer has been reordered externally.
' 19. STDMETHOD(Remap)(THIS_ DWORD NumVertices, DWORD* pVertexRemap) PURE;
' // These methods enable the modification of the vertex layout of the vertices that will be skinned
' 20. STDMETHOD(SetFVF)(THIS_ DWORD FVF) PURE;
' 21. STDMETHOD(SetDeclaration)(THIS_ CONST D3DVERTEXELEMENT9 *pDeclaration) PURE;
' 22. STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
' 23. STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]) PURE;
' // Apply SW skinning based on current pose matrices to the target vertices.
' 24. STDMETHOD(UpdateSkinnedMesh)(THIS_
' CONST D3DXMATRIX* pBoneTransforms,
' CONST D3DXMATRIX* pBoneInvTransposeTransforms,
' LPCVOID pVerticesSrc,
' PVOID pVerticesDst) PURE;
' // Takes a mesh and returns a new mesh with per vertex blend weights and a bone combination
' // table that describes which bones affect which subsets of the mesh
' 25. STDMETHOD(ConvertToBlendedMesh)(THIS_
' LPD3DXMESH pMesh,
' DWORD Options,
' CONST DWORD *pAdjacencyIn,
' LPDWORD pAdjacencyOut,
' DWORD* pFaceRemap,
' LPD3DXBUFFER *ppVertexRemap,
' DWORD* pMaxFaceInfl,
' DWORD* pNumBoneCombinations,
' LPD3DXBUFFER* ppBoneCombinationTable,
' LPD3DXMESH* ppMesh) PURE;
' // Takes a mesh and returns a new mesh with per vertex blend weights and indices
' // and a bone combination table that describes which bones palettes affect which subsets of the mesh
' 26. STDMETHOD(ConvertToIndexedBlendedMesh)(THIS_
' LPD3DXMESH pMesh,
' DWORD Options,
' DWORD paletteSize,
' CONST DWORD *pAdjacencyIn,
' LPDWORD pAdjacencyOut,
' DWORD* pFaceRemap,
' LPD3DXBUFFER *ppVertexRemap,
' DWORD* pMaxVertexInfl,
' DWORD* pNumBoneCombinations,
' LPD3DXBUFFER* ppBoneCombinationTable,
' LPD3DXMESH* ppMesh) PURE;
'};
' ****************************************************************************************
' ****************************************************************************************
' SetBoneInfluence method
' Sets the influence value for a bone.
' HRESULT SetBoneInfluence(
' DWORD Bone,
' DWORD numInfluences,
' CONST DWORD * vertices,
' CONST FLOAT * weights
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_SetBoneInfluence ALIAS "ID3DXSkinInfo_SetBoneInfluence" ( _
BYVAL pthis AS DWORD PTR, BYVAL bone AS DWORD, BYVAL numInfluences AS DWORD, _
BYVAL vertices AS DWORD, BYVAL weights AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[3] USING ID3DXSkinInfo_SetBoneInfluence(pthis, bone, numInfluences, vertices, weights) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' SetBoneVertexInfluence method
' Sets an influence value of a bone on a single vertex.
' HRESULT SetBoneVertexInfluence(
' DWORD boneNum,
' DWORD influenceNum,
' FLOAT weight
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_SetBoneVertexInfluence ALIAS "ID3DXSkinInfo_SetBoneVertexInfluence" ( _
BYVAL pthis AS DWORD PTR, BYVAL boneNum AS DWORD, BYVAL numInfluences AS DWORD, _
BYVAL weight AS SINGLE) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[4] USING ID3DXSkinInfo_SetBoneVertexInfluence(pthis, boneNum, numInfluences, weight) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetNumBoneInfluences method
' Gets the number of influences for a bone.
' DWORD GetNumBoneInfluences(
' DWORD bone
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_GetNumBoneInfluences ALIAS "ID3DXSkinInfo_GetNumBoneInfluences" ( _
BYVAL pthis AS DWORD PTR, BYVAL bone AS DWORD) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[5] USING ID3DXSkinInfo_GetNumBoneInfluences(pthis, bone) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetBoneInfluence method
' Gets the vertices and weights that a bone influences.
' HRESULT GetBoneInfluence(
' DWORD Bone,
' DWORD * vertices,
' FLOAT * weights
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_GetBoneInfluence ALIAS "ID3DXSkinInfo_GetBoneInfluence" ( _
BYVAL pthis AS DWORD PTR, BYVAL bone AS DWORD, BYREF vertices AS DWORD, _
BYREF weights AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[6] USING ID3DXSkinInfo_GetBoneInfluence(pthis, bone, vertices, weights) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetBoneVertexInfluence method
' Retrieves the blend factor and vertex affected by a specified bone influence.
' HRESULT GetBoneVertexInfluence(
' DWORD boneNum,
' DWORD influenceNum,
' FLOAT * pWeight,
' DWORD * pVertexNum
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_GetBoneVertexInfluence ALIAS "ID3DXSkinInfo_GetBoneVertexInfluence" ( _
BYVAL pthis AS DWORD PTR, BYVAL boneNum AS DWORD, BYVAL influenceNum AS DWORD, _
BYREF pWeight AS SINGLE, BYREF pVertexNum AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[7] USING ID3DXSkinInfo_GetBoneVertexInfluence(pthis, boneNum, influenceNum, pWeight, pVertexNum) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetMaxVertexInfluence method
' Gets the maximum number of influences for any vertex in the mesh.
' HRESULT GetMaxVertexInfluences(
' DWORD * maxVertexInfluences
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_GetMaxVertexInfluence ALIAS "ID3DXSkinInfo_GetMaxVertexInfluence" ( _
BYVAL pthis AS DWORD PTR, BYREF maxVertexInfluences AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[8] USING ID3DXSkinInfo_GetMaxVertexInfluence(pthis, maxVertexInfluences) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetNumBones method
' Gets the number of bones.
' DWORD GetNumBones();
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_GetNumBones ALIAS "ID3DXSkinInfo_GetNumBones" (BYVAL pthis AS DWORD PTR) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[9] USING ID3DXSkinInfo_GetNumBones(pthis) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' FindBoneVertexInfluenceIndex method
' Retrieves the index of the bone influence affecting a single vertex.
' HRESULT FindBoneVertexInfluenceIndex(
' DWORD boneNum,
' DWORD vertexNum,
' DWORD * pInfluenceIndex
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_FindBoneVertexInfluenceIndex ALIAS "ID3DXSkinInfo_FindBoneVertexInfluenceIndex" ( _
BYVAL pthis AS DWORD PTR, BYVAL boneNum AS DWORD, BYVAL vertexNum AS DWORD, _
BYREF pInfluenceIndex AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[10] USING ID3DXSkinInfo_FindBoneVertexInfluenceIndex(pthis, boneNum, vertexNum, pInfluenceIndex) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetMaxFaceInfluences method
' Gets the maximum face influences in a triangle mesh with the specified index buffer.
' HRESULT GetMaxFaceInfluences(
' LPDIRECT3DINDEXBUFFER9 pIB,
' DWORD NumFaces,
' DWORD * maxFaceInfluences
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_GetMaxFaceInfluences ALIAS "ID3DXSkinInfo_GetMaxFaceInfluences" ( _
BYVAL pthis AS DWORD PTR, BYVAL pIB AS DWORD, BYVAL NumFaces AS DWORD, _
BYREF maxFaceInfluences AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[11] USING ID3DXSkinInfo_GetMaxFaceInfluences(pthis, pIB, NumFaces, maxFaceInfluences) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' SetMinBoneInfluence method
' Sets the minimum bone influence. Influence values smaller than this are ignored.
' HRESULT SetMinBoneInfluence(
' FLOAT MinInfl
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_SetMinBoneInfluence ALIAS "ID3DXSkinInfo_SetMinBoneInfluence" ( _
BYVAL pthis AS DWORD PTR, BYVAL MinInfl AS SINGLE) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[12] USING ID3DXSkinInfo_SetMinBoneInfluence(pthis, MinInfl) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetMinBoneInfluence method
' Gets the minimum bone influence. Influence values smaller than this are ignored.
' FLOAT GetMinBoneInfluence();
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_GetMinBoneInfluence ALIAS "ID3DXSkinInfo_GetMinBoneInfluence" (BYVAL pthis AS DWORD PTR) EXPORT AS SINGLE
LOCAL SRESULT AS SINGLE
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[13] USING ID3DXSkinInfo_GetMinBoneInfluence(pthis) TO SRESULT
FUNCTION = SRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' SetBoneName method
' Sets the bone name.
' HRESULT SetBoneName(
' DWORD Bone,
' LPCSTR pName
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_SetBoneName ALIAS "ID3DXSkinInfo_SetBoneName" ( _
BYVAL pthis AS DWORD PTR, BYVAL Bone AS DWORD, BYREF pName AS ASCIIZ) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[14] USING ID3DXSkinInfo_SetBoneName(pthis, Bone, pName) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetBoneName method
' Gets the bone name, from the bone index.
' Remarks: Do not free this string.
' LPCSTR GetBoneName(
' DWORD Bone
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_GetBoneName ALIAS "ID3DXSkinInfo_GetBoneName" ( _
BYVAL pthis AS DWORD PTR, BYVAL Bone AS DWORD) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[15] USING ID3DXSkinInfo_GetBoneName(pthis, Bone) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' SetBoneOffsetMatrix method
' Sets the bone offset matrix.
' HRESULT SetBoneOffsetMatrix(
' DWORD Bone,
' CONST D3DXMATRIX * pBoneTransform
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_SetBoneOffsetMatrix ALIAS "ID3DXSkinInfo_SetBoneOffsetMatrix" ( _
BYVAL pthis AS DWORD PTR, BYVAL Bone AS DWORD, BYREF pBoneTransform AS D3DXMATRIX) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[16] USING ID3DXSkinInfo_SetBoneOffsetMatrix(pthis, Bone, pBoneTransform) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetBoneOffsetMatrix method
' Gets the bone offset matrix.
' Return Value
' Returns a pointer to the bone offset matrix. Do not free this pointer.
' LPD3DXMATRIX GetBoneOffsetMatrix(
' DWORD Bone
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_GetBoneOffsetMatrix ALIAS "ID3DXSkinInfo_GetBoneOffsetMatrix" ( _
BYVAL pthis AS DWORD PTR, BYVAL Bone AS DWORD) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[17] USING ID3DXSkinInfo_GetBoneOffsetMatrix(pthis, Bone) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Clone method
' Clones a skin info object.
' HRESULT Clone(
' LPD3DXSKININFO * ppSkinInfo
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_Clone ALIAS "ID3DXSkinInfo_Clone" ( _
BYVAL pthis AS DWORD PTR, BYREF ppSkinInfo AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[18] USING ID3DXSkinInfo_Clone(pthis, ppSkinInfo) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' Remap method
' Updates bone influence information to match vertices after they are reordered. This
' method should be called if the target vertex buffer has been reordered externally.
' HRESULT Remap(
' DWORD NumVertices,
' DWORD * pVertexRemap
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_Remap ALIAS "ID3DXSkinInfo_Remap" ( _
BYVAL pthis AS DWORD PTR, BYVAL NumVertices AS DWORD, BYVAL pVertexRemap AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[19] USING ID3DXSkinInfo_Remap(pthis, NumVertices, pVertexRemap) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' SetFVF method
' Sets the flexible vertex format (FVF) type.
' HRESULT SetFVF(
' DWORD FVF
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_SetFVF ALIAS "ID3DXSkinInfo_SetFVF" ( _
BYVAL pthis AS DWORD PTR, BYVAL FVF AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[20] USING ID3DXSkinInfo_SetFVF(pthis, FVF) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' SetDeclaration method
' Sets the vertex declaration.
' HRESULT SetDeclaration(
' CONST D3DVERTEXELEMENT9 * pDeclaration
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_SetDeclaration ALIAS "ID3DXSkinInfo_SetDeclaration" ( _
BYVAL pthis AS DWORD PTR, BYVAL pDeclaration AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[21] USING ID3DXSkinInfo_SetDeclaration(pthis, pDeclaration) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetFVF method
' Gets the flexible vertex format (FVF) type.
' DWORD GetFVF();
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_GetFVF ALIAS "ID3DXSkinInfo_GetFVF" (BYVAL pthis AS DWORD PTR) EXPORT AS DWORD
LOCAL DWRESULT AS DWORD
IF pthis = %NULL THEN EXIT FUNCTION
CALL DWORD @@pthis[22] USING ID3DXSkinInfo_GetFVF(pthis) TO DWRESULT
FUNCTION = DWRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' GetDeclaration method
' Gets the vertex declaration.
' HRESULT GetDeclaration(
' D3DVERTEXELEMENT9 Declaration[MAX_FVF_DECL_SIZE]
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_GetDeclaration ALIAS "ID3DXSkinInfo_GetDeclaration" ( _
BYVAL pthis AS DWORD PTR, BYVAL Declaration AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[23] USING ID3DXSkinInfo_GetDeclaration(pthis, Declaration) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' UpdateSkinnedMesh method
' Applies software skinning to the target vertices based on the current matrices.
' HRESULT UpdateSkinnedMesh(
' CONST D3DXMATRIX * pBoneTransforms,
' CONST D3DXMATRIX * pBoneInvTransposeTransforms,
' LPCVOID pVerticesSrc,
' PVOID pVerticesDst
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_UpdateSkinnedMesh ALIAS "ID3DXSkinInfo_UpdateSkinnedMesh" ( _
BYVAL pthis AS DWORD PTR, BYREF pBoneTransforms AS D3DXMATRIX, _
BYREF pBoneInvTransposeTransforms AS D3DXMATRIX, BYVAL pVerticesSrc AS DWORD, _
BYVAL pVerticesDst AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[24] USING ID3DXSkinInfo_UpdateSkinnedMesh(pthis, pBoneTransforms, pBoneInvTransposeTransforms, pVerticesSrc, pVerticesDst) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' ConvertToBlendedMesh method
' Takes a mesh and returns a new mesh with per-vertex blend weights and a bone combination
' table. The table describes which bones affect which subsets of the mesh.
' HRESULT ConvertToBlendedMesh(
' LPD3DXMESH pMesh,
' DWORD Options,
' CONST DWORD * pAdjacencyIn,
' LPDWORD pAdjacencyOut,
' DWORD * pFaceRemap,
' LPD3DXBUFFER * ppVertexRemap,
' DWORD * pMaxVertexInfl,
' DWORD * pNumBoneCombinations,
' LPD3DXBUFFER * ppBoneCombinationTable,
' LPD3DXMESH * ppMesh
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_ConvertToBlendedMesh ALIAS "ID3DXSkinInfo_ConvertToBlendedMesh" ( _
BYVAL pthis AS DWORD PTR, BYVAL pMesh AS DWORD, BYVAL Options AS DWORD, _
BYVAL pAdjacencyIn AS DWORD, BYVAL pAdjacencyOut AS DWORD, BYVAL pFaceRemap AS DWORD, _
BYREF ppVertexRemap AS DWORD, BYREF pMaxVertexInfl AS DWORD, BYREF pNumBoneCombinations AS DWORD, _
BYREF ppBoneCombinationTable AS DWORD, BYREF ppMesh AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[25] USING ID3DXSkinInfo_ConvertToBlendedMesh(pthis, pMesh, Options, pAdjacencyIn, pAdjacencyOut, pFaceRemap, ppVertexRemap, pMaxVertexInfl, pNumBoneCombinations, ppBoneCombinationTable, ppMesh) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
' ****************************************************************************************
' ConvertToIndexedBlendedMesh method
' Takes a mesh and returns a new mesh with per-vertex blend weights, indices, and a bone
' combination table. The table describes which bone palettes affect which subsets of the
' mesh.
' HRESULT ConvertToIndexedBlendedMesh(
' LPD3DXMESH pMesh,
' DWORD Options,
' DWORD paletteSize,
' CONST DWORD * pAdjacencyIn,
' LPDWORD pAdjacencyOut,
' DWORD * pFaceRemap,
' LPD3DXBUFFER * ppVertexRemap,
' DWORD * pMaxVertexInfl,
' DWORD * pNumBoneCombinations,
' LPD3DXBUFFER * ppBoneCombinationTable,
' LPD3DXMESH * ppMesh
' );
' ****************************************************************************************
FUNCTION ID3DXSkinInfo_ConvertToIndexedBlendedMesh ALIAS "ID3DXSkinInfo_ConvertToIndexedBlendedMesh" ( _
BYVAL pthis AS DWORD PTR, BYVAL pMesh AS DWORD, BYVAL Options AS DWORD, _
BYVAL paletteSize AS DWORD, BYVAL pAdjacencyIn AS DWORD, BYVAL pAdjacencyOut AS DWORD, _
BYVAL pFaceRemap AS DWORD, BYREF ppVertexRemap AS DWORD, BYREF pMaxVertexInfl AS DWORD, _
BYREF pNumBoneCombinations AS DWORD, BYREF ppBoneCombinationTable AS DWORD, _
BYREF ppMesh AS DWORD) EXPORT AS LONG
LOCAL HRESULT AS LONG
IF pthis = %NULL THEN FUNCTION = %E_POINTER : EXIT FUNCTION
CALL DWORD @@pthis[26] USING ID3DXSkinInfo_ConvertToIndexedBlendedMesh(pthis, pMesh, Options, paletteSize, pAdjacencyIn, pAdjacencyOut, pFaceRemap, ppVertexRemap, pMaxVertexInfl, pNumBoneCombinations, ppBoneCombinationTable, ppMesh) TO HRESULT
FUNCTION = HRESULT
END FUNCTION
' ****************************************************************************************
|
Page last updated on Tuesday, 14 March 2006 23:20:17 +0100