annotate lib/legacy_dx/d3drmdef.h @ 15:e33334611747

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