annotate lib/legacy_dx/d3drmdef.h @ 1615:89dec2be255f

AI visibility issue temporarily fixed
author zipi
date Sat, 14 Sep 2013 22:02:56 +0100
parents 9c0607679772
children
rev   line source
0
Ritor1
parents:
diff changeset
1 /*==========================================================================;
Ritor1
parents:
diff changeset
2 *
Ritor1
parents:
diff changeset
3 * Copyright (c) Microsoft Corporation. All rights reserved.
Ritor1
parents:
diff changeset
4 *
Ritor1
parents:
diff changeset
5 * File: d3drm.h
Ritor1
parents:
diff changeset
6 * Content: Direct3DRM include file
Ritor1
parents:
diff changeset
7 *
Ritor1
parents:
diff changeset
8 ***************************************************************************/
Ritor1
parents:
diff changeset
9
Ritor1
parents:
diff changeset
10 #ifndef __D3DRMDEFS_H__
Ritor1
parents:
diff changeset
11 #define __D3DRMDEFS_H__
Ritor1
parents:
diff changeset
12
Ritor1
parents:
diff changeset
13 #include <stddef.h>
Ritor1
parents:
diff changeset
14 #include "d3dtypes.h"
Ritor1
parents:
diff changeset
15
Ritor1
parents:
diff changeset
16 #ifdef WIN32
Ritor1
parents:
diff changeset
17 #define D3DRMAPI __stdcall
Ritor1
parents:
diff changeset
18 #else
Ritor1
parents:
diff changeset
19 #define D3DRMAPI
Ritor1
parents:
diff changeset
20 #endif
Ritor1
parents:
diff changeset
21
Ritor1
parents:
diff changeset
22 #if defined(__cplusplus)
Ritor1
parents:
diff changeset
23 extern "C" {
Ritor1
parents:
diff changeset
24 #endif
Ritor1
parents:
diff changeset
25
Ritor1
parents:
diff changeset
26 #ifndef TRUE
Ritor1
parents:
diff changeset
27 #define FALSE 0
Ritor1
parents:
diff changeset
28 #define TRUE 1
Ritor1
parents:
diff changeset
29 #endif
Ritor1
parents:
diff changeset
30
Ritor1
parents:
diff changeset
31 typedef struct _D3DRMVECTOR4D
Ritor1
parents:
diff changeset
32 { D3DVALUE x, y, z, w;
Ritor1
parents:
diff changeset
33 } D3DRMVECTOR4D, *LPD3DRMVECTOR4D;
Ritor1
parents:
diff changeset
34
Ritor1
parents:
diff changeset
35 typedef D3DVALUE D3DRMMATRIX4D[4][4];
Ritor1
parents:
diff changeset
36
Ritor1
parents:
diff changeset
37 typedef struct _D3DRMQUATERNION
Ritor1
parents:
diff changeset
38 { D3DVALUE s;
Ritor1
parents:
diff changeset
39 D3DVECTOR v;
Ritor1
parents:
diff changeset
40 } D3DRMQUATERNION, *LPD3DRMQUATERNION;
Ritor1
parents:
diff changeset
41
Ritor1
parents:
diff changeset
42 typedef struct _D3DRMRAY
Ritor1
parents:
diff changeset
43 { D3DVECTOR dvDir;
Ritor1
parents:
diff changeset
44 D3DVECTOR dvPos;
Ritor1
parents:
diff changeset
45 } D3DRMRAY, *LPD3DRMRAY;
Ritor1
parents:
diff changeset
46
Ritor1
parents:
diff changeset
47 typedef struct _D3DRMBOX
Ritor1
parents:
diff changeset
48 { D3DVECTOR min, max;
Ritor1
parents:
diff changeset
49 } D3DRMBOX, *LPD3DRMBOX;
Ritor1
parents:
diff changeset
50
Ritor1
parents:
diff changeset
51 typedef void (*D3DRMWRAPCALLBACK)
Ritor1
parents:
diff changeset
52 (LPD3DVECTOR, int* u, int* v, LPD3DVECTOR a, LPD3DVECTOR b, LPVOID);
Ritor1
parents:
diff changeset
53
Ritor1
parents:
diff changeset
54 typedef enum _D3DRMLIGHTTYPE
Ritor1
parents:
diff changeset
55 { D3DRMLIGHT_AMBIENT,
Ritor1
parents:
diff changeset
56 D3DRMLIGHT_POINT,
Ritor1
parents:
diff changeset
57 D3DRMLIGHT_SPOT,
Ritor1
parents:
diff changeset
58 D3DRMLIGHT_DIRECTIONAL,
Ritor1
parents:
diff changeset
59 D3DRMLIGHT_PARALLELPOINT
Ritor1
parents:
diff changeset
60 } D3DRMLIGHTTYPE, *LPD3DRMLIGHTTYPE;
Ritor1
parents:
diff changeset
61
Ritor1
parents:
diff changeset
62 typedef enum _D3DRMSHADEMODE {
Ritor1
parents:
diff changeset
63 D3DRMSHADE_FLAT = 0,
Ritor1
parents:
diff changeset
64 D3DRMSHADE_GOURAUD = 1,
Ritor1
parents:
diff changeset
65 D3DRMSHADE_PHONG = 2,
Ritor1
parents:
diff changeset
66
Ritor1
parents:
diff changeset
67 D3DRMSHADE_MASK = 7,
Ritor1
parents:
diff changeset
68 D3DRMSHADE_MAX = 8
Ritor1
parents:
diff changeset
69 } D3DRMSHADEMODE, *LPD3DRMSHADEMODE;
Ritor1
parents:
diff changeset
70
Ritor1
parents:
diff changeset
71 typedef enum _D3DRMLIGHTMODE {
Ritor1
parents:
diff changeset
72 D3DRMLIGHT_OFF = 0 * D3DRMSHADE_MAX,
Ritor1
parents:
diff changeset
73 D3DRMLIGHT_ON = 1 * D3DRMSHADE_MAX,
Ritor1
parents:
diff changeset
74
Ritor1
parents:
diff changeset
75 D3DRMLIGHT_MASK = 7 * D3DRMSHADE_MAX,
Ritor1
parents:
diff changeset
76 D3DRMLIGHT_MAX = 8 * D3DRMSHADE_MAX
Ritor1
parents:
diff changeset
77 } D3DRMLIGHTMODE, *LPD3DRMLIGHTMODE;
Ritor1
parents:
diff changeset
78
Ritor1
parents:
diff changeset
79 typedef enum _D3DRMFILLMODE {
Ritor1
parents:
diff changeset
80 D3DRMFILL_POINTS = 0 * D3DRMLIGHT_MAX,
Ritor1
parents:
diff changeset
81 D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX,
Ritor1
parents:
diff changeset
82 D3DRMFILL_SOLID = 2 * D3DRMLIGHT_MAX,
Ritor1
parents:
diff changeset
83
Ritor1
parents:
diff changeset
84 D3DRMFILL_MASK = 7 * D3DRMLIGHT_MAX,
Ritor1
parents:
diff changeset
85 D3DRMFILL_MAX = 8 * D3DRMLIGHT_MAX
Ritor1
parents:
diff changeset
86 } D3DRMFILLMODE, *LPD3DRMFILLMODE;
Ritor1
parents:
diff changeset
87
Ritor1
parents:
diff changeset
88 typedef DWORD D3DRMRENDERQUALITY, *LPD3DRMRENDERQUALITY;
Ritor1
parents:
diff changeset
89
Ritor1
parents:
diff changeset
90 #define D3DRMRENDER_WIREFRAME (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_WIREFRAME)
Ritor1
parents:
diff changeset
91 #define D3DRMRENDER_UNLITFLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_SOLID)
Ritor1
parents:
diff changeset
92 #define D3DRMRENDER_FLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
Ritor1
parents:
diff changeset
93 #define D3DRMRENDER_GOURAUD (D3DRMSHADE_GOURAUD+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
Ritor1
parents:
diff changeset
94 #define D3DRMRENDER_PHONG (D3DRMSHADE_PHONG+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
Ritor1
parents:
diff changeset
95
Ritor1
parents:
diff changeset
96 #define D3DRMRENDERMODE_BLENDEDTRANSPARENCY 1
Ritor1
parents:
diff changeset
97 #define D3DRMRENDERMODE_SORTEDTRANSPARENCY 2
Ritor1
parents:
diff changeset
98 #define D3DRMRENDERMODE_LIGHTINMODELSPACE 8
Ritor1
parents:
diff changeset
99 #define D3DRMRENDERMODE_VIEWDEPENDENTSPECULAR 16
Ritor1
parents:
diff changeset
100 #define D3DRMRENDERMODE_DISABLESORTEDALPHAZWRITE 32
Ritor1
parents:
diff changeset
101
Ritor1
parents:
diff changeset
102 typedef enum _D3DRMTEXTUREQUALITY
Ritor1
parents:
diff changeset
103 { D3DRMTEXTURE_NEAREST, /* choose nearest texel */
Ritor1
parents:
diff changeset
104 D3DRMTEXTURE_LINEAR, /* interpolate 4 texels */
Ritor1
parents:
diff changeset
105 D3DRMTEXTURE_MIPNEAREST, /* nearest texel in nearest mipmap */
Ritor1
parents:
diff changeset
106 D3DRMTEXTURE_MIPLINEAR, /* interpolate 2 texels from 2 mipmaps */
Ritor1
parents:
diff changeset
107 D3DRMTEXTURE_LINEARMIPNEAREST, /* interpolate 4 texels in nearest mipmap */
Ritor1
parents:
diff changeset
108 D3DRMTEXTURE_LINEARMIPLINEAR /* interpolate 8 texels from 2 mipmaps */
Ritor1
parents:
diff changeset
109 } D3DRMTEXTUREQUALITY, *LPD3DRMTEXTUREQUALITY;
Ritor1
parents:
diff changeset
110
Ritor1
parents:
diff changeset
111 /*
Ritor1
parents:
diff changeset
112 * Texture flags
Ritor1
parents:
diff changeset
113 */
Ritor1
parents:
diff changeset
114 #define D3DRMTEXTURE_FORCERESIDENT 0x00000001 /* texture should be kept in video memory */
Ritor1
parents:
diff changeset
115 #define D3DRMTEXTURE_STATIC 0x00000002 /* texture will not change */
Ritor1
parents:
diff changeset
116 #define D3DRMTEXTURE_DOWNSAMPLEPOINT 0x00000004 /* point filtering should be used when downsampling */
Ritor1
parents:
diff changeset
117 #define D3DRMTEXTURE_DOWNSAMPLEBILINEAR 0x00000008 /* bilinear filtering should be used when downsampling */
Ritor1
parents:
diff changeset
118 #define D3DRMTEXTURE_DOWNSAMPLEREDUCEDEPTH 0x00000010 /* reduce bit depth when downsampling */
Ritor1
parents:
diff changeset
119 #define D3DRMTEXTURE_DOWNSAMPLENONE 0x00000020 /* texture should never be downsampled */
Ritor1
parents:
diff changeset
120 #define D3DRMTEXTURE_CHANGEDPIXELS 0x00000040 /* pixels have changed */
Ritor1
parents:
diff changeset
121 #define D3DRMTEXTURE_CHANGEDPALETTE 0x00000080 /* palette has changed */
Ritor1
parents:
diff changeset
122 #define D3DRMTEXTURE_INVALIDATEONLY 0x00000100 /* dirty regions are invalid */
Ritor1
parents:
diff changeset
123
Ritor1
parents:
diff changeset
124 /*
Ritor1
parents:
diff changeset
125 * Shadow flags
Ritor1
parents:
diff changeset
126 */
Ritor1
parents:
diff changeset
127 #define D3DRMSHADOW_TRUEALPHA 0x00000001 /* shadow should render without artifacts when true alpha is on */
Ritor1
parents:
diff changeset
128
Ritor1
parents:
diff changeset
129 typedef enum _D3DRMCOMBINETYPE
Ritor1
parents:
diff changeset
130 { D3DRMCOMBINE_REPLACE,
Ritor1
parents:
diff changeset
131 D3DRMCOMBINE_BEFORE,
Ritor1
parents:
diff changeset
132 D3DRMCOMBINE_AFTER
Ritor1
parents:
diff changeset
133 } D3DRMCOMBINETYPE, *LPD3DRMCOMBINETYPE;
Ritor1
parents:
diff changeset
134
Ritor1
parents:
diff changeset
135 typedef D3DCOLORMODEL D3DRMCOLORMODEL, *LPD3DRMCOLORMODEL;
Ritor1
parents:
diff changeset
136
Ritor1
parents:
diff changeset
137 typedef enum _D3DRMPALETTEFLAGS
Ritor1
parents:
diff changeset
138 { D3DRMPALETTE_FREE, /* renderer may use this entry freely */
Ritor1
parents:
diff changeset
139 D3DRMPALETTE_READONLY, /* fixed but may be used by renderer */
Ritor1
parents:
diff changeset
140 D3DRMPALETTE_RESERVED /* may not be used by renderer */
Ritor1
parents:
diff changeset
141 } D3DRMPALETTEFLAGS, *LPD3DRMPALETTEFLAGS;
Ritor1
parents:
diff changeset
142
Ritor1
parents:
diff changeset
143 typedef struct _D3DRMPALETTEENTRY
Ritor1
parents:
diff changeset
144 { unsigned char red; /* 0 .. 255 */
Ritor1
parents:
diff changeset
145 unsigned char green; /* 0 .. 255 */
Ritor1
parents:
diff changeset
146 unsigned char blue; /* 0 .. 255 */
Ritor1
parents:
diff changeset
147 unsigned char flags; /* one of D3DRMPALETTEFLAGS */
Ritor1
parents:
diff changeset
148 } D3DRMPALETTEENTRY, *LPD3DRMPALETTEENTRY;
Ritor1
parents:
diff changeset
149
Ritor1
parents:
diff changeset
150 typedef struct _D3DRMIMAGE
Ritor1
parents:
diff changeset
151 { int width, height; /* width and height in pixels */
Ritor1
parents:
diff changeset
152 int aspectx, aspecty; /* aspect ratio for non-square pixels */
Ritor1
parents:
diff changeset
153 int depth; /* bits per pixel */
Ritor1
parents:
diff changeset
154 int rgb; /* if false, pixels are indices into a
Ritor1
parents:
diff changeset
155 palette otherwise, pixels encode
Ritor1
parents:
diff changeset
156 RGB values. */
Ritor1
parents:
diff changeset
157 int bytes_per_line; /* number of bytes of memory for a
Ritor1
parents:
diff changeset
158 scanline. This must be a multiple
Ritor1
parents:
diff changeset
159 of 4. */
Ritor1
parents:
diff changeset
160 void* buffer1; /* memory to render into (first buffer). */
Ritor1
parents:
diff changeset
161 void* buffer2; /* second rendering buffer for double
Ritor1
parents:
diff changeset
162 buffering, set to NULL for single
Ritor1
parents:
diff changeset
163 buffering. */
Ritor1
parents:
diff changeset
164 unsigned long red_mask;
Ritor1
parents:
diff changeset
165 unsigned long green_mask;
Ritor1
parents:
diff changeset
166 unsigned long blue_mask;
Ritor1
parents:
diff changeset
167 unsigned long alpha_mask; /* if rgb is true, these are masks for
Ritor1
parents:
diff changeset
168 the red, green and blue parts of a
Ritor1
parents:
diff changeset
169 pixel. Otherwise, these are masks
Ritor1
parents:
diff changeset
170 for the significant bits of the
Ritor1
parents:
diff changeset
171 red, green and blue elements in the
Ritor1
parents:
diff changeset
172 palette. For instance, most SVGA
Ritor1
parents:
diff changeset
173 displays use 64 intensities of red,
Ritor1
parents:
diff changeset
174 green and blue, so the masks should
Ritor1
parents:
diff changeset
175 all be set to 0xfc. */
Ritor1
parents:
diff changeset
176 int palette_size; /* number of entries in palette */
Ritor1
parents:
diff changeset
177 D3DRMPALETTEENTRY* palette; /* description of the palette (only if
Ritor1
parents:
diff changeset
178 rgb is false). Must be (1<<depth)
Ritor1
parents:
diff changeset
179 elements. */
Ritor1
parents:
diff changeset
180 } D3DRMIMAGE, *LPD3DRMIMAGE;
Ritor1
parents:
diff changeset
181
Ritor1
parents:
diff changeset
182 typedef enum _D3DRMWRAPTYPE
Ritor1
parents:
diff changeset
183 { D3DRMWRAP_FLAT,
Ritor1
parents:
diff changeset
184 D3DRMWRAP_CYLINDER,
Ritor1
parents:
diff changeset
185 D3DRMWRAP_SPHERE,
Ritor1
parents:
diff changeset
186 D3DRMWRAP_CHROME,
Ritor1
parents:
diff changeset
187 D3DRMWRAP_SHEET,
Ritor1
parents:
diff changeset
188 D3DRMWRAP_BOX
Ritor1
parents:
diff changeset
189 } D3DRMWRAPTYPE, *LPD3DRMWRAPTYPE;
Ritor1
parents:
diff changeset
190
Ritor1
parents:
diff changeset
191 #define D3DRMWIREFRAME_CULL 1 /* cull backfaces */
Ritor1
parents:
diff changeset
192 #define D3DRMWIREFRAME_HIDDENLINE 2 /* lines are obscured by closer objects */
Ritor1
parents:
diff changeset
193
Ritor1
parents:
diff changeset
194 /*
Ritor1
parents:
diff changeset
195 * Do not use righthanded perspective in Viewport2::SetProjection().
Ritor1
parents:
diff changeset
196 * Set up righthanded mode by using IDirect3DRM3::SetOptions().
Ritor1
parents:
diff changeset
197 */
Ritor1
parents:
diff changeset
198 typedef enum _D3DRMPROJECTIONTYPE
Ritor1
parents:
diff changeset
199 { D3DRMPROJECT_PERSPECTIVE,
Ritor1
parents:
diff changeset
200 D3DRMPROJECT_ORTHOGRAPHIC,
Ritor1
parents:
diff changeset
201 D3DRMPROJECT_RIGHTHANDPERSPECTIVE, /* Only valid pre-DX6 */
Ritor1
parents:
diff changeset
202 D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC /* Only valid pre-DX6 */
Ritor1
parents:
diff changeset
203 } D3DRMPROJECTIONTYPE, *LPD3DRMPROJECTIONTYPE;
Ritor1
parents:
diff changeset
204
Ritor1
parents:
diff changeset
205 #define D3DRMOPTIONS_LEFTHANDED 0x00000001L /* Default */
Ritor1
parents:
diff changeset
206 #define D3DRMOPTIONS_RIGHTHANDED 0x00000002L
Ritor1
parents:
diff changeset
207
Ritor1
parents:
diff changeset
208 typedef enum _D3DRMXOFFORMAT
Ritor1
parents:
diff changeset
209 { D3DRMXOF_BINARY,
Ritor1
parents:
diff changeset
210 D3DRMXOF_COMPRESSED,
Ritor1
parents:
diff changeset
211 D3DRMXOF_TEXT
Ritor1
parents:
diff changeset
212 } D3DRMXOFFORMAT, *LPD3DRMXOFFORMAT;
Ritor1
parents:
diff changeset
213
Ritor1
parents:
diff changeset
214 typedef DWORD D3DRMSAVEOPTIONS;
Ritor1
parents:
diff changeset
215 #define D3DRMXOFSAVE_NORMALS 1
Ritor1
parents:
diff changeset
216 #define D3DRMXOFSAVE_TEXTURECOORDINATES 2
Ritor1
parents:
diff changeset
217 #define D3DRMXOFSAVE_MATERIALS 4
Ritor1
parents:
diff changeset
218 #define D3DRMXOFSAVE_TEXTURENAMES 8
Ritor1
parents:
diff changeset
219 #define D3DRMXOFSAVE_ALL 15
Ritor1
parents:
diff changeset
220 #define D3DRMXOFSAVE_TEMPLATES 16
Ritor1
parents:
diff changeset
221 #define D3DRMXOFSAVE_TEXTURETOPOLOGY 32
Ritor1
parents:
diff changeset
222
Ritor1
parents:
diff changeset
223 typedef enum _D3DRMCOLORSOURCE
Ritor1
parents:
diff changeset
224 { D3DRMCOLOR_FROMFACE,
Ritor1
parents:
diff changeset
225 D3DRMCOLOR_FROMVERTEX
Ritor1
parents:
diff changeset
226 } D3DRMCOLORSOURCE, *LPD3DRMCOLORSOURCE;
Ritor1
parents:
diff changeset
227
Ritor1
parents:
diff changeset
228 typedef enum _D3DRMFRAMECONSTRAINT
Ritor1
parents:
diff changeset
229 { D3DRMCONSTRAIN_Z, /* use only X and Y rotations */
Ritor1
parents:
diff changeset
230 D3DRMCONSTRAIN_Y, /* use only X and Z rotations */
Ritor1
parents:
diff changeset
231 D3DRMCONSTRAIN_X /* use only Y and Z rotations */
Ritor1
parents:
diff changeset
232 } D3DRMFRAMECONSTRAINT, *LPD3DRMFRAMECONSTRAINT;
Ritor1
parents:
diff changeset
233
Ritor1
parents:
diff changeset
234 typedef enum _D3DRMMATERIALMODE
Ritor1
parents:
diff changeset
235 { D3DRMMATERIAL_FROMMESH,
Ritor1
parents:
diff changeset
236 D3DRMMATERIAL_FROMPARENT,
Ritor1
parents:
diff changeset
237 D3DRMMATERIAL_FROMFRAME
Ritor1
parents:
diff changeset
238 } D3DRMMATERIALMODE, *LPD3DRMMATERIALMODE;
Ritor1
parents:
diff changeset
239
Ritor1
parents:
diff changeset
240 typedef enum _D3DRMFOGMODE
Ritor1
parents:
diff changeset
241 { D3DRMFOG_LINEAR, /* linear between start and end */
Ritor1
parents:
diff changeset
242 D3DRMFOG_EXPONENTIAL, /* density * exp(-distance) */
Ritor1
parents:
diff changeset
243 D3DRMFOG_EXPONENTIALSQUARED /* density * exp(-distance*distance) */
Ritor1
parents:
diff changeset
244 } D3DRMFOGMODE, *LPD3DRMFOGMODE;
Ritor1
parents:
diff changeset
245
Ritor1
parents:
diff changeset
246 typedef enum _D3DRMZBUFFERMODE {
Ritor1
parents:
diff changeset
247 D3DRMZBUFFER_FROMPARENT, /* default */
Ritor1
parents:
diff changeset
248 D3DRMZBUFFER_ENABLE, /* enable zbuffering */
Ritor1
parents:
diff changeset
249 D3DRMZBUFFER_DISABLE /* disable zbuffering */
Ritor1
parents:
diff changeset
250 } D3DRMZBUFFERMODE, *LPD3DRMZBUFFERMODE;
Ritor1
parents:
diff changeset
251
Ritor1
parents:
diff changeset
252 typedef enum _D3DRMSORTMODE {
Ritor1
parents:
diff changeset
253 D3DRMSORT_FROMPARENT, /* default */
Ritor1
parents:
diff changeset
254 D3DRMSORT_NONE, /* don't sort child frames */
Ritor1
parents:
diff changeset
255 D3DRMSORT_FRONTTOBACK, /* sort child frames front-to-back */
Ritor1
parents:
diff changeset
256 D3DRMSORT_BACKTOFRONT /* sort child frames back-to-front */
Ritor1
parents:
diff changeset
257 } D3DRMSORTMODE, *LPD3DRMSORTMODE;
Ritor1
parents:
diff changeset
258
Ritor1
parents:
diff changeset
259 typedef struct _D3DRMMATERIALOVERRIDE
Ritor1
parents:
diff changeset
260 {
Ritor1
parents:
diff changeset
261 DWORD dwSize; /* Size of this structure */
Ritor1
parents:
diff changeset
262 DWORD dwFlags; /* Indicate which fields are valid */
Ritor1
parents:
diff changeset
263 D3DCOLORVALUE dcDiffuse; /* RGBA */
Ritor1
parents:
diff changeset
264 D3DCOLORVALUE dcAmbient; /* RGB */
Ritor1
parents:
diff changeset
265 D3DCOLORVALUE dcEmissive; /* RGB */
Ritor1
parents:
diff changeset
266 D3DCOLORVALUE dcSpecular; /* RGB */
Ritor1
parents:
diff changeset
267 D3DVALUE dvPower;
Ritor1
parents:
diff changeset
268 LPUNKNOWN lpD3DRMTex;
Ritor1
parents:
diff changeset
269 } D3DRMMATERIALOVERRIDE, *LPD3DRMMATERIALOVERRIDE;
Ritor1
parents:
diff changeset
270
Ritor1
parents:
diff changeset
271 #define D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAONLY 0x00000001L
Ritor1
parents:
diff changeset
272 #define D3DRMMATERIALOVERRIDE_DIFFUSE_RGBONLY 0x00000002L
Ritor1
parents:
diff changeset
273 #define D3DRMMATERIALOVERRIDE_DIFFUSE 0x00000003L
Ritor1
parents:
diff changeset
274 #define D3DRMMATERIALOVERRIDE_AMBIENT 0x00000004L
Ritor1
parents:
diff changeset
275 #define D3DRMMATERIALOVERRIDE_EMISSIVE 0x00000008L
Ritor1
parents:
diff changeset
276 #define D3DRMMATERIALOVERRIDE_SPECULAR 0x00000010L
Ritor1
parents:
diff changeset
277 #define D3DRMMATERIALOVERRIDE_POWER 0x00000020L
Ritor1
parents:
diff changeset
278 #define D3DRMMATERIALOVERRIDE_TEXTURE 0x00000040L
Ritor1
parents:
diff changeset
279 #define D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAMULTIPLY 0x00000080L
Ritor1
parents:
diff changeset
280 #define D3DRMMATERIALOVERRIDE_ALL 0x000000FFL
Ritor1
parents:
diff changeset
281
Ritor1
parents:
diff changeset
282 #define D3DRMFPTF_ALPHA 0x00000001L
Ritor1
parents:
diff changeset
283 #define D3DRMFPTF_NOALPHA 0x00000002L
Ritor1
parents:
diff changeset
284 #define D3DRMFPTF_PALETTIZED 0x00000004L
Ritor1
parents:
diff changeset
285 #define D3DRMFPTF_NOTPALETTIZED 0x00000008L
Ritor1
parents:
diff changeset
286
Ritor1
parents:
diff changeset
287 #define D3DRMSTATECHANGE_UPDATEONLY 0x000000001L
Ritor1
parents:
diff changeset
288 #define D3DRMSTATECHANGE_VOLATILE 0x000000002L
Ritor1
parents:
diff changeset
289 #define D3DRMSTATECHANGE_NONVOLATILE 0x000000004L
Ritor1
parents:
diff changeset
290 #define D3DRMSTATECHANGE_RENDER 0x000000020L
Ritor1
parents:
diff changeset
291 #define D3DRMSTATECHANGE_LIGHT 0x000000040L
Ritor1
parents:
diff changeset
292
Ritor1
parents:
diff changeset
293 /*
Ritor1
parents:
diff changeset
294 * Values for flags in RM3::CreateDeviceFromSurface
Ritor1
parents:
diff changeset
295 */
Ritor1
parents:
diff changeset
296 #define D3DRMDEVICE_NOZBUFFER 0x00000001L
Ritor1
parents:
diff changeset
297
Ritor1
parents:
diff changeset
298 /*
Ritor1
parents:
diff changeset
299 * Values for flags in Object2::SetClientData
Ritor1
parents:
diff changeset
300 */
Ritor1
parents:
diff changeset
301 #define D3DRMCLIENTDATA_NONE 0x00000001L
Ritor1
parents:
diff changeset
302 #define D3DRMCLIENTDATA_LOCALFREE 0x00000002L
Ritor1
parents:
diff changeset
303 #define D3DRMCLIENTDATA_IUNKNOWN 0x00000004L
Ritor1
parents:
diff changeset
304
Ritor1
parents:
diff changeset
305 /*
Ritor1
parents:
diff changeset
306 * Values for flags in Frame2::AddMoveCallback.
Ritor1
parents:
diff changeset
307 */
Ritor1
parents:
diff changeset
308 #define D3DRMCALLBACK_PREORDER 0
Ritor1
parents:
diff changeset
309 #define D3DRMCALLBACK_POSTORDER 1
Ritor1
parents:
diff changeset
310
Ritor1
parents:
diff changeset
311 /*
Ritor1
parents:
diff changeset
312 * Values for flags in MeshBuilder2::RayPick.
Ritor1
parents:
diff changeset
313 */
Ritor1
parents:
diff changeset
314 #define D3DRMRAYPICK_ONLYBOUNDINGBOXES 1
Ritor1
parents:
diff changeset
315 #define D3DRMRAYPICK_IGNOREFURTHERPRIMITIVES 2
Ritor1
parents:
diff changeset
316 #define D3DRMRAYPICK_INTERPOLATEUV 4
Ritor1
parents:
diff changeset
317 #define D3DRMRAYPICK_INTERPOLATECOLOR 8
Ritor1
parents:
diff changeset
318 #define D3DRMRAYPICK_INTERPOLATENORMAL 0x10
Ritor1
parents:
diff changeset
319
Ritor1
parents:
diff changeset
320 /*
Ritor1
parents:
diff changeset
321 * Values for flags in MeshBuilder3::AddFacesIndexed.
Ritor1
parents:
diff changeset
322 */
Ritor1
parents:
diff changeset
323 #define D3DRMADDFACES_VERTICESONLY 1
Ritor1
parents:
diff changeset
324
Ritor1
parents:
diff changeset
325 /*
Ritor1
parents:
diff changeset
326 * Values for flags in MeshBuilder2::GenerateNormals.
Ritor1
parents:
diff changeset
327 */
Ritor1
parents:
diff changeset
328 #define D3DRMGENERATENORMALS_PRECOMPACT 1
Ritor1
parents:
diff changeset
329 #define D3DRMGENERATENORMALS_USECREASEANGLE 2
Ritor1
parents:
diff changeset
330
Ritor1
parents:
diff changeset
331 /*
Ritor1
parents:
diff changeset
332 * Values for MeshBuilder3::GetParentMesh
Ritor1
parents:
diff changeset
333 */
Ritor1
parents:
diff changeset
334 #define D3DRMMESHBUILDER_DIRECTPARENT 1
Ritor1
parents:
diff changeset
335 #define D3DRMMESHBUILDER_ROOTMESH 2
Ritor1
parents:
diff changeset
336
Ritor1
parents:
diff changeset
337 /*
Ritor1
parents:
diff changeset
338 * Flags for MeshBuilder3::Enable
Ritor1
parents:
diff changeset
339 */
Ritor1
parents:
diff changeset
340 #define D3DRMMESHBUILDER_RENDERENABLE 0x00000001L
Ritor1
parents:
diff changeset
341 #define D3DRMMESHBUILDER_PICKENABLE 0x00000002L
Ritor1
parents:
diff changeset
342
Ritor1
parents:
diff changeset
343 /*
Ritor1
parents:
diff changeset
344 * Flags for MeshBuilder3::AddMeshBuilder
Ritor1
parents:
diff changeset
345 */
Ritor1
parents:
diff changeset
346 #define D3DRMADDMESHBUILDER_DONTCOPYAPPDATA 1
Ritor1
parents:
diff changeset
347 #define D3DRMADDMESHBUILDER_FLATTENSUBMESHES 2
Ritor1
parents:
diff changeset
348 #define D3DRMADDMESHBUILDER_NOSUBMESHES 4
Ritor1
parents:
diff changeset
349
Ritor1
parents:
diff changeset
350 /*
Ritor1
parents:
diff changeset
351 * Flags for Object2::GetAge when used with MeshBuilders
Ritor1
parents:
diff changeset
352 */
Ritor1
parents:
diff changeset
353 #define D3DRMMESHBUILDERAGE_GEOMETRY 0x00000001L
Ritor1
parents:
diff changeset
354 #define D3DRMMESHBUILDERAGE_MATERIALS 0x00000002L
Ritor1
parents:
diff changeset
355 #define D3DRMMESHBUILDERAGE_TEXTURES 0x00000004L
Ritor1
parents:
diff changeset
356
Ritor1
parents:
diff changeset
357 /*
Ritor1
parents:
diff changeset
358 * Format flags for MeshBuilder3::AddTriangles.
Ritor1
parents:
diff changeset
359 */
Ritor1
parents:
diff changeset
360 #define D3DRMFVF_TYPE 0x00000001L
Ritor1
parents:
diff changeset
361 #define D3DRMFVF_NORMAL 0x00000002L
Ritor1
parents:
diff changeset
362 #define D3DRMFVF_COLOR 0x00000004L
Ritor1
parents:
diff changeset
363 #define D3DRMFVF_TEXTURECOORDS 0x00000008L
Ritor1
parents:
diff changeset
364
Ritor1
parents:
diff changeset
365 #define D3DRMVERTEX_STRIP 0x00000001L
Ritor1
parents:
diff changeset
366 #define D3DRMVERTEX_FAN 0x00000002L
Ritor1
parents:
diff changeset
367 #define D3DRMVERTEX_LIST 0x00000004L
Ritor1
parents:
diff changeset
368
Ritor1
parents:
diff changeset
369 /*
Ritor1
parents:
diff changeset
370 * Values for flags in Viewport2::Clear2
Ritor1
parents:
diff changeset
371 */
Ritor1
parents:
diff changeset
372 #define D3DRMCLEAR_TARGET 0x00000001L
Ritor1
parents:
diff changeset
373 #define D3DRMCLEAR_ZBUFFER 0x00000002L
Ritor1
parents:
diff changeset
374 #define D3DRMCLEAR_DIRTYRECTS 0x00000004L
Ritor1
parents:
diff changeset
375 #define D3DRMCLEAR_ALL (D3DRMCLEAR_TARGET | \
Ritor1
parents:
diff changeset
376 D3DRMCLEAR_ZBUFFER | \
Ritor1
parents:
diff changeset
377 D3DRMCLEAR_DIRTYRECTS)
Ritor1
parents:
diff changeset
378
Ritor1
parents:
diff changeset
379 /*
Ritor1
parents:
diff changeset
380 * Values for flags in Frame3::SetSceneFogMethod
Ritor1
parents:
diff changeset
381 */
Ritor1
parents:
diff changeset
382 #define D3DRMFOGMETHOD_VERTEX 0x00000001L
Ritor1
parents:
diff changeset
383 #define D3DRMFOGMETHOD_TABLE 0x00000002L
Ritor1
parents:
diff changeset
384 #define D3DRMFOGMETHOD_ANY 0x00000004L
Ritor1
parents:
diff changeset
385
Ritor1
parents:
diff changeset
386 /*
Ritor1
parents:
diff changeset
387 * Values for flags in Frame3::SetTraversalOptions
Ritor1
parents:
diff changeset
388 */
Ritor1
parents:
diff changeset
389 #define D3DRMFRAME_RENDERENABLE 0x00000001L
Ritor1
parents:
diff changeset
390 #define D3DRMFRAME_PICKENABLE 0x00000002L
Ritor1
parents:
diff changeset
391
Ritor1
parents:
diff changeset
392 typedef DWORD D3DRMANIMATIONOPTIONS;
Ritor1
parents:
diff changeset
393 #define D3DRMANIMATION_OPEN 0x01L
Ritor1
parents:
diff changeset
394 #define D3DRMANIMATION_CLOSED 0x02L
Ritor1
parents:
diff changeset
395 #define D3DRMANIMATION_LINEARPOSITION 0x04L
Ritor1
parents:
diff changeset
396 #define D3DRMANIMATION_SPLINEPOSITION 0x08L
Ritor1
parents:
diff changeset
397 #define D3DRMANIMATION_SCALEANDROTATION 0x00000010L
Ritor1
parents:
diff changeset
398 #define D3DRMANIMATION_POSITION 0x00000020L
Ritor1
parents:
diff changeset
399
Ritor1
parents:
diff changeset
400 typedef DWORD D3DRMINTERPOLATIONOPTIONS;
Ritor1
parents:
diff changeset
401 #define D3DRMINTERPOLATION_OPEN 0x01L
Ritor1
parents:
diff changeset
402 #define D3DRMINTERPOLATION_CLOSED 0x02L
Ritor1
parents:
diff changeset
403 #define D3DRMINTERPOLATION_NEAREST 0x0100L
Ritor1
parents:
diff changeset
404 #define D3DRMINTERPOLATION_LINEAR 0x04L
Ritor1
parents:
diff changeset
405 #define D3DRMINTERPOLATION_SPLINE 0x08L
Ritor1
parents:
diff changeset
406 #define D3DRMINTERPOLATION_VERTEXCOLOR 0x40L
Ritor1
parents:
diff changeset
407 #define D3DRMINTERPOLATION_SLERPNORMALS 0x80L
Ritor1
parents:
diff changeset
408
Ritor1
parents:
diff changeset
409 typedef DWORD D3DRMLOADOPTIONS;
Ritor1
parents:
diff changeset
410
Ritor1
parents:
diff changeset
411 #define D3DRMLOAD_FROMFILE 0x00L
Ritor1
parents:
diff changeset
412 #define D3DRMLOAD_FROMRESOURCE 0x01L
Ritor1
parents:
diff changeset
413 #define D3DRMLOAD_FROMMEMORY 0x02L
Ritor1
parents:
diff changeset
414 #define D3DRMLOAD_FROMSTREAM 0x04L
Ritor1
parents:
diff changeset
415 #define D3DRMLOAD_FROMURL 0x08L
Ritor1
parents:
diff changeset
416
Ritor1
parents:
diff changeset
417 #define D3DRMLOAD_BYNAME 0x10L
Ritor1
parents:
diff changeset
418 #define D3DRMLOAD_BYPOSITION 0x20L
Ritor1
parents:
diff changeset
419 #define D3DRMLOAD_BYGUID 0x40L
Ritor1
parents:
diff changeset
420 #define D3DRMLOAD_FIRST 0x80L
Ritor1
parents:
diff changeset
421
Ritor1
parents:
diff changeset
422 #define D3DRMLOAD_INSTANCEBYREFERENCE 0x100L
Ritor1
parents:
diff changeset
423 #define D3DRMLOAD_INSTANCEBYCOPYING 0x200L
Ritor1
parents:
diff changeset
424
Ritor1
parents:
diff changeset
425 #define D3DRMLOAD_ASYNCHRONOUS 0x400L
Ritor1
parents:
diff changeset
426
Ritor1
parents:
diff changeset
427 typedef struct _D3DRMLOADRESOURCE {
Ritor1
parents:
diff changeset
428 HMODULE hModule;
Ritor1
parents:
diff changeset
429 LPCTSTR lpName;
Ritor1
parents:
diff changeset
430 LPCTSTR lpType;
Ritor1
parents:
diff changeset
431 } D3DRMLOADRESOURCE, *LPD3DRMLOADRESOURCE;
Ritor1
parents:
diff changeset
432
Ritor1
parents:
diff changeset
433 typedef struct _D3DRMLOADMEMORY {
Ritor1
parents:
diff changeset
434 LPVOID lpMemory;
Ritor1
parents:
diff changeset
435 DWORD dSize;
Ritor1
parents:
diff changeset
436 } D3DRMLOADMEMORY, *LPD3DRMLOADMEMORY;
Ritor1
parents:
diff changeset
437
Ritor1
parents:
diff changeset
438 #define D3DRMPMESHSTATUS_VALID 0x01L
Ritor1
parents:
diff changeset
439 #define D3DRMPMESHSTATUS_INTERRUPTED 0x02L
Ritor1
parents:
diff changeset
440 #define D3DRMPMESHSTATUS_BASEMESHCOMPLETE 0x04L
Ritor1
parents:
diff changeset
441 #define D3DRMPMESHSTATUS_COMPLETE 0x08L
Ritor1
parents:
diff changeset
442 #define D3DRMPMESHSTATUS_RENDERABLE 0x10L
Ritor1
parents:
diff changeset
443
Ritor1
parents:
diff changeset
444 #define D3DRMPMESHEVENT_BASEMESH 0x01L
Ritor1
parents:
diff changeset
445 #define D3DRMPMESHEVENT_COMPLETE 0x02L
Ritor1
parents:
diff changeset
446
Ritor1
parents:
diff changeset
447 typedef struct _D3DRMPMESHLOADSTATUS {
Ritor1
parents:
diff changeset
448 DWORD dwSize; // Size of this structure
Ritor1
parents:
diff changeset
449 DWORD dwPMeshSize; // Total Size (bytes)
Ritor1
parents:
diff changeset
450 DWORD dwBaseMeshSize; // Total Size of the Base Mesh
Ritor1
parents:
diff changeset
451 DWORD dwBytesLoaded; // Total bytes loaded
Ritor1
parents:
diff changeset
452 DWORD dwVerticesLoaded; // Number of vertices loaded
Ritor1
parents:
diff changeset
453 DWORD dwFacesLoaded; // Number of faces loaded
Ritor1
parents:
diff changeset
454 HRESULT dwLoadResult; // Result of the load operation
Ritor1
parents:
diff changeset
455 DWORD dwFlags;
Ritor1
parents:
diff changeset
456 } D3DRMPMESHLOADSTATUS, *LPD3DRMPMESHLOADSTATUS;
Ritor1
parents:
diff changeset
457
Ritor1
parents:
diff changeset
458 typedef enum _D3DRMUSERVISUALREASON {
Ritor1
parents:
diff changeset
459 D3DRMUSERVISUAL_CANSEE,
Ritor1
parents:
diff changeset
460 D3DRMUSERVISUAL_RENDER
Ritor1
parents:
diff changeset
461 } D3DRMUSERVISUALREASON, *LPD3DRMUSERVISUALREASON;
Ritor1
parents:
diff changeset
462
Ritor1
parents:
diff changeset
463
Ritor1
parents:
diff changeset
464 typedef struct _D3DRMANIMATIONKEY
Ritor1
parents:
diff changeset
465 {
Ritor1
parents:
diff changeset
466 DWORD dwSize;
Ritor1
parents:
diff changeset
467 DWORD dwKeyType;
Ritor1
parents:
diff changeset
468 D3DVALUE dvTime;
Ritor1
parents:
diff changeset
469 DWORD dwID;
Ritor1
parents:
diff changeset
470 #if (!defined __cplusplus) || (!defined D3D_OVERLOADS)
Ritor1
parents:
diff changeset
471 union
Ritor1
parents:
diff changeset
472 {
Ritor1
parents:
diff changeset
473 D3DRMQUATERNION dqRotateKey;
Ritor1
parents:
diff changeset
474 D3DVECTOR dvScaleKey;
Ritor1
parents:
diff changeset
475 D3DVECTOR dvPositionKey;
Ritor1
parents:
diff changeset
476 };
Ritor1
parents:
diff changeset
477 #else
Ritor1
parents:
diff changeset
478 /*
Ritor1
parents:
diff changeset
479 * We do this as D3D_OVERLOADS defines constructors for D3DVECTOR,
Ritor1
parents:
diff changeset
480 * this can then not be used in a union. Use the inlines provided
Ritor1
parents:
diff changeset
481 * to extract and set the required component.
Ritor1
parents:
diff changeset
482 */
Ritor1
parents:
diff changeset
483 D3DVALUE dvK[4];
Ritor1
parents:
diff changeset
484 #endif
Ritor1
parents:
diff changeset
485 } D3DRMANIMATIONKEY;
Ritor1
parents:
diff changeset
486 typedef D3DRMANIMATIONKEY *LPD3DRMANIMATIONKEY;
Ritor1
parents:
diff changeset
487
Ritor1
parents:
diff changeset
488 #if (defined __cplusplus) && (defined D3D_OVERLOADS)
Ritor1
parents:
diff changeset
489 inline VOID
Ritor1
parents:
diff changeset
490 D3DRMAnimationGetRotateKey(const D3DRMANIMATIONKEY& rmKey,
Ritor1
parents:
diff changeset
491 D3DRMQUATERNION& rmQuat)
Ritor1
parents:
diff changeset
492 {
Ritor1
parents:
diff changeset
493 rmQuat.s = rmKey.dvK[0];
Ritor1
parents:
diff changeset
494 rmQuat.v = D3DVECTOR(rmKey.dvK[1], rmKey.dvK[2], rmKey.dvK[3]);
Ritor1
parents:
diff changeset
495 }
Ritor1
parents:
diff changeset
496
Ritor1
parents:
diff changeset
497 inline VOID
Ritor1
parents:
diff changeset
498 D3DRMAnimationGetScaleKey(const D3DRMANIMATIONKEY& rmKey,
Ritor1
parents:
diff changeset
499 D3DVECTOR& dvVec)
Ritor1
parents:
diff changeset
500 {
Ritor1
parents:
diff changeset
501 dvVec = D3DVECTOR(rmKey.dvK[0], rmKey.dvK[1], rmKey.dvK[2]);
Ritor1
parents:
diff changeset
502 }
Ritor1
parents:
diff changeset
503
Ritor1
parents:
diff changeset
504 inline VOID
Ritor1
parents:
diff changeset
505 D3DRMAnimationGetPositionKey(const D3DRMANIMATIONKEY& rmKey,
Ritor1
parents:
diff changeset
506 D3DVECTOR& dvVec)
Ritor1
parents:
diff changeset
507 {
Ritor1
parents:
diff changeset
508 dvVec = D3DVECTOR(rmKey.dvK[0], rmKey.dvK[1], rmKey.dvK[2]);
Ritor1
parents:
diff changeset
509 }
Ritor1
parents:
diff changeset
510 inline VOID
Ritor1
parents:
diff changeset
511 D3DRMAnimationSetRotateKey(D3DRMANIMATIONKEY& rmKey,
Ritor1
parents:
diff changeset
512 const D3DRMQUATERNION& rmQuat)
Ritor1
parents:
diff changeset
513 {
Ritor1
parents:
diff changeset
514 rmKey.dvK[0] = rmQuat.s;
Ritor1
parents:
diff changeset
515 rmKey.dvK[1] = rmQuat.v.x;
Ritor1
parents:
diff changeset
516 rmKey.dvK[2] = rmQuat.v.y;
Ritor1
parents:
diff changeset
517 rmKey.dvK[3] = rmQuat.v.z;
Ritor1
parents:
diff changeset
518 }
Ritor1
parents:
diff changeset
519
Ritor1
parents:
diff changeset
520 inline VOID
Ritor1
parents:
diff changeset
521 D3DRMAnimationSetScaleKey(D3DRMANIMATIONKEY& rmKey,
Ritor1
parents:
diff changeset
522 const D3DVECTOR& dvVec)
Ritor1
parents:
diff changeset
523 {
Ritor1
parents:
diff changeset
524 rmKey.dvK[0] = dvVec.x;
Ritor1
parents:
diff changeset
525 rmKey.dvK[1] = dvVec.y;
Ritor1
parents:
diff changeset
526 rmKey.dvK[2] = dvVec.z;
Ritor1
parents:
diff changeset
527 }
Ritor1
parents:
diff changeset
528
Ritor1
parents:
diff changeset
529 inline VOID
Ritor1
parents:
diff changeset
530 D3DRMAnimationSetPositionKey(D3DRMANIMATIONKEY& rmKey,
Ritor1
parents:
diff changeset
531 const D3DVECTOR& dvVec)
Ritor1
parents:
diff changeset
532 {
Ritor1
parents:
diff changeset
533 rmKey.dvK[0] = dvVec.x;
Ritor1
parents:
diff changeset
534 rmKey.dvK[1] = dvVec.y;
Ritor1
parents:
diff changeset
535 rmKey.dvK[2] = dvVec.z;
Ritor1
parents:
diff changeset
536 }
Ritor1
parents:
diff changeset
537 #endif
Ritor1
parents:
diff changeset
538
Ritor1
parents:
diff changeset
539 #define D3DRMANIMATION_ROTATEKEY 0x01
Ritor1
parents:
diff changeset
540 #define D3DRMANIMATION_SCALEKEY 0x02
Ritor1
parents:
diff changeset
541 #define D3DRMANIMATION_POSITIONKEY 0x03
Ritor1
parents:
diff changeset
542
Ritor1
parents:
diff changeset
543
Ritor1
parents:
diff changeset
544 typedef DWORD D3DRMMAPPING, D3DRMMAPPINGFLAG, *LPD3DRMMAPPING;
Ritor1
parents:
diff changeset
545 static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPU = 1;
Ritor1
parents:
diff changeset
546 static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPV = 2;
Ritor1
parents:
diff changeset
547 static const D3DRMMAPPINGFLAG D3DRMMAP_PERSPCORRECT = 4;
Ritor1
parents:
diff changeset
548
Ritor1
parents:
diff changeset
549 typedef struct _D3DRMVERTEX
Ritor1
parents:
diff changeset
550 { D3DVECTOR position;
Ritor1
parents:
diff changeset
551 D3DVECTOR normal;
Ritor1
parents:
diff changeset
552 D3DVALUE tu, tv;
Ritor1
parents:
diff changeset
553 D3DCOLOR color;
Ritor1
parents:
diff changeset
554 } D3DRMVERTEX, *LPD3DRMVERTEX;
Ritor1
parents:
diff changeset
555
Ritor1
parents:
diff changeset
556 typedef LONG D3DRMGROUPINDEX; /* group indexes begin a 0 */
Ritor1
parents:
diff changeset
557 static const D3DRMGROUPINDEX D3DRMGROUP_ALLGROUPS = -1;
Ritor1
parents:
diff changeset
558
Ritor1
parents:
diff changeset
559 /*
Ritor1
parents:
diff changeset
560 * Create a color from three components in the range 0-1 inclusive.
Ritor1
parents:
diff changeset
561 */
Ritor1
parents:
diff changeset
562 extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGB(D3DVALUE red,
Ritor1
parents:
diff changeset
563 D3DVALUE green,
Ritor1
parents:
diff changeset
564 D3DVALUE blue);
Ritor1
parents:
diff changeset
565
Ritor1
parents:
diff changeset
566 /*
Ritor1
parents:
diff changeset
567 * Create a color from four components in the range 0-1 inclusive.
Ritor1
parents:
diff changeset
568 */
Ritor1
parents:
diff changeset
569 extern D3DCOLOR D3DRMAPI D3DRMCreateColorRGBA(D3DVALUE red,
Ritor1
parents:
diff changeset
570 D3DVALUE green,
Ritor1
parents:
diff changeset
571 D3DVALUE blue,
Ritor1
parents:
diff changeset
572 D3DVALUE alpha);
Ritor1
parents:
diff changeset
573
Ritor1
parents:
diff changeset
574 /*
Ritor1
parents:
diff changeset
575 * Get the red component of a color.
Ritor1
parents:
diff changeset
576 */
Ritor1
parents:
diff changeset
577 extern D3DVALUE D3DRMAPI D3DRMColorGetRed(D3DCOLOR);
Ritor1
parents:
diff changeset
578
Ritor1
parents:
diff changeset
579 /*
Ritor1
parents:
diff changeset
580 * Get the green component of a color.
Ritor1
parents:
diff changeset
581 */
Ritor1
parents:
diff changeset
582 extern D3DVALUE D3DRMAPI D3DRMColorGetGreen(D3DCOLOR);
Ritor1
parents:
diff changeset
583
Ritor1
parents:
diff changeset
584 /*
Ritor1
parents:
diff changeset
585 * Get the blue component of a color.
Ritor1
parents:
diff changeset
586 */
Ritor1
parents:
diff changeset
587 extern D3DVALUE D3DRMAPI D3DRMColorGetBlue(D3DCOLOR);
Ritor1
parents:
diff changeset
588
Ritor1
parents:
diff changeset
589 /*
Ritor1
parents:
diff changeset
590 * Get the alpha component of a color.
Ritor1
parents:
diff changeset
591 */
Ritor1
parents:
diff changeset
592 extern D3DVALUE D3DRMAPI D3DRMColorGetAlpha(D3DCOLOR);
Ritor1
parents:
diff changeset
593
Ritor1
parents:
diff changeset
594 /*
Ritor1
parents:
diff changeset
595 * Add two vectors. Returns its first argument.
Ritor1
parents:
diff changeset
596 */
Ritor1
parents:
diff changeset
597 extern LPD3DVECTOR D3DRMAPI D3DRMVectorAdd(LPD3DVECTOR d,
Ritor1
parents:
diff changeset
598 LPD3DVECTOR s1,
Ritor1
parents:
diff changeset
599 LPD3DVECTOR s2);
Ritor1
parents:
diff changeset
600
Ritor1
parents:
diff changeset
601 /*
Ritor1
parents:
diff changeset
602 * Subtract two vectors. Returns its first argument.
Ritor1
parents:
diff changeset
603 */
Ritor1
parents:
diff changeset
604 extern LPD3DVECTOR D3DRMAPI D3DRMVectorSubtract(LPD3DVECTOR d,
Ritor1
parents:
diff changeset
605 LPD3DVECTOR s1,
Ritor1
parents:
diff changeset
606 LPD3DVECTOR s2);
Ritor1
parents:
diff changeset
607 /*
Ritor1
parents:
diff changeset
608 * Reflect a ray about a given normal. Returns its first argument.
Ritor1
parents:
diff changeset
609 */
Ritor1
parents:
diff changeset
610 extern LPD3DVECTOR D3DRMAPI D3DRMVectorReflect(LPD3DVECTOR d,
Ritor1
parents:
diff changeset
611 LPD3DVECTOR ray,
Ritor1
parents:
diff changeset
612 LPD3DVECTOR norm);
Ritor1
parents:
diff changeset
613
Ritor1
parents:
diff changeset
614 /*
Ritor1
parents:
diff changeset
615 * Calculate the vector cross product. Returns its first argument.
Ritor1
parents:
diff changeset
616 */
Ritor1
parents:
diff changeset
617 extern LPD3DVECTOR D3DRMAPI D3DRMVectorCrossProduct(LPD3DVECTOR d,
Ritor1
parents:
diff changeset
618 LPD3DVECTOR s1,
Ritor1
parents:
diff changeset
619 LPD3DVECTOR s2);
Ritor1
parents:
diff changeset
620 /*
Ritor1
parents:
diff changeset
621 * Return the vector dot product.
Ritor1
parents:
diff changeset
622 */
Ritor1
parents:
diff changeset
623 extern D3DVALUE D3DRMAPI D3DRMVectorDotProduct(LPD3DVECTOR s1,
Ritor1
parents:
diff changeset
624 LPD3DVECTOR s2);
Ritor1
parents:
diff changeset
625
Ritor1
parents:
diff changeset
626 /*
Ritor1
parents:
diff changeset
627 * Scale a vector so that its modulus is 1. Returns its argument or
Ritor1
parents:
diff changeset
628 * NULL if there was an error (e.g. a zero vector was passed).
Ritor1
parents:
diff changeset
629 */
Ritor1
parents:
diff changeset
630 extern LPD3DVECTOR D3DRMAPI D3DRMVectorNormalize(LPD3DVECTOR);
Ritor1
parents:
diff changeset
631 #define D3DRMVectorNormalise D3DRMVectorNormalize
Ritor1
parents:
diff changeset
632
Ritor1
parents:
diff changeset
633 /*
Ritor1
parents:
diff changeset
634 * Return the length of a vector (e.g. sqrt(x*x + y*y + z*z)).
Ritor1
parents:
diff changeset
635 */
Ritor1
parents:
diff changeset
636 extern D3DVALUE D3DRMAPI D3DRMVectorModulus(LPD3DVECTOR v);
Ritor1
parents:
diff changeset
637
Ritor1
parents:
diff changeset
638 /*
Ritor1
parents:
diff changeset
639 * Set the rotation part of a matrix to be a rotation of theta radians
Ritor1
parents:
diff changeset
640 * around the given axis.
Ritor1
parents:
diff changeset
641 */
Ritor1
parents:
diff changeset
642
Ritor1
parents:
diff changeset
643 extern LPD3DVECTOR D3DRMAPI D3DRMVectorRotate(LPD3DVECTOR r, LPD3DVECTOR v, LPD3DVECTOR axis, D3DVALUE theta);
Ritor1
parents:
diff changeset
644
Ritor1
parents:
diff changeset
645 /*
Ritor1
parents:
diff changeset
646 * Scale a vector uniformly in all three axes
Ritor1
parents:
diff changeset
647 */
Ritor1
parents:
diff changeset
648 extern LPD3DVECTOR D3DRMAPI D3DRMVectorScale(LPD3DVECTOR d, LPD3DVECTOR s, D3DVALUE factor);
Ritor1
parents:
diff changeset
649
Ritor1
parents:
diff changeset
650 /*
Ritor1
parents:
diff changeset
651 * Return a random unit vector
Ritor1
parents:
diff changeset
652 */
Ritor1
parents:
diff changeset
653 extern LPD3DVECTOR D3DRMAPI D3DRMVectorRandom(LPD3DVECTOR d);
Ritor1
parents:
diff changeset
654
Ritor1
parents:
diff changeset
655 /*
Ritor1
parents:
diff changeset
656 * Returns a unit quaternion that represents a rotation of theta radians
Ritor1
parents:
diff changeset
657 * around the given axis.
Ritor1
parents:
diff changeset
658 */
Ritor1
parents:
diff changeset
659
Ritor1
parents:
diff changeset
660 extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionFromRotation(LPD3DRMQUATERNION quat,
Ritor1
parents:
diff changeset
661 LPD3DVECTOR v,
Ritor1
parents:
diff changeset
662 D3DVALUE theta);
Ritor1
parents:
diff changeset
663
Ritor1
parents:
diff changeset
664 /*
Ritor1
parents:
diff changeset
665 * Calculate the product of two quaternions
Ritor1
parents:
diff changeset
666 */
Ritor1
parents:
diff changeset
667 extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionMultiply(LPD3DRMQUATERNION q,
Ritor1
parents:
diff changeset
668 LPD3DRMQUATERNION a,
Ritor1
parents:
diff changeset
669 LPD3DRMQUATERNION b);
Ritor1
parents:
diff changeset
670
Ritor1
parents:
diff changeset
671 /*
Ritor1
parents:
diff changeset
672 * Interpolate between two quaternions
Ritor1
parents:
diff changeset
673 */
Ritor1
parents:
diff changeset
674 extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionSlerp(LPD3DRMQUATERNION q,
Ritor1
parents:
diff changeset
675 LPD3DRMQUATERNION a,
Ritor1
parents:
diff changeset
676 LPD3DRMQUATERNION b,
Ritor1
parents:
diff changeset
677 D3DVALUE alpha);
Ritor1
parents:
diff changeset
678
Ritor1
parents:
diff changeset
679 /*
Ritor1
parents:
diff changeset
680 * Calculate the matrix for the rotation that a unit quaternion represents
Ritor1
parents:
diff changeset
681 */
Ritor1
parents:
diff changeset
682 extern void D3DRMAPI D3DRMMatrixFromQuaternion(D3DRMMATRIX4D dmMat, LPD3DRMQUATERNION lpDqQuat);
Ritor1
parents:
diff changeset
683
Ritor1
parents:
diff changeset
684 /*
Ritor1
parents:
diff changeset
685 * Calculate the quaternion that corresponds to a rotation matrix
Ritor1
parents:
diff changeset
686 */
Ritor1
parents:
diff changeset
687 extern LPD3DRMQUATERNION D3DRMAPI D3DRMQuaternionFromMatrix(LPD3DRMQUATERNION, D3DRMMATRIX4D);
Ritor1
parents:
diff changeset
688
Ritor1
parents:
diff changeset
689
Ritor1
parents:
diff changeset
690 #if defined(__cplusplus)
Ritor1
parents:
diff changeset
691 };
Ritor1
parents:
diff changeset
692 #endif
Ritor1
parents:
diff changeset
693
Ritor1
parents:
diff changeset
694 #endif
Ritor1
parents:
diff changeset
695