d3drmdef.h 15.1 KB
Newer Older
1
/*
2
 * Copyright 2007,2010 Vijay Kiran Kamuju
3
 * Copyright 2007 David ADAM
4
 * Copyright 2010 Christian Costa
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 */

#ifndef __D3DRMDEFS_H__
#define __D3DRMDEFS_H__

#include <stddef.h>
#include <d3dtypes.h>

#if defined(__cplusplus)
extern "C" {
#endif

31 32 33 34 35 36 37 38
typedef struct _D3DRMVECTOR4D
{
    D3DVALUE x;
    D3DVALUE y;
    D3DVALUE z;
    D3DVALUE w;
} D3DRMVECTOR4D, *LPD3DRMVECTOR4D;

39
typedef D3DVALUE D3DRMMATRIX4D[4][4];
40 41

typedef struct _D3DRMQUATERNION {
42 43 44 45
    D3DVALUE s;
    D3DVECTOR v;
} D3DRMQUATERNION, *LPD3DRMQUATERNION;

46 47 48 49 50 51 52 53 54 55
typedef struct _D3DRMRAY {
    D3DVECTOR dvDir;
    D3DVECTOR dvPos;
} D3DRMRAY, *LPD3DRMRAY;

typedef struct _D3DRMBOX {
    D3DVECTOR min;
    D3DVECTOR max;
} D3DRMBOX, *LPD3DRMBOX;

56
typedef void (*D3DRMWRAPCALLBACK)(D3DVECTOR *vec, int *u, int *v, D3DVECTOR *a, D3DVECTOR *b, void *ctx);
57

58 59 60 61 62 63 64 65
typedef enum _D3DRMLIGHTTYPE {
    D3DRMLIGHT_AMBIENT,
    D3DRMLIGHT_POINT,
    D3DRMLIGHT_SPOT,
    D3DRMLIGHT_DIRECTIONAL,
    D3DRMLIGHT_PARALLELPOINT
} D3DRMLIGHTTYPE, *LPD3DRMLIGHTTYPE;

66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
typedef enum _D3DRMSHADEMODE {
    D3DRMSHADE_FLAT     = 0,
    D3DRMSHADE_GOURAUD  = 1,
    D3DRMSHADE_PHONG    = 2,
    D3DRMSHADE_MASK     = 7,
    D3DRMSHADE_MAX      = 8
} D3DRMSHADEMODE, *LPD3DRMSHADEMODE;

typedef enum _D3DRMLIGHTMODE {
    D3DRMLIGHT_OFF      = 0 * D3DRMSHADE_MAX,
    D3DRMLIGHT_ON       = 1 * D3DRMSHADE_MAX,
    D3DRMLIGHT_MASK     = 7 * D3DRMSHADE_MAX,
    D3DRMLIGHT_MAX      = 8 * D3DRMSHADE_MAX
} D3DRMLIGHTMODE, *LPD3DRMLIGHTMODE;

typedef enum _D3DRMFILLMODE {
    D3DRMFILL_POINTS    = 0 * D3DRMLIGHT_MAX,
    D3DRMFILL_WIREFRAME	= 1 * D3DRMLIGHT_MAX,
    D3DRMFILL_SOLID     = 2 * D3DRMLIGHT_MAX,
    D3DRMFILL_MASK      = 7 * D3DRMLIGHT_MAX,
    D3DRMFILL_MAX       = 8 * D3DRMLIGHT_MAX
} D3DRMFILLMODE, *LPD3DRMFILLMODE;

89 90
typedef DWORD D3DRMRENDERQUALITY, *LPD3DRMRENDERQUALITY;

91 92 93 94
#define D3DRMRENDER_WIREFRAME   (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_WIREFRAME)
#define D3DRMRENDER_UNLITFLAT   (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_SOLID)
#define D3DRMRENDER_FLAT        (D3DRMSHADE_FLAT+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
#define D3DRMRENDER_GOURAUD     (D3DRMSHADE_GOURAUD+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
95
#define D3DRMRENDER_PHONG       (D3DRMSHADE_PHONG+D3DRMLIGHT_ON+D3DRMFILL_SOLID)
96 97 98 99 100 101 102

#define D3DRMRENDERMODE_BLENDEDTRANSPARENCY       1
#define D3DRMRENDERMODE_SORTEDTRANSPARENCY        2
#define D3DRMRENDERMODE_LIGHTINMODELSPACE         8
#define D3DRMRENDERMODE_VIEWDEPENDENTSPECULAR    16
#define D3DRMRENDERMODE_DISABLESORTEDALPHAZWRITE 32

103 104 105 106 107 108 109 110 111
typedef enum _D3DRMTEXTUREQUALITY {
    D3DRMTEXTURE_NEAREST,
    D3DRMTEXTURE_LINEAR,
    D3DRMTEXTURE_MIPNEAREST,
    D3DRMTEXTURE_MIPLINEAR,
    D3DRMTEXTURE_LINEARMIPNEAREST,
    D3DRMTEXTURE_LINEARMIPLINEAR
} D3DRMTEXTUREQUALITY, *LPD3DRMTEXTUREQUALITY;

112 113 114 115 116 117 118 119 120 121 122 123
#define D3DRMTEXTURE_FORCERESIDENT          0x00000001
#define D3DRMTEXTURE_STATIC                 0x00000002
#define D3DRMTEXTURE_DOWNSAMPLEPOINT        0x00000004
#define D3DRMTEXTURE_DOWNSAMPLEBILINEAR	    0x00000008
#define D3DRMTEXTURE_DOWNSAMPLEREDUCEDEPTH  0x00000010
#define D3DRMTEXTURE_DOWNSAMPLENONE         0x00000020
#define D3DRMTEXTURE_CHANGEDPIXELS          0x00000040
#define D3DRMTEXTURE_CHANGEDPALETTE         0x00000080
#define D3DRMTEXTURE_INVALIDATEONLY         0x00000100

#define D3DRMSHADOW_TRUEALPHA               0x00000001

124 125 126 127 128 129
typedef enum _D3DRMCOMBINETYPE {
    D3DRMCOMBINE_REPLACE,
    D3DRMCOMBINE_BEFORE,
    D3DRMCOMBINE_AFTER
} D3DRMCOMBINETYPE, *LPD3DRMCOMBINETYPE;

130 131 132 133 134 135 136 137 138
typedef D3DCOLORMODEL D3DRMCOLORMODEL, *LPD3DRMCOLORMODEL;

typedef enum _D3DRMPALETTEFLAGS
{
    D3DRMPALETTE_FREE,
    D3DRMPALETTE_READONLY,
    D3DRMPALETTE_RESERVED
} D3DRMPALETTEFLAGS, *LPD3DRMPALETTEFLAGS;

139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
typedef struct _D3DRMPALETTEENTRY {
    unsigned char red;
    unsigned char green;
    unsigned char blue;
    unsigned char flags;
} D3DRMPALETTEENTRY, *LPD3DRMPALETTEENTRY;

typedef struct _D3DRMIMAGE {
    int width;
    int height;
    int aspectx;
    int aspecty;
    int depth;
    int rgb;
    int bytes_per_line;
    void* buffer1;
    void* buffer2;
156 157 158 159
    ULONG red_mask;
    ULONG green_mask;
    ULONG blue_mask;
    ULONG alpha_mask;
160 161 162 163 164 165 166 167 168 169 170 171 172
    int palette_size;
    D3DRMPALETTEENTRY* palette;
} D3DRMIMAGE, *LPD3DRMIMAGE;

typedef enum _D3DRMWRAPTYPE {
    D3DRMWRAP_FLAT,
    D3DRMWRAP_CYLINDER,
    D3DRMWRAP_SPHERE,
    D3DRMWRAP_CHROME,
    D3DRMWRAP_SHEET,
    D3DRMWRAP_BOX
} D3DRMWRAPTYPE, *LPD3DRMWRAPTYPE;

173 174 175
#define D3DRMWIREFRAME_CULL             1
#define D3DRMWIREFRAME_HIDDENLINE       2

176 177 178 179 180 181 182 183
typedef enum _D3DRMPROJECTIONTYPE
{
    D3DRMPROJECT_PERSPECTIVE,
    D3DRMPROJECT_ORTHOGRAPHIC,
    D3DRMPROJECT_RIGHTHANDPERSPECTIVE,
    D3DRMPROJECT_RIGHTHANDORTHOGRAPHIC
} D3DRMPROJECTIONTYPE, *LPD3DRMPROJECTIONTYPE;

184 185 186
#define D3DRMOPTIONS_LEFTHANDED  0x00000001
#define D3DRMOPTIONS_RIGHTHANDED 0x00000002

187 188 189 190 191 192 193
typedef enum _D3DRMXOFFORMAT {
    D3DRMXOF_BINARY,
    D3DRMXOF_COMPRESSED,
    D3DRMXOF_TEXT
} D3DRMXOFFORMAT, *LPD3DRMXOFFORMAT;

typedef DWORD D3DRMSAVEOPTIONS;
194 195 196 197 198 199 200
#define D3DRMXOFSAVE_NORMALS             1
#define D3DRMXOFSAVE_TEXTURECOORDINATES  2
#define D3DRMXOFSAVE_MATERIALS           4
#define D3DRMXOFSAVE_TEXTURENAMES        8
#define D3DRMXOFSAVE_ALL                15
#define D3DRMXOFSAVE_TEMPLATES          16
#define D3DRMXOFSAVE_TEXTURETOPOLOGY    32
201

202 203 204 205 206
typedef enum _D3DRMCOLORSOURCE {
    D3DRMCOLOR_FROMFACE,
    D3DRMCOLOR_FROMVERTEX
} D3DRMCOLORSOURCE, *LPD3DRMCOLORSOURCE;

207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
typedef enum _D3DRMFRAMECONSTRAINT {
    D3DRMCONSTRAIN_Z,
    D3DRMCONSTRAIN_Y,
    D3DRMCONSTRAIN_X
} D3DRMFRAMECONSTRAINT, *LPD3DRMFRAMECONSTRAINT;

typedef enum _D3DRMMATERIALMODE {
    D3DRMMATERIAL_FROMMESH,
    D3DRMMATERIAL_FROMPARENT,
    D3DRMMATERIAL_FROMFRAME
} D3DRMMATERIALMODE, *LPD3DRMMATERIALMODE;

typedef enum _D3DRMFOGMODE {
    D3DRMFOG_LINEAR,
    D3DRMFOG_EXPONENTIAL,
    D3DRMFOG_EXPONENTIALSQUARED
} D3DRMFOGMODE, *LPD3DRMFOGMODE;

typedef enum _D3DRMZBUFFERMODE {
    D3DRMZBUFFER_FROMPARENT,
    D3DRMZBUFFER_ENABLE,
    D3DRMZBUFFER_DISABLE
} D3DRMZBUFFERMODE, *LPD3DRMZBUFFERMODE;

typedef enum _D3DRMSORTMODE {
    D3DRMSORT_FROMPARENT,
    D3DRMSORT_NONE,
    D3DRMSORT_FRONTTOBACK,
    D3DRMSORT_BACKTOFRONT
} D3DRMSORTMODE, *LPD3DRMSORTMODE;

238 239 240 241 242 243 244 245
typedef struct _D3DRMMATERIALOVERRIDE {
    DWORD         dwSize;
    DWORD         dwFlags;
    D3DCOLORVALUE dcDiffuse;
    D3DCOLORVALUE dcAmbient;
    D3DCOLORVALUE dcEmissive;
    D3DCOLORVALUE dcSpecular;
    D3DVALUE      dvPower;
Henri Verbeet's avatar
Henri Verbeet committed
246
    IUnknown *lpD3DRMTex;
247 248
} D3DRMMATERIALOVERRIDE, *LPD3DRMMATERIALOVERRIDE;

249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338
#define D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAONLY     0x00000001
#define D3DRMMATERIALOVERRIDE_DIFFUSE_RGBONLY       0x00000002
#define D3DRMMATERIALOVERRIDE_DIFFUSE               0x00000003
#define D3DRMMATERIALOVERRIDE_AMBIENT               0x00000004
#define D3DRMMATERIALOVERRIDE_EMISSIVE              0x00000008
#define D3DRMMATERIALOVERRIDE_SPECULAR              0x00000010
#define D3DRMMATERIALOVERRIDE_POWER                 0x00000020
#define D3DRMMATERIALOVERRIDE_TEXTURE               0x00000040
#define D3DRMMATERIALOVERRIDE_DIFFUSE_ALPHAMULTIPLY 0x00000080
#define D3DRMMATERIALOVERRIDE_ALL                   0x000000FF

#define D3DRMFPTF_ALPHA                             0x00000001
#define D3DRMFPTF_NOALPHA                           0x00000002
#define D3DRMFPTF_PALETTIZED                        0x00000004
#define D3DRMFPTF_NOTPALETTIZED                     0x00000008

#define D3DRMSTATECHANGE_UPDATEONLY                0x000000001
#define D3DRMSTATECHANGE_VOLATILE                  0x000000002
#define D3DRMSTATECHANGE_NONVOLATILE               0x000000004
#define D3DRMSTATECHANGE_RENDER                    0x000000020
#define D3DRMSTATECHANGE_LIGHT                     0x000000040

#define D3DRMDEVICE_NOZBUFFER           0x00000001

#define D3DRMCALLBACK_PREORDER		0
#define D3DRMCALLBACK_POSTORDER		1

#define D3DRMRAYPICK_ONLYBOUNDINGBOXES          0x01
#define D3DRMRAYPICK_IGNOREFURTHERPRIMITIVES    0x02
#define D3DRMRAYPICK_INTERPOLATEUV              0x04
#define D3DRMRAYPICK_INTERPOLATECOLOR           0x08
#define D3DRMRAYPICK_INTERPOLATENORMAL          0x10

#define D3DRMADDFACES_VERTICESONLY              1

#define D3DRMGENERATENORMALS_PRECOMPACT         1
#define D3DRMGENERATENORMALS_USECREASEANGLE     2

#define D3DRMMESHBUILDER_DIRECTPARENT           1
#define D3DRMMESHBUILDER_ROOTMESH               2

#define D3DRMMESHBUILDER_RENDERENABLE   0x00000001
#define D3DRMMESHBUILDER_PICKENABLE     0x00000002

#define D3DRMADDMESHBUILDER_DONTCOPYAPPDATA     1
#define D3DRMADDMESHBUILDER_FLATTENSUBMESHES    2
#define D3DRMADDMESHBUILDER_NOSUBMESHES         4

#define D3DRMMESHBUILDERAGE_GEOMETRY    0x00000001
#define D3DRMMESHBUILDERAGE_MATERIALS   0x00000002
#define D3DRMMESHBUILDERAGE_TEXTURES    0x00000004

#define D3DRMFVF_TYPE                   0x00000001
#define D3DRMFVF_NORMAL                 0x00000002
#define D3DRMFVF_COLOR                  0x00000004
#define D3DRMFVF_TEXTURECOORDS          0x00000008

#define D3DRMVERTEX_STRIP               0x00000001
#define D3DRMVERTEX_FAN                 0x00000002
#define D3DRMVERTEX_LIST                0x00000004

#define D3DRMCLEAR_TARGET               0x00000001
#define D3DRMCLEAR_ZBUFFER              0x00000002
#define D3DRMCLEAR_DIRTYRECTS           0x00000004
#define D3DRMCLEAR_ALL                  (D3DRMCLEAR_TARGET | D3DRMCLEAR_ZBUFFER | D3DRMCLEAR_DIRTYRECTS)

#define D3DRMFOGMETHOD_VERTEX           0x00000001
#define D3DRMFOGMETHOD_TABLE            0x00000002
#define D3DRMFOGMETHOD_ANY              0x00000004

#define D3DRMFRAME_RENDERENABLE         0x00000001
#define D3DRMFRAME_PICKENABLE           0x00000002

typedef DWORD D3DRMANIMATIONOPTIONS;
#define D3DRMANIMATION_OPEN             0x00000001
#define D3DRMANIMATION_CLOSED           0x00000002
#define D3DRMANIMATION_LINEARPOSITION   0x00000004
#define D3DRMANIMATION_SPLINEPOSITION   0x00000008
#define D3DRMANIMATION_SCALEANDROTATION 0x00000010
#define D3DRMANIMATION_POSITION         0x00000020

typedef DWORD D3DRMINTERPOLATIONOPTIONS;
#define D3DRMINTERPOLATION_OPEN         0x0001
#define D3DRMINTERPOLATION_CLOSED       0x0002
#define D3DRMINTERPOLATION_NEAREST      0x0100
#define D3DRMINTERPOLATION_LINEAR       0x0004
#define D3DRMINTERPOLATION_SPLINE       0x0008
#define D3DRMINTERPOLATION_VERTEXCOLOR  0x0040
#define D3DRMINTERPOLATION_SLERPNORMALS 0x0080

339 340
typedef DWORD D3DRMLOADOPTIONS;

341 342 343 344 345
#define D3DRMLOAD_FROMFILE             __MSABI_LONG(0x000)
#define D3DRMLOAD_FROMRESOURCE         __MSABI_LONG(0x001)
#define D3DRMLOAD_FROMMEMORY           __MSABI_LONG(0x002)
#define D3DRMLOAD_FROMSTREAM           __MSABI_LONG(0x004)
#define D3DRMLOAD_FROMURL              __MSABI_LONG(0x008)
346

347 348 349 350
#define D3DRMLOAD_BYNAME               __MSABI_LONG(0x010)
#define D3DRMLOAD_BYPOSITION           __MSABI_LONG(0x020)
#define D3DRMLOAD_BYGUID               __MSABI_LONG(0x040)
#define D3DRMLOAD_FIRST                __MSABI_LONG(0x080)
351

352 353
#define D3DRMLOAD_INSTANCEBYREFERENCE  __MSABI_LONG(0x100)
#define D3DRMLOAD_INSTANCEBYCOPYING    __MSABI_LONG(0x200)
354

355
#define D3DRMLOAD_ASYNCHRONOUS         __MSABI_LONG(0x400)
356

Henri Verbeet's avatar
Henri Verbeet committed
357 358
typedef struct _D3DRMLOADRESOURCE
{
359
    HMODULE hModule;
Henri Verbeet's avatar
Henri Verbeet committed
360 361
    const char *lpName;
    const char *lpType;
362 363
} D3DRMLOADRESOURCE, *LPD3DRMLOADRESOURCE;

Henri Verbeet's avatar
Henri Verbeet committed
364 365 366
typedef struct _D3DRMLOADMEMORY
{
    void *lpMemory;
367 368 369
    DWORD dSize;
} D3DRMLOADMEMORY, *LPD3DRMLOADMEMORY;

370 371 372 373 374 375 376 377 378
#define D3DRMPMESHSTATUS_VALID            0x01
#define D3DRMPMESHSTATUS_INTERRUPTED      0x02
#define D3DRMPMESHSTATUS_BASEMESHCOMPLETE 0x04
#define D3DRMPMESHSTATUS_COMPLETE         0x08
#define D3DRMPMESHSTATUS_RENDERABLE       0x10

#define D3DRMPMESHEVENT_BASEMESH          0x01
#define D3DRMPMESHEVENT_COMPLETE          0x02

379 380 381 382 383 384 385 386 387 388 389
typedef struct _D3DRMPMESHLOADSTATUS {
    DWORD dwSize;
    DWORD dwPMeshSize;
    DWORD dwBaseMeshSize;
    DWORD dwBytesLoaded;
    DWORD dwVerticesLoaded;
    DWORD dwFacesLoaded;
    HRESULT dwLoadResult;
    DWORD dwFlags;
} D3DRMPMESHLOADSTATUS, *LPD3DRMPMESHLOADSTATUS;

390 391 392 393 394
typedef enum _D3DRMUSERVISUALREASON {
    D3DRMUSERVISUAL_CANSEE,
    D3DRMUSERVISUAL_RENDER
} D3DRMUSERVISUALREASON, *LPD3DRMUSERVISUALREASON;

395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421
typedef struct _D3DRMANIMATIONKEY
{
    DWORD dwSize;
    DWORD dwKeyType;
    D3DVALUE dvTime;
    DWORD dwID;
#if !defined(__cplusplus) || !defined(D3D_OVERLOADS)
    union
    {
	D3DRMQUATERNION dqRotateKey;
	D3DVECTOR dvScaleKey;
	D3DVECTOR dvPositionKey;
    } DUMMYUNIONNAME;
#else
    D3DVALUE dvK[4];
#endif
} D3DRMANIMATIONKEY;
typedef D3DRMANIMATIONKEY *LPD3DRMANIMATIONKEY;

#define D3DRMANIMATION_ROTATEKEY   0x01
#define D3DRMANIMATION_SCALEKEY    0x02
#define D3DRMANIMATION_POSITIONKEY 0x03

typedef DWORD D3DRMMAPPING, D3DRMMAPPINGFLAG, *LPD3DRMMAPPING;
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPU        = 1;
static const D3DRMMAPPINGFLAG D3DRMMAP_WRAPV        = 2;
static const D3DRMMAPPINGFLAG D3DRMMAP_PERSPCORRECT = 4;
422 423 424 425 426 427 428 429 430 431

typedef struct _D3DRMVERTEX {
    D3DVECTOR position;
    D3DVECTOR normal;
    D3DVALUE  tu;
    D3DVALUE  tv;
    D3DCOLOR  color;
} D3DRMVERTEX, *LPD3DRMVERTEX;

typedef LONG D3DRMGROUPINDEX;
432
static const D3DRMGROUPINDEX D3DRMGROUP_ALLGROUPS = -1;
433

434
void WINAPI D3DRMMatrixFromQuaternion(D3DRMMATRIX4D m, D3DRMQUATERNION *q);
435

436 437 438 439
D3DRMQUATERNION * WINAPI D3DRMQuaternionFromRotation(D3DRMQUATERNION *x, D3DVECTOR *axis, D3DVALUE theta);
D3DRMQUATERNION * WINAPI D3DRMQuaternionMultiply(D3DRMQUATERNION *ret, D3DRMQUATERNION *x, D3DRMQUATERNION *y);
D3DRMQUATERNION * WINAPI D3DRMQuaternionSlerp(D3DRMQUATERNION *ret,
        D3DRMQUATERNION *x, D3DRMQUATERNION *y, D3DVALUE alpha);
440

441 442 443 444
D3DVECTOR * WINAPI D3DRMVectorAdd(D3DVECTOR *ret, D3DVECTOR *x, D3DVECTOR *y);
D3DVECTOR * WINAPI D3DRMVectorCrossProduct(D3DVECTOR *ret, D3DVECTOR *x, D3DVECTOR *y);
D3DVALUE WINAPI D3DRMVectorDotProduct(D3DVECTOR *x, D3DVECTOR *y);
D3DVECTOR * WINAPI D3DRMVectorNormalize(D3DVECTOR *x);
445 446 447

#define D3DRMVectorNormalise D3DRMVectorNormalize

448 449 450 451 452 453
D3DVALUE WINAPI D3DRMVectorModulus(D3DVECTOR *x);
D3DVECTOR * WINAPI D3DRMVectorRandom(D3DVECTOR *ret);
D3DVECTOR * WINAPI D3DRMVectorRotate(D3DVECTOR *ret, D3DVECTOR *x, D3DVECTOR *axis, D3DVALUE theta);
D3DVECTOR * WINAPI D3DRMVectorReflect(D3DVECTOR *ret, D3DVECTOR *ray, D3DVECTOR *normal);
D3DVECTOR * WINAPI D3DRMVectorScale(D3DVECTOR *ret, D3DVECTOR *x, D3DVALUE scale);
D3DVECTOR * WINAPI D3DRMVectorSubtract(D3DVECTOR *ret, D3DVECTOR *x, D3DVECTOR *y);
454

455
D3DCOLOR WINAPI D3DRMCreateColorRGB(D3DVALUE, D3DVALUE, D3DVALUE);
456
D3DCOLOR WINAPI D3DRMCreateColorRGBA(D3DVALUE, D3DVALUE, D3DVALUE, D3DVALUE);
457
D3DVALUE WINAPI D3DRMColorGetAlpha(D3DCOLOR);
458
D3DVALUE WINAPI D3DRMColorGetBlue(D3DCOLOR);
459
D3DVALUE WINAPI D3DRMColorGetGreen(D3DCOLOR);
460 461
D3DVALUE WINAPI D3DRMColorGetRed(D3DCOLOR);

462 463 464 465 466
#if defined(__cplusplus)
}
#endif

#endif