#include "d3dx8.h"

#ifndef _D3DX8MESH_H
#define _D3DX8MESH_H

/* D3DX mesh types and functions */

#ifndef __PODX8API
#if __POCC__ >= 274
#define __PODX8API  __declspec(dllimport)
#else
#define __PODX8API
#endif
#endif /* __PODX8API */

#include "dxfile.h"

#define UNUSED16 (0xffff)
#define UNUSED32 (0xffffffff)

#define D3DX_COMP_TANGENT_NONE  0xFFFFFFFF

DEFINE_GUID(IID_ID3DXBaseMesh,0x2a835771,0xbf4d,0x43f4,0x8e,0x14,0x82,0xa8,0x9,0xf1,0x7d,0x8a);
DEFINE_GUID(IID_ID3DXMesh,0xccae5c3b,0x4dd1,0x4d0f,0x99,0x7e,0x46,0x84,0xca,0x64,0x55,0x7f);
DEFINE_GUID(IID_ID3DXPMesh,0x19fbe386,0xc282,0x4659,0x97,0xbd,0xcb,0x86,0x9b,0x8,0x4a,0x6c);
DEFINE_GUID(IID_ID3DXSPMesh,0x4e3ca05c,0xd4ff,0x4d11,0x8a,0x2,0x16,0x45,0x9e,0x8,0xf6,0xf4);
DEFINE_GUID(IID_ID3DXSkinMesh,0x8db06ecc,0xebfc,0x408a,0x94,0x4,0x30,0x74,0xb4,0x77,0x35,0x15);

enum _D3DXMESH {
    D3DXMESH_32BIT = 0x001,
    D3DXMESH_DONOTCLIP = 0x002,
    D3DXMESH_POINTS = 0x004,
    D3DXMESH_RTPATCHES = 0x008,
    D3DXMESH_NPATCHES = 0x4000,
    D3DXMESH_VB_SYSTEMMEM = 0x010,
    D3DXMESH_VB_MANAGED = 0x020,
    D3DXMESH_VB_WRITEONLY = 0x040,
    D3DXMESH_VB_DYNAMIC = 0x080,
    D3DXMESH_VB_SOFTWAREPROCESSING = 0x8000,
    D3DXMESH_IB_SYSTEMMEM = 0x100,
    D3DXMESH_IB_MANAGED = 0x200,
    D3DXMESH_IB_WRITEONLY = 0x400,
    D3DXMESH_IB_DYNAMIC = 0x800,
    D3DXMESH_IB_SOFTWAREPROCESSING = 0x10000,
    D3DXMESH_VB_SHARE = 0x1000,
    D3DXMESH_USEHWONLY = 0x2000,
    D3DXMESH_SYSTEMMEM = 0x110,
    D3DXMESH_MANAGED = 0x220,
    D3DXMESH_WRITEONLY = 0x440,
    D3DXMESH_DYNAMIC = 0x880,
    D3DXMESH_SOFTWAREPROCESSING = 0x18000,
};

enum _D3DXMESHSIMP {
    D3DXMESHSIMP_VERTEX = 0x1,
    D3DXMESHSIMP_FACE = 0x2,
};

enum _MAX_FVF_DECL_SIZE {
    MAX_FVF_DECL_SIZE = 20
};

typedef struct ID3DXBaseMesh *LPD3DXBASEMESH;
typedef struct ID3DXMesh *LPD3DXMESH;
typedef struct ID3DXPMesh *LPD3DXPMESH;
typedef struct ID3DXSPMesh *LPD3DXSPMESH;
typedef struct ID3DXSkinMesh *LPD3DXSKINMESH;

typedef struct _D3DXATTRIBUTERANGE {
    DWORD AttribId;
    DWORD FaceStart;
    DWORD FaceCount;
    DWORD VertexStart;
    DWORD VertexCount;
} D3DXATTRIBUTERANGE;

typedef D3DXATTRIBUTERANGE* LPD3DXATTRIBUTERANGE;

#ifdef __cplusplus
extern "C" {
#endif

struct D3DXMATERIAL {
    D3DMATERIAL8 MatD3D;
    LPSTR pTextureFilename;
};
typedef struct D3DXMATERIAL *LPD3DXMATERIAL;

#ifdef __cplusplus
}
#endif

typedef struct _D3DXATTRIBUTEWEIGHTS {
    FLOAT Position;
    FLOAT Boundary;
    FLOAT Normal;
    FLOAT Diffuse;
    FLOAT Specular;
    FLOAT Tex[8];
} D3DXATTRIBUTEWEIGHTS;
typedef D3DXATTRIBUTEWEIGHTS* LPD3DXATTRIBUTEWEIGHTS;

enum _D3DXWELDEPSILONSFLAGS {
    D3DXWELDEPSILONS_WELDALL = 0x1,
    D3DXWELDEPSILONS_WELDPARTIALMATCHES = 0x2,
    D3DXWELDEPSILONS_DONOTREMOVEVERTICES = 0x4,
};

typedef struct _D3DXWELDEPSILONS {
    FLOAT SkinWeights;
    FLOAT Normal;
    FLOAT Tex[8];
    DWORD Flags;
} D3DXWELDEPSILONS;
typedef D3DXWELDEPSILONS* LPD3DXWELDEPSILONS;

#undef INTERFACE
#define INTERFACE ID3DXBaseMesh
DECLARE_INTERFACE_(ID3DXBaseMesh, IUnknown)
{
    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
    STDMETHOD(DrawSubset)(THIS_ DWORD) PURE;
    STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
    STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
    STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
    STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
    STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
    STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8*) PURE;
    STDMETHOD(CloneMeshFVF)(THIS_ DWORD,DWORD,LPDIRECT3DDEVICE8,LPD3DXMESH*) PURE;
    STDMETHOD(CloneMesh)(THIS_ DWORD,CONST DWORD*,LPDIRECT3DDEVICE8,LPD3DXMESH*) PURE;
    STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8*) PURE;
    STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8*) PURE;
    STDMETHOD(LockVertexBuffer)(THIS_ DWORD,BYTE**) PURE;
    STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
    STDMETHOD(LockIndexBuffer)(THIS_ DWORD,BYTE**) PURE;
    STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
    STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE*,DWORD*) PURE;
    STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD*,DWORD*) PURE;
    STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD*,DWORD*) PURE;
    STDMETHOD(GenerateAdjacency)(THIS_ FLOAT,DWORD*) PURE;
};

#undef INTERFACE
#define INTERFACE ID3DXMesh
DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh)
{
    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
    STDMETHOD(DrawSubset)(THIS_ DWORD) PURE;
    STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
    STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
    STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
    STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE;
    STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
    STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8*) PURE;
    STDMETHOD(CloneMeshFVF)(THIS_ DWORD,DWORD,LPDIRECT3DDEVICE8,LPD3DXMESH*) PURE;
    STDMETHOD(CloneMesh)(THIS_ DWORD,CONST DWORD*,LPDIRECT3DDEVICE8,LPD3DXMESH*) PURE;
    STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8*) PURE;
    STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8*) PURE;
    STDMETHOD(LockVertexBuffer)(THIS_ DWORD,BYTE**) PURE;
    STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
    STDMETHOD(LockIndexBuffer)(THIS_ DWORD,BYTE**) PURE;
    STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
    STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE*,DWORD*) PURE;
    STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD*,DWORD*) PURE;
    STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD*,DWORD*) PURE;
    STDMETHOD(GenerateAdjacency)(THIS_ FLOAT,DWORD*) PURE;
    STDMETHOD(LockAttributeBuffer)(THIS_ DWORD,DWORD**) PURE;
    STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
    STDMETHOD(Optimize)(THIS_ DWORD,CONST DWORD*,DWORD*,DWORD*,LPD3DXBUFFER*,LPD3DXMESH*) PURE;
    STDMETHOD(OptimizeInplace)(THIS_ DWORD,CONST DWORD*,DWORD*,DWORD*,LPD3DXBUFFER*) PURE;
};

#undef INTERFACE
#define INTERFACE ID3DXPMesh
DECLARE_INTERFACE_(ID3DXPMesh, ID3DXBaseMesh)
{
    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
    STDMETHOD(DrawSubset)(THIS_ DWORD) PURE;
    STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
    STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
    STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
    STDMETHOD(GetDeclaration)(THIS_ DWORD [MAX_FVF_DECL_SIZE]) PURE;
    STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
    STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8*) PURE;
    STDMETHOD(CloneMeshFVF)(THIS_ DWORD,DWORD,LPDIRECT3DDEVICE8,LPD3DXMESH*) PURE;
    STDMETHOD(CloneMesh)(THIS_ DWORD,CONST DWORD*,LPDIRECT3DDEVICE8,LPD3DXMESH*) PURE;
    STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8*) PURE;
    STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8*) PURE;
    STDMETHOD(LockVertexBuffer)(THIS_ DWORD,BYTE**) PURE;
    STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
    STDMETHOD(LockIndexBuffer)(THIS_ DWORD,BYTE**) PURE;
    STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
    STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE*,DWORD*) PURE;
    STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD*,DWORD*) PURE;
    STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD*,DWORD*) PURE;
    STDMETHOD(GenerateAdjacency)(THIS_ FLOAT,DWORD*) PURE;
    STDMETHOD(ClonePMeshFVF)(THIS_ DWORD,DWORD,LPDIRECT3DDEVICE8,LPD3DXPMESH*) PURE;
    STDMETHOD(ClonePMesh)(THIS_ DWORD,CONST DWORD*,LPDIRECT3DDEVICE8,LPD3DXPMESH*) PURE;
    STDMETHOD(SetNumFaces)(THIS_ DWORD) PURE;
    STDMETHOD(SetNumVertices)(THIS_ DWORD) PURE;
    STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE;
    STDMETHOD_(DWORD, GetMinFaces)(THIS) PURE;
    STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE;
    STDMETHOD_(DWORD, GetMinVertices)(THIS) PURE;
    STDMETHOD(Save)(THIS_ IStream*,LPD3DXMATERIAL,DWORD) PURE;
    STDMETHOD(Optimize)(THIS_ DWORD,DWORD*,DWORD*,LPD3DXBUFFER*,LPD3DXMESH*) PURE;
    STDMETHOD(OptimizeBaseLOD)(THIS_ DWORD,DWORD*) PURE;
    STDMETHOD(TrimByFaces)(THIS_ DWORD,DWORD,DWORD*,DWORD*) PURE;
    STDMETHOD(TrimByVertices)(THIS_ DWORD,DWORD,DWORD*,DWORD*) PURE;
    STDMETHOD(GetAdjacency)(THIS_ DWORD*) PURE;
};

#undef INTERFACE
#define INTERFACE ID3DXSPMesh
DECLARE_INTERFACE_(ID3DXSPMesh, IUnknown)
{
    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
    STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
    STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
    STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
    STDMETHOD(GetDeclaration)(THIS_ DWORD [MAX_FVF_DECL_SIZE]) PURE;
    STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
    STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8*) PURE;
    STDMETHOD(CloneMeshFVF)(THIS_ DWORD,DWORD,LPDIRECT3DDEVICE8,DWORD*,DWORD*,LPD3DXMESH*) PURE;
    STDMETHOD(CloneMesh)(THIS_ DWORD,CONST DWORD*,LPDIRECT3DDEVICE8,DWORD*,DWORD*,LPD3DXMESH*) PURE;
    STDMETHOD(ClonePMeshFVF)(THIS_ DWORD,DWORD,LPDIRECT3DDEVICE8,DWORD*,LPD3DXPMESH*) PURE;
    STDMETHOD(ClonePMesh)(THIS_ DWORD,CONST DWORD*,LPDIRECT3DDEVICE8,DWORD*,LPD3DXPMESH*) PURE;
    STDMETHOD(ReduceFaces)(THIS_ DWORD) PURE;
    STDMETHOD(ReduceVertices)(THIS_ DWORD) PURE;
    STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE;
    STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE;
    STDMETHOD(GetVertexAttributeWeights)(THIS_ LPD3DXATTRIBUTEWEIGHTS) PURE;
    STDMETHOD(GetVertexWeights)(THIS_ FLOAT*) PURE;
};

enum _D3DXMESHOPT {
    D3DXMESHOPT_COMPACT = 0x01000000,
    D3DXMESHOPT_ATTRSORT = 0x02000000,
    D3DXMESHOPT_VERTEXCACHE = 0x04000000,
    D3DXMESHOPT_STRIPREORDER = 0x08000000,
    D3DXMESHOPT_IGNOREVERTS = 0x10000000,
    D3DXMESHOPT_SHAREVB = 0x1000,
};

typedef struct _D3DXBONECOMBINATION {
    DWORD AttribId;
    DWORD FaceStart;
    DWORD FaceCount;
    DWORD VertexStart;
    DWORD VertexCount;
    DWORD* BoneId;
} D3DXBONECOMBINATION, *LPD3DXBONECOMBINATION;

#undef INTERFACE
#define INTERFACE ID3DXSkinMesh
DECLARE_INTERFACE_(ID3DXSkinMesh, IUnknown)
{
    STDMETHOD(QueryInterface)(THIS_ REFIID,LPVOID*) PURE;
    STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    STDMETHOD_(ULONG, Release)(THIS) PURE;
    STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
    STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
    STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
    STDMETHOD(GetDeclaration)(THIS_ DWORD [MAX_FVF_DECL_SIZE]) PURE;
    STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
    STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8*) PURE;
    STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8*) PURE;
    STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8*) PURE;
    STDMETHOD(LockVertexBuffer)(THIS_ DWORD,BYTE**) PURE;
    STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
    STDMETHOD(LockIndexBuffer)(THIS_ DWORD,BYTE**) PURE;
    STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
    STDMETHOD(LockAttributeBuffer)(THIS_ DWORD,DWORD**) PURE;
    STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
    STDMETHOD_(DWORD, GetNumBones)(THIS) PURE;
    STDMETHOD(GetOriginalMesh)(THIS_ LPD3DXMESH*) PURE;
    STDMETHOD(SetBoneInfluence)(THIS_ DWORD,DWORD,CONST DWORD*,CONST FLOAT*) PURE;
    STDMETHOD_(DWORD, GetNumBoneInfluences)(THIS_ DWORD) PURE;
    STDMETHOD(GetBoneInfluence)(THIS_ DWORD,DWORD*,FLOAT*) PURE;
    STDMETHOD(GetMaxVertexInfluences)(THIS_ DWORD*) PURE;
    STDMETHOD(GetMaxFaceInfluences)(THIS_ DWORD*) PURE;
    STDMETHOD(ConvertToBlendedMesh)(THIS_ DWORD,CONST LPDWORD,LPDWORD,DWORD*,LPD3DXBUFFER*,DWORD*,LPD3DXBUFFER*,LPD3DXMESH*) PURE;
    STDMETHOD(ConvertToIndexedBlendedMesh)(THIS_ DWORD,CONST LPDWORD,DWORD,LPDWORD,DWORD*,LPD3DXBUFFER*,DWORD*,LPD3DXBUFFER*,LPD3DXMESH*) PURE;
    STDMETHOD(GenerateSkinnedMesh)(THIS_ DWORD,FLOAT,CONST LPDWORD,LPDWORD,DWORD*,LPD3DXBUFFER*,LPD3DXMESH*) PURE;
    STDMETHOD(UpdateSkinnedMesh)(THIS_ CONST D3DXMATRIX*,CONST D3DXMATRIX*,LPD3DXMESH) PURE;
};

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _D3DXINTERSECTINFO {
    DWORD FaceIndex;
    FLOAT U;
    FLOAT V;
    FLOAT Dist;
} D3DXINTERSECTINFO, *LPD3DXINTERSECTINFO;

enum _D3DXERR {
    D3DXERR_CANNOTMODIFYINDEXBUFFER = MAKE_DDHRESULT(2900),
    D3DXERR_INVALIDMESH = MAKE_DDHRESULT(2901),
    D3DXERR_CANNOTATTRSORT = MAKE_DDHRESULT(2902),
    D3DXERR_SKINNINGNOTSUPPORTED = MAKE_DDHRESULT(2903),
    D3DXERR_TOOMANYINFLUENCES = MAKE_DDHRESULT(2904),
    D3DXERR_INVALIDDATA = MAKE_DDHRESULT(2905),
    D3DXERR_LOADEDMESHASNODATA = MAKE_DDHRESULT(2906),
};

__PODX8API HRESULT WINAPI D3DXCreateMesh(DWORD,DWORD,DWORD,CONST DWORD*,LPDIRECT3DDEVICE8,LPD3DXMESH*);
__PODX8API HRESULT WINAPI D3DXCreateMeshFVF(DWORD,DWORD,DWORD,DWORD,LPDIRECT3DDEVICE8,LPD3DXMESH*);
__PODX8API HRESULT WINAPI D3DXCreateSPMesh(LPD3DXMESH,CONST DWORD*,CONST LPD3DXATTRIBUTEWEIGHTS,CONST FLOAT*,LPD3DXSPMESH*);
__PODX8API HRESULT WINAPI D3DXCleanMesh(LPD3DXMESH,CONST DWORD*,LPD3DXMESH*,DWORD*,LPD3DXBUFFER*);
__PODX8API HRESULT WINAPI D3DXValidMesh(LPD3DXMESH,CONST DWORD*,LPD3DXBUFFER*);
__PODX8API HRESULT WINAPI D3DXGeneratePMesh(LPD3DXMESH,CONST DWORD*,CONST LPD3DXATTRIBUTEWEIGHTS,CONST FLOAT*,DWORD,DWORD,LPD3DXPMESH*);
__PODX8API HRESULT WINAPI D3DXSimplifyMesh(LPD3DXMESH,CONST DWORD*,CONST LPD3DXATTRIBUTEWEIGHTS,CONST FLOAT*,DWORD,DWORD,LPD3DXMESH*);
__PODX8API HRESULT WINAPI D3DXComputeBoundingSphere(PVOID,DWORD,DWORD,D3DXVECTOR3*,FLOAT*);
__PODX8API HRESULT WINAPI D3DXComputeBoundingBox(PVOID,DWORD,DWORD,D3DXVECTOR3*,D3DXVECTOR3*);
__PODX8API HRESULT WINAPI D3DXComputeNormals(LPD3DXBASEMESH,DWORD*);
__PODX8API HRESULT WINAPI D3DXCreateBuffer(DWORD,LPD3DXBUFFER*);
__PODX8API HRESULT WINAPI D3DXLoadMeshFromX(LPSTR,DWORD,LPDIRECT3DDEVICE8,LPD3DXBUFFER*,LPD3DXBUFFER*,DWORD*,LPD3DXMESH*);
__PODX8API HRESULT WINAPI D3DXLoadMeshFromXInMemory(PBYTE,DWORD,DWORD,LPDIRECT3DDEVICE8,LPD3DXBUFFER*,LPD3DXBUFFER*,DWORD*,LPD3DXMESH*);
__PODX8API HRESULT WINAPI D3DXLoadMeshFromXResource(HMODULE,LPCTSTR,LPCTSTR,DWORD,LPDIRECT3DDEVICE8,LPD3DXBUFFER*,LPD3DXBUFFER*,DWORD*,LPD3DXMESH*);
__PODX8API HRESULT WINAPI D3DXSaveMeshToX(LPSTR,LPD3DXMESH,CONST DWORD*,CONST LPD3DXMATERIAL,DWORD,DWORD);
__PODX8API HRESULT WINAPI D3DXCreatePMeshFromStream(IStream*,DWORD,LPDIRECT3DDEVICE8,LPD3DXBUFFER*,DWORD*,LPD3DXPMESH*);
__PODX8API HRESULT WINAPI D3DXCreateSkinMesh(DWORD,DWORD,DWORD,DWORD,CONST DWORD*,LPDIRECT3DDEVICE8,LPD3DXSKINMESH*);
__PODX8API HRESULT WINAPI D3DXCreateSkinMeshFVF(DWORD,DWORD,DWORD,DWORD,DWORD,LPDIRECT3DDEVICE8,LPD3DXSKINMESH*);
__PODX8API HRESULT WINAPI D3DXCreateSkinMeshFromMesh(LPD3DXMESH,DWORD,LPD3DXSKINMESH*);
__PODX8API HRESULT WINAPI D3DXLoadMeshFromXof(LPDIRECTXFILEDATA,DWORD,LPDIRECT3DDEVICE8,LPD3DXBUFFER*,LPD3DXBUFFER*,DWORD*,LPD3DXMESH*);
__PODX8API HRESULT WINAPI D3DXLoadSkinMeshFromXof(LPDIRECTXFILEDATA,DWORD,LPDIRECT3DDEVICE8,LPD3DXBUFFER*,LPD3DXBUFFER*,DWORD*,LPD3DXBUFFER*,LPD3DXBUFFER*,LPD3DXSKINMESH*);
__PODX8API HRESULT WINAPI D3DXTessellateNPatches(LPD3DXMESH,CONST DWORD*,FLOAT,BOOL,LPD3DXMESH*,LPD3DXBUFFER*);
__PODX8API UINT WINAPI D3DXGetFVFVertexSize(DWORD);
__PODX8API HRESULT WINAPI D3DXDeclaratorFromFVF(DWORD,DWORD [MAX_FVF_DECL_SIZE]);
__PODX8API HRESULT WINAPI D3DXFVFFromDeclarator(CONST DWORD*,DWORD*);
__PODX8API HRESULT WINAPI D3DXWeldVertices(CONST LPD3DXMESH,LPD3DXWELDEPSILONS,CONST DWORD*,DWORD*,DWORD*,LPD3DXBUFFER*);
__PODX8API HRESULT WINAPI D3DXIntersect(LPD3DXBASEMESH,CONST D3DXVECTOR3*,CONST D3DXVECTOR3*,BOOL*,DWORD*,FLOAT*,FLOAT*,FLOAT*,LPD3DXBUFFER*,DWORD*);
__PODX8API HRESULT WINAPI D3DXIntersectSubset(LPD3DXBASEMESH,DWORD,CONST D3DXVECTOR3*,CONST D3DXVECTOR3*,BOOL*,DWORD*,FLOAT*,FLOAT*,FLOAT*,LPD3DXBUFFER*,DWORD*);
__PODX8API HRESULT WINAPI D3DXSplitMesh(CONST LPD3DXMESH,CONST DWORD*,CONST DWORD,CONST DWORD,DWORD*,LPD3DXBUFFER*,LPD3DXBUFFER*,LPD3DXBUFFER*,LPD3DXBUFFER*);
BOOL /* ?? */ D3DXIntersectTri(CONST D3DXVECTOR3*,CONST D3DXVECTOR3*,CONST D3DXVECTOR3*,CONST D3DXVECTOR3*,CONST D3DXVECTOR3*,FLOAT*,FLOAT*,FLOAT*);
__PODX8API BOOL WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3*,FLOAT,CONST D3DXVECTOR3*,CONST D3DXVECTOR3*);
__PODX8API BOOL WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3*,CONST D3DXVECTOR3*,CONST D3DXVECTOR3*,CONST D3DXVECTOR3*);
__PODX8API HRESULT WINAPI D3DXComputeTangent(LPD3DXMESH,DWORD,LPD3DXMESH,DWORD,DWORD,DWORD,DWORD*);
__PODX8API HRESULT WINAPI D3DXConvertMeshSubsetToSingleStrip(LPD3DXBASEMESH,DWORD,DWORD,LPDIRECT3DINDEXBUFFER8*,DWORD*);
__PODX8API HRESULT WINAPI D3DXConvertMeshSubsetToStrips(LPD3DXBASEMESH,DWORD,DWORD,LPDIRECT3DINDEXBUFFER8*,DWORD*,LPD3DXBUFFER*,DWORD*);

#ifdef __cplusplus
}
#endif

#endif /* _D3DX8MESH_H */

