1 |
///////////////////////////////////////////////////////////////////////////
|
2 |
//
|
3 |
// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
|
4 |
//
|
5 |
// File: d3dx8shapes.h
|
6 |
// Content: D3DX simple shapes
|
7 |
//
|
8 |
///////////////////////////////////////////////////////////////////////////
|
9 |
|
10 |
#include "d3dx8.h"
|
11 |
|
12 |
#ifndef __D3DX8SHAPES_H__
|
13 |
#define __D3DX8SHAPES_H__
|
14 |
|
15 |
///////////////////////////////////////////////////////////////////////////
|
16 |
// Functions:
|
17 |
///////////////////////////////////////////////////////////////////////////
|
18 |
|
19 |
#ifdef __cplusplus
|
20 |
extern "C" {
|
21 |
#endif //__cplusplus
|
22 |
|
23 |
|
24 |
//-------------------------------------------------------------------------
|
25 |
// D3DXCreatePolygon:
|
26 |
// ------------------
|
27 |
// Creates a mesh containing an n-sided polygon. The polygon is centered
|
28 |
// at the origin.
|
29 |
//
|
30 |
// Parameters:
|
31 |
//
|
32 |
// pDevice The D3D device with which the mesh is going to be used.
|
33 |
// Length Length of each side.
|
34 |
// Sides Number of sides the polygon has. (Must be >= 3)
|
35 |
// ppMesh The mesh object which will be created
|
36 |
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
37 |
//-------------------------------------------------------------------------
|
38 |
HRESULT WINAPI
|
39 |
D3DXCreatePolygon(
|
40 |
LPDIRECT3DDEVICE8 pDevice,
|
41 |
FLOAT Length,
|
42 |
UINT Sides,
|
43 |
LPD3DXMESH* ppMesh,
|
44 |
LPD3DXBUFFER* ppAdjacency);
|
45 |
|
46 |
|
47 |
//-------------------------------------------------------------------------
|
48 |
// D3DXCreateBox:
|
49 |
// --------------
|
50 |
// Creates a mesh containing an axis-aligned box. The box is centered at
|
51 |
// the origin.
|
52 |
//
|
53 |
// Parameters:
|
54 |
//
|
55 |
// pDevice The D3D device with which the mesh is going to be used.
|
56 |
// Width Width of box (along X-axis)
|
57 |
// Height Height of box (along Y-axis)
|
58 |
// Depth Depth of box (along Z-axis)
|
59 |
// ppMesh The mesh object which will be created
|
60 |
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
61 |
//-------------------------------------------------------------------------
|
62 |
HRESULT WINAPI
|
63 |
D3DXCreateBox(
|
64 |
LPDIRECT3DDEVICE8 pDevice,
|
65 |
FLOAT Width,
|
66 |
FLOAT Height,
|
67 |
FLOAT Depth,
|
68 |
LPD3DXMESH* ppMesh,
|
69 |
LPD3DXBUFFER* ppAdjacency);
|
70 |
|
71 |
|
72 |
//-------------------------------------------------------------------------
|
73 |
// D3DXCreateCylinder:
|
74 |
// -------------------
|
75 |
// Creates a mesh containing a cylinder. The generated cylinder is
|
76 |
// centered at the origin, and its axis is aligned with the Z-axis.
|
77 |
//
|
78 |
// Parameters:
|
79 |
//
|
80 |
// pDevice The D3D device with which the mesh is going to be used.
|
81 |
// Radius1 Radius at -Z end (should be >= 0.0f)
|
82 |
// Radius2 Radius at +Z end (should be >= 0.0f)
|
83 |
// Length Length of cylinder (along Z-axis)
|
84 |
// Slices Number of slices about the main axis
|
85 |
// Stacks Number of stacks along the main axis
|
86 |
// ppMesh The mesh object which will be created
|
87 |
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
88 |
//-------------------------------------------------------------------------
|
89 |
HRESULT WINAPI
|
90 |
D3DXCreateCylinder(
|
91 |
LPDIRECT3DDEVICE8 pDevice,
|
92 |
FLOAT Radius1,
|
93 |
FLOAT Radius2,
|
94 |
FLOAT Length,
|
95 |
UINT Slices,
|
96 |
UINT Stacks,
|
97 |
LPD3DXMESH* ppMesh,
|
98 |
LPD3DXBUFFER* ppAdjacency);
|
99 |
|
100 |
|
101 |
//-------------------------------------------------------------------------
|
102 |
// D3DXCreateSphere:
|
103 |
// -----------------
|
104 |
// Creates a mesh containing a sphere. The sphere is centered at the
|
105 |
// origin.
|
106 |
//
|
107 |
// Parameters:
|
108 |
//
|
109 |
// pDevice The D3D device with which the mesh is going to be used.
|
110 |
// Radius Radius of the sphere (should be >= 0.0f)
|
111 |
// Slices Number of slices about the main axis
|
112 |
// Stacks Number of stacks along the main axis
|
113 |
// ppMesh The mesh object which will be created
|
114 |
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
115 |
//-------------------------------------------------------------------------
|
116 |
HRESULT WINAPI
|
117 |
D3DXCreateSphere(
|
118 |
LPDIRECT3DDEVICE8 pDevice,
|
119 |
FLOAT Radius,
|
120 |
UINT Slices,
|
121 |
UINT Stacks,
|
122 |
LPD3DXMESH* ppMesh,
|
123 |
LPD3DXBUFFER* ppAdjacency);
|
124 |
|
125 |
|
126 |
//-------------------------------------------------------------------------
|
127 |
// D3DXCreateTorus:
|
128 |
// ----------------
|
129 |
// Creates a mesh containing a torus. The generated torus is centered at
|
130 |
// the origin, and its axis is aligned with the Z-axis.
|
131 |
//
|
132 |
// Parameters:
|
133 |
//
|
134 |
// pDevice The D3D device with which the mesh is going to be used.
|
135 |
// InnerRadius Inner radius of the torus (should be >= 0.0f)
|
136 |
// OuterRadius Outer radius of the torue (should be >= 0.0f)
|
137 |
// Sides Number of sides in a cross-section (must be >= 3)
|
138 |
// Rings Number of rings making up the torus (must be >= 3)
|
139 |
// ppMesh The mesh object which will be created
|
140 |
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
141 |
//-------------------------------------------------------------------------
|
142 |
HRESULT WINAPI
|
143 |
D3DXCreateTorus(
|
144 |
LPDIRECT3DDEVICE8 pDevice,
|
145 |
FLOAT InnerRadius,
|
146 |
FLOAT OuterRadius,
|
147 |
UINT Sides,
|
148 |
UINT Rings,
|
149 |
LPD3DXMESH* ppMesh,
|
150 |
LPD3DXBUFFER* ppAdjacency);
|
151 |
|
152 |
|
153 |
//-------------------------------------------------------------------------
|
154 |
// D3DXCreateTeapot:
|
155 |
// -----------------
|
156 |
// Creates a mesh containing a teapot.
|
157 |
//
|
158 |
// Parameters:
|
159 |
//
|
160 |
// pDevice The D3D device with which the mesh is going to be used.
|
161 |
// ppMesh The mesh object which will be created
|
162 |
// ppAdjacency Returns a buffer containing adjacency info. Can be NULL.
|
163 |
//-------------------------------------------------------------------------
|
164 |
HRESULT WINAPI
|
165 |
D3DXCreateTeapot(
|
166 |
LPDIRECT3DDEVICE8 pDevice,
|
167 |
LPD3DXMESH* ppMesh,
|
168 |
LPD3DXBUFFER* ppAdjacency);
|
169 |
|
170 |
|
171 |
//-------------------------------------------------------------------------
|
172 |
// D3DXCreateText:
|
173 |
// ---------------
|
174 |
// Creates a mesh containing the specified text using the font associated
|
175 |
// with the device context.
|
176 |
//
|
177 |
// Parameters:
|
178 |
//
|
179 |
// pDevice The D3D device with which the mesh is going to be used.
|
180 |
// hDC Device context, with desired font selected
|
181 |
// pText Text to generate
|
182 |
// Deviation Maximum chordal deviation from true font outlines
|
183 |
// Extrusion Amount to extrude text in -Z direction
|
184 |
// ppMesh The mesh object which will be created
|
185 |
// pGlyphMetrics Address of buffer to receive glyph metric data (or NULL)
|
186 |
//-------------------------------------------------------------------------
|
187 |
HRESULT WINAPI
|
188 |
D3DXCreateTextA(
|
189 |
LPDIRECT3DDEVICE8 pDevice,
|
190 |
HDC hDC,
|
191 |
LPCSTR pText,
|
192 |
FLOAT Deviation,
|
193 |
FLOAT Extrusion,
|
194 |
LPD3DXMESH* ppMesh,
|
195 |
LPGLYPHMETRICSFLOAT pGlyphMetrics);
|
196 |
|
197 |
HRESULT WINAPI
|
198 |
D3DXCreateTextW(
|
199 |
LPDIRECT3DDEVICE8 pDevice,
|
200 |
HDC hDC,
|
201 |
LPCWSTR pText,
|
202 |
FLOAT Deviation,
|
203 |
FLOAT Extrusion,
|
204 |
LPD3DXMESH* ppMesh,
|
205 |
LPGLYPHMETRICSFLOAT pGlyphMetrics);
|
206 |
|
207 |
#ifdef UNICODE
|
208 |
#define D3DXCreateText D3DXCreateTextW
|
209 |
#else
|
210 |
#define D3DXCreateText D3DXCreateTextA
|
211 |
#endif
|
212 |
|
213 |
|
214 |
#ifdef __cplusplus
|
215 |
}
|
216 |
#endif //__cplusplus
|
217 |
|
218 |
#endif //__D3DX8SHAPES_H__
|