gphoto2.ds: Remove unused variables.
[wine/hramrach.git] / include / d3dx9mesh.h
blob5773d2461e0eade96f4bb2dd353d6e5bf8e73e7c
1 /*
2 * Copyright (C) 2009 David Adam
3 * Copyright (C) 2010 Tony Wasserka
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include <d3dx9.h>
22 #ifndef __WINE_D3DX9MESH_H
23 #define __WINE_D3DX9MESH_H
25 DEFINE_GUID(IID_ID3DXBaseMesh, 0x7ed943dd, 0x52e8, 0x40b5, 0xa8, 0xd8, 0x76, 0x68, 0x5c, 0x40, 0x63, 0x30);
26 DEFINE_GUID(IID_ID3DXMesh, 0x4020e5c2, 0x1403, 0x4929, 0x88, 0x3f, 0xe2, 0xe8, 0x49, 0xfa, 0xc1, 0x95);
28 enum _MAX_FVF_DECL_SIZE
30 MAX_FVF_DECL_SIZE = MAXD3DDECLLENGTH + 1
33 typedef struct ID3DXBaseMesh* LPD3DXBASEMESH;
34 typedef struct ID3DXMesh* LPD3DXMESH;
36 typedef struct _D3DXATTRIBUTERANGE {
37 DWORD AttribId;
38 DWORD FaceStart;
39 DWORD FaceCount;
40 DWORD VertexStart;
41 DWORD VertexCount;
42 } D3DXATTRIBUTERANGE;
44 typedef D3DXATTRIBUTERANGE* LPD3DXATTRIBUTERANGE;
46 #undef INTERFACE
47 #define INTERFACE ID3DXBaseMesh
49 DECLARE_INTERFACE_(ID3DXBaseMesh, IUnknown)
51 /*** IUnknown methods ***/
52 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
53 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
54 STDMETHOD_(ULONG, Release)(THIS) PURE;
55 /*** ID3DXBaseMesh ***/
56 STDMETHOD(DrawSubset)(THIS_ DWORD attrib_id) PURE;
57 STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
58 STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
59 STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
60 STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
61 STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE;
62 STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
63 STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
64 STDMETHOD(CloneMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, LPD3DXMESH* clone_mesh) PURE;
65 STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
66 LPD3DXMESH* clone_mesh) PURE;
67 STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* vertex_buffer) PURE;
68 STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* index_buffer) PURE;
69 STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
70 STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
71 STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
72 STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
73 STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE* attrib_table, DWORD* attrib_table_size) PURE;
74 STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* point_reps, DWORD* adjacency) PURE;
75 STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* adjacency, DWORD* point_reps) PURE;
76 STDMETHOD(GenerateAdjacency)(THIS_ FLOAT epsilon, DWORD* adjacency) PURE;
77 STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
81 #undef INTERFACE
82 #define INTERFACE ID3DXMesh
84 DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh)
86 /*** IUnknown methods ***/
87 STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* object) PURE;
88 STDMETHOD_(ULONG, AddRef)(THIS) PURE;
89 STDMETHOD_(ULONG, Release)(THIS) PURE;
90 /*** ID3DXBaseMesh ***/
91 STDMETHOD(DrawSubset)(THIS_ DWORD attrib_id) PURE;
92 STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE;
93 STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE;
94 STDMETHOD_(DWORD, GetFVF)(THIS) PURE;
95 STDMETHOD(GetDeclaration)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
96 STDMETHOD_(DWORD, GetNumBytesPerVertex)(THIS) PURE;
97 STDMETHOD_(DWORD, GetOptions)(THIS) PURE;
98 STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE9* device) PURE;
99 STDMETHOD(CloneMeshFVF)(THIS_ DWORD options, DWORD fvf, LPDIRECT3DDEVICE9 device, LPD3DXMESH* clone_mesh) PURE;
100 STDMETHOD(CloneMesh)(THIS_ DWORD options, CONST D3DVERTEXELEMENT9* declaration, LPDIRECT3DDEVICE9 device,
101 LPD3DXMESH* clone_mesh) PURE;
102 STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER9* vertex_buffer) PURE;
103 STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER9* index_buffer) PURE;
104 STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
105 STDMETHOD(UnlockVertexBuffer)(THIS) PURE;
106 STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, LPVOID* data) PURE;
107 STDMETHOD(UnlockIndexBuffer)(THIS) PURE;
108 STDMETHOD(GetAttributeTable)(THIS_ D3DXATTRIBUTERANGE* attrib_table, DWORD* attrib_table_size) PURE;
109 STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* point_reps, DWORD* adjacency) PURE;
110 STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* adjacency, DWORD* point_reps) PURE;
111 STDMETHOD(GenerateAdjacency)(THIS_ FLOAT epsilon, DWORD* adjacency) PURE;
112 STDMETHOD(UpdateSemantics)(THIS_ D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]) PURE;
113 /*** ID3DXMesh ***/
114 STDMETHOD(LockAttributeBuffer)(THIS_ DWORD flags, DWORD** data) PURE;
115 STDMETHOD(UnlockAttributeBuffer)(THIS) PURE;
116 STDMETHOD(Optimize)(THIS_ DWORD flags, CONST DWORD* adjacency_in, DWORD* adjacency_out,
117 DWORD* face_remap, LPD3DXBUFFER* vertex_remap, LPD3DXMESH* opt_mesh) PURE;
118 STDMETHOD(OptimizeInplace)(THIS_ DWORD flags, CONST DWORD* adjacency_in, DWORD* adjacency_out,
119 DWORD* face_remap, LPD3DXBUFFER* vertex_remap) PURE;
120 STDMETHOD(SetAttributeTable)(THIS_ CONST D3DXATTRIBUTERANGE* attrib_table, DWORD attrib_table_size) PURE;
123 #ifdef __cplusplus
124 extern "C" {
125 #endif
127 HRESULT WINAPI D3DXCreateBuffer(DWORD, LPD3DXBUFFER*);
128 UINT WINAPI D3DXGetDeclVertexSize(const D3DVERTEXELEMENT9 *decl, DWORD stream_idx);
129 UINT WINAPI D3DXGetFVFVertexSize(DWORD);
130 BOOL WINAPI D3DXBoxBoundProbe(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *);
131 BOOL WINAPI D3DXSphereBoundProbe(CONST D3DXVECTOR3 *,FLOAT,CONST D3DXVECTOR3 *,CONST D3DXVECTOR3 *);
132 HRESULT WINAPI D3DXComputeBoundingBox(CONST D3DXVECTOR3 *, DWORD, DWORD, D3DXVECTOR3 *, D3DXVECTOR3 *);
133 HRESULT WINAPI D3DXComputeBoundingSphere(CONST D3DXVECTOR3 *, DWORD, DWORD, D3DXVECTOR3 *, FLOAT *);
134 HRESULT WINAPI D3DXDeclaratorFromFVF(DWORD, D3DVERTEXELEMENT9[MAX_FVF_DECL_SIZE]);
135 BOOL WINAPI D3DXIntersectTri(CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3 *, CONST D3DXVECTOR3*, FLOAT *, FLOAT *, FLOAT *);
137 #ifdef __cplusplus
139 #endif
141 #endif /* __WINE_D3DX9MESH_H */