home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / borland / cb / setup / cbuilder / data.z / D3DRMOBJ.H < prev    next >
C/C++ Source or Header  |  1997-02-28  |  33KB  |  736 lines

  1. /*==========================================================================;
  2.  *
  3.  *  Copyright (C) 1995-1996 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:       d3drm.h
  6.  *  Content:    Direct3DRM include file
  7.  *
  8.  ***************************************************************************/
  9.  
  10. #ifndef _D3DRMOBJ_H_
  11. #define _D3DRMOBJ_H_
  12. #pragma option -b
  13.  
  14. #pragma option -b.
  15. #include <objbase.h> /* Use Windows header files */
  16. #pragma option -b
  17. #define VIRTUAL
  18.  
  19. #pragma option -b.
  20. #include "d3drmdef.h"
  21. #pragma option -b
  22. #pragma option -b.
  23. #include "d3d.h"
  24. #pragma option -b
  25.  
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29.  
  30. /*
  31.  * The methods for IUnknown
  32.  */
  33. #define IUNKNOWN_METHODS(kind) \
  34.     STDMETHOD(QueryInterface)           (THIS_ REFIID riid, LPVOID *ppvObj) kind; \
  35.     STDMETHOD_(ULONG, AddRef)           (THIS) kind; \
  36.     STDMETHOD_(ULONG, Release)          (THIS) kind
  37.  
  38. /*
  39.  * The methods for IDirect3DRMObject
  40.  */
  41. #define IDIRECT3DRMOBJECT_METHODS(kind) \
  42.     STDMETHOD(Clone)                    (THIS_ LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj) kind; \
  43.     STDMETHOD(AddDestroyCallback)       (THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) kind; \
  44.     STDMETHOD(DeleteDestroyCallback)    (THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) kind; \
  45.     STDMETHOD(SetAppData)               (THIS_ DWORD data) kind; \
  46.     STDMETHOD_(DWORD, GetAppData)       (THIS) kind; \
  47.     STDMETHOD(SetName)                  (THIS_ LPCSTR) kind; \
  48.     STDMETHOD(GetName)                  (THIS_ LPDWORD lpdwSize, LPSTR lpName) kind; \
  49.     STDMETHOD(GetClassName)             (THIS_ LPDWORD lpdwSize, LPSTR lpName) kind
  50.  
  51.  
  52. #define WIN_TYPES(itype, ptype) \
  53.     typedef interface itype FAR *LP##ptype, FAR **LPLP##ptype
  54.  
  55. WIN_TYPES(IDirect3DRMObject, DIRECT3DRMOBJECT);
  56. WIN_TYPES(IDirect3DRMDevice, DIRECT3DRMDEVICE);
  57. WIN_TYPES(IDirect3DRMViewport, DIRECT3DRMVIEWPORT);
  58. WIN_TYPES(IDirect3DRMFrame, DIRECT3DRMFRAME);
  59. WIN_TYPES(IDirect3DRMVisual, DIRECT3DRMVISUAL);
  60. WIN_TYPES(IDirect3DRMMesh, DIRECT3DRMMESH);
  61. WIN_TYPES(IDirect3DRMMeshBuilder, DIRECT3DRMMESHBUILDER);
  62. WIN_TYPES(IDirect3DRMFace, DIRECT3DRMFACE);
  63. WIN_TYPES(IDirect3DRMLight, DIRECT3DRMLIGHT);
  64. WIN_TYPES(IDirect3DRMTexture, DIRECT3DRMTEXTURE);
  65. WIN_TYPES(IDirect3DRMWrap, DIRECT3DRMWRAP);
  66. WIN_TYPES(IDirect3DRMMaterial, DIRECT3DRMMATERIAL);
  67. WIN_TYPES(IDirect3DRMAnimation, DIRECT3DRMANIMATION);
  68. WIN_TYPES(IDirect3DRMAnimationSet, DIRECT3DRMANIMATIONSET);
  69. WIN_TYPES(IDirect3DRMUserVisual, DIRECT3DRMUSERVISUAL);
  70. WIN_TYPES(IDirect3DRMShadow, DIRECT3DRMSHADOW);
  71. WIN_TYPES(IDirect3DRMArray, DIRECT3DRMOBJECTARRAY);
  72. WIN_TYPES(IDirect3DRMDeviceArray, DIRECT3DRMDEVICEARRAY);
  73. WIN_TYPES(IDirect3DRMFaceArray, DIRECT3DRMFACEARRAY);
  74. WIN_TYPES(IDirect3DRMViewportArray, DIRECT3DRMVIEWPORTARRAY);
  75. WIN_TYPES(IDirect3DRMFrameArray, DIRECT3DRMFRAMEARRAY);
  76. WIN_TYPES(IDirect3DRMVisualArray, DIRECT3DRMVISUALARRAY);
  77. WIN_TYPES(IDirect3DRMPickedArray, DIRECT3DRMPICKEDARRAY);
  78. WIN_TYPES(IDirect3DRMLightArray, DIRECT3DRMLIGHTARRAY);
  79.  
  80. /*
  81.  * Direct3DRM Object classes
  82.  */
  83. DEFINE_GUID(CLSID_CDirect3DRMDevice,        0x4fa3568e, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  84. DEFINE_GUID(CLSID_CDirect3DRMViewport,      0x4fa3568f, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  85. DEFINE_GUID(CLSID_CDirect3DRMFrame,         0x4fa35690, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  86. DEFINE_GUID(CLSID_CDirect3DRMMesh,          0x4fa35691, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  87. DEFINE_GUID(CLSID_CDirect3DRMMeshBuilder,   0x4fa35692, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  88. DEFINE_GUID(CLSID_CDirect3DRMFace,          0x4fa35693, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  89. DEFINE_GUID(CLSID_CDirect3DRMLight,         0x4fa35694, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  90. DEFINE_GUID(CLSID_CDirect3DRMTexture,       0x4fa35695, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  91. DEFINE_GUID(CLSID_CDirect3DRMWrap,          0x4fa35696, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  92. DEFINE_GUID(CLSID_CDirect3DRMMaterial,      0x4fa35697, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  93. DEFINE_GUID(CLSID_CDirect3DRMAnimation,     0x4fa35698, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  94. DEFINE_GUID(CLSID_CDirect3DRMAnimationSet,  0x4fa35699, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  95. DEFINE_GUID(CLSID_CDirect3DRMUserVisual,    0x4fa3569a, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  96. DEFINE_GUID(CLSID_CDirect3DRMShadow,        0x4fa3569b, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  97.  
  98. /*
  99.  * Direct3DRM Object interfaces
  100.  */
  101. DEFINE_GUID(IID_IDirect3DRMObject,          0xeb16cb00, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  102. DEFINE_GUID(IID_IDirect3DRMDevice,          0xe9e19280, 0x6e05, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  103. DEFINE_GUID(IID_IDirect3DRMViewport,        0xeb16cb02, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  104. DEFINE_GUID(IID_IDirect3DRMFrame,           0xeb16cb03, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  105. DEFINE_GUID(IID_IDirect3DRMVisual,          0xeb16cb04, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  106. DEFINE_GUID(IID_IDirect3DRMMesh,            0xa3a80d01, 0x6e12, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  107. DEFINE_GUID(IID_IDirect3DRMMeshBuilder,     0xa3a80d02, 0x6e12, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  108. DEFINE_GUID(IID_IDirect3DRMFace,            0xeb16cb07, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  109. DEFINE_GUID(IID_IDirect3DRMLight,           0xeb16cb08, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  110. DEFINE_GUID(IID_IDirect3DRMTexture,         0xeb16cb09, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  111. DEFINE_GUID(IID_IDirect3DRMWrap,            0xeb16cb0a, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  112. DEFINE_GUID(IID_IDirect3DRMMaterial,        0xeb16cb0b, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  113. DEFINE_GUID(IID_IDirect3DRMAnimation,       0xeb16cb0d, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  114. DEFINE_GUID(IID_IDirect3DRMAnimationSet,    0xeb16cb0e, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  115. DEFINE_GUID(IID_IDirect3DRMDeviceArray,     0xeb16cb10, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  116. DEFINE_GUID(IID_IDirect3DRMViewportArray,   0xeb16cb11, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  117. DEFINE_GUID(IID_IDirect3DRMFrameArray,      0xeb16cb12, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  118. DEFINE_GUID(IID_IDirect3DRMVisualArray,     0xeb16cb13, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  119. DEFINE_GUID(IID_IDirect3DRMLightArray,      0xeb16cb14, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  120. DEFINE_GUID(IID_IDirect3DRMPickedArray,     0xeb16cb16, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  121. DEFINE_GUID(IID_IDirect3DRMFaceArray,       0xeb16cb17, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  122. DEFINE_GUID(IID_IDirect3DRMUserVisual,      0x59163de0, 0x6d43, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  123. DEFINE_GUID(IID_IDirect3DRMShadow,          0xaf359780, 0x6ba3, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  124.  
  125. typedef void (*D3DRMOBJECTCALLBACK)(LPDIRECT3DRMOBJECT obj, LPVOID arg);
  126. typedef void (*D3DRMFRAMEMOVECALLBACK)(LPDIRECT3DRMFRAME obj, LPVOID arg, D3DVALUE delta);
  127. typedef void (*D3DRMUPDATECALLBACK)(LPDIRECT3DRMDEVICE obj, LPVOID arg, int, LPD3DRECT);
  128. typedef int (*D3DRMUSERVISUALCALLBACK)(LPDIRECT3DRMUSERVISUAL obj, LPVOID arg,
  129.                                     D3DRMUSERVISUALREASON reason,
  130.                                     LPDIRECT3DRMDEVICE dev,
  131.                                     LPDIRECT3DRMVIEWPORT view);
  132. typedef HRESULT (*D3DRMLOADTEXTURECALLBACK)
  133.     (char *tex_name, void *arg, LPDIRECT3DRMTEXTURE *);
  134. typedef void (*D3DRMLOADCALLBACK)
  135.      (LPDIRECT3DRMOBJECT object, REFIID objectguid, LPVOID arg);
  136.  
  137.  
  138.  
  139. typedef struct _D3DRMPICKDESC
  140. {
  141.     ULONG       ulFaceIdx;
  142.     LONG        lGroupIdx;
  143.     D3DVECTOR   vPosition;
  144.  
  145. } D3DRMPICKDESC, *LPD3DRMPICKDESC;
  146.  
  147. #undef INTERFACE
  148. #define INTERFACE IDirect3DRMObject
  149.  
  150. /*
  151.  * Base class
  152.  */
  153. DECLARE_INTERFACE_(IDirect3DRMObject, IUnknown)
  154. {
  155.     IUNKNOWN_METHODS(PURE);
  156.     IDIRECT3DRMOBJECT_METHODS(PURE);
  157. };
  158.  
  159. #undef INTERFACE
  160. #define INTERFACE IDirect3DRMVisual
  161.  
  162. DECLARE_INTERFACE_(IDirect3DRMVisual, IDirect3DRMObject)
  163. {
  164.     IUNKNOWN_METHODS(PURE);
  165.     IDIRECT3DRMOBJECT_METHODS(PURE);
  166. };
  167.  
  168. #undef INTERFACE
  169. #define INTERFACE IDirect3DRMDevice
  170.  
  171. DECLARE_INTERFACE_(IDirect3DRMDevice, IDirect3DRMObject)
  172. {
  173.     IUNKNOWN_METHODS(PURE);
  174.     IDIRECT3DRMOBJECT_METHODS(PURE);
  175.  
  176.     /*
  177.      * IDirect3DRMDevice methods
  178.      */
  179.     STDMETHOD(Init)(THIS_ ULONG width, ULONG height) PURE;
  180.     STDMETHOD(InitFromD3D)(THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev) PURE;
  181.     STDMETHOD(InitFromClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID, int width, int height) PURE;
  182.  
  183.     STDMETHOD(Update)(THIS) PURE;
  184.     STDMETHOD(AddUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE;
  185.     STDMETHOD(DeleteUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE;
  186.     STDMETHOD(SetBufferCount)(THIS_ DWORD) PURE;
  187.     STDMETHOD_(DWORD, GetBufferCount)(THIS) PURE;
  188.  
  189.     STDMETHOD(SetDither)(THIS_ BOOL) PURE;
  190.     STDMETHOD(SetShades)(THIS_ DWORD) PURE;
  191.     STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE;
  192.     STDMETHOD(SetTextureQuality)(THIS_ D3DRMTEXTUREQUALITY) PURE;
  193.  
  194.     STDMETHOD(GetViewports)(THIS_ LPDIRECT3DRMVIEWPORTARRAY *return_views) PURE;
  195.  
  196.     STDMETHOD_(BOOL, GetDither)(THIS) PURE;
  197.     STDMETHOD_(DWORD, GetShades)(THIS) PURE;
  198.     STDMETHOD_(DWORD, GetHeight)(THIS) PURE;
  199.     STDMETHOD_(DWORD, GetWidth)(THIS) PURE;
  200.     STDMETHOD_(DWORD, GetTrianglesDrawn)(THIS) PURE;
  201.     STDMETHOD_(DWORD, GetWireframeOptions)(THIS) PURE;
  202.     STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE;
  203.     STDMETHOD_(D3DCOLORMODEL, GetColorModel)(THIS) PURE;
  204.     STDMETHOD_(D3DRMTEXTUREQUALITY, GetTextureQuality)(THIS) PURE;
  205.     STDMETHOD(GetDirect3DDevice)(THIS_ LPDIRECT3DDEVICE *) PURE;
  206. };
  207.  
  208. #undef INTERFACE
  209. #define INTERFACE IDirect3DRMViewport
  210.  
  211. DECLARE_INTERFACE_(IDirect3DRMViewport, IDirect3DRMObject)
  212. {
  213.     IUNKNOWN_METHODS(PURE);
  214.     IDIRECT3DRMOBJECT_METHODS(PURE);
  215.  
  216.     /*
  217.      * IDirect3DRMViewport methods
  218.      */
  219.     STDMETHOD(Init)
  220.     (   THIS_ LPDIRECT3DRMDEVICE dev, LPDIRECT3DRMFRAME camera,
  221.         DWORD xpos, DWORD ypos, DWORD width, DWORD height
  222.     ) PURE;
  223.     STDMETHOD(Clear)(THIS) PURE;
  224.     STDMETHOD(Render)(THIS_ LPDIRECT3DRMFRAME) PURE;
  225.  
  226.     STDMETHOD(SetFront)(THIS_ D3DVALUE) PURE;
  227.     STDMETHOD(SetBack)(THIS_ D3DVALUE) PURE;
  228.     STDMETHOD(SetField)(THIS_ D3DVALUE) PURE;
  229.     STDMETHOD(SetUniformScaling)(THIS_ BOOL) PURE;
  230.     STDMETHOD(SetCamera)(THIS_ LPDIRECT3DRMFRAME) PURE;
  231.     STDMETHOD(SetProjection)(THIS_ D3DRMPROJECTIONTYPE) PURE;
  232.     STDMETHOD(Transform)(THIS_ D3DRMVECTOR4D *d, D3DVECTOR *s) PURE;
  233.     STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DRMVECTOR4D *s) PURE;
  234.     STDMETHOD(Configure)(THIS_ LONG x, LONG y, DWORD width, DWORD height) PURE;
  235.     STDMETHOD(ForceUpdate)(THIS_ DWORD x1, DWORD y1, DWORD x2, DWORD y2) PURE;
  236.     STDMETHOD(SetPlane)(THIS_ D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top) PURE;
  237.  
  238.     STDMETHOD(GetCamera)(THIS_ LPDIRECT3DRMFRAME *) PURE;
  239.     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DRMDEVICE *) PURE;
  240.     STDMETHOD(GetPlane)(THIS_ D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top) PURE;
  241.     STDMETHOD(Pick)(THIS_ LONG x, LONG y, LPDIRECT3DRMPICKEDARRAY *return_visuals) PURE;
  242.  
  243.     STDMETHOD_(BOOL, GetUniformScaling)(THIS) PURE;
  244.     STDMETHOD_(LONG, GetX)(THIS) PURE;
  245.     STDMETHOD_(LONG, GetY)(THIS) PURE;
  246.     STDMETHOD_(DWORD, GetWidth)(THIS) PURE;
  247.     STDMETHOD_(DWORD, GetHeight)(THIS) PURE;
  248.     STDMETHOD_(D3DVALUE, GetField)(THIS) PURE;
  249.     STDMETHOD_(D3DVALUE, GetBack)(THIS) PURE;
  250.     STDMETHOD_(D3DVALUE, GetFront)(THIS) PURE;
  251.     STDMETHOD_(D3DRMPROJECTIONTYPE, GetProjection)(THIS) PURE;
  252.     STDMETHOD(GetDirect3DViewport)(THIS_ LPDIRECT3DVIEWPORT *) PURE;
  253. };
  254.  
  255. #undef INTERFACE
  256. #define INTERFACE IDirect3DRMFrame
  257.  
  258. DECLARE_INTERFACE_(IDirect3DRMFrame, IDirect3DRMVisual)
  259. {
  260.     IUNKNOWN_METHODS(PURE);
  261.     IDIRECT3DRMOBJECT_METHODS(PURE);
  262.  
  263.     /*
  264.      * IDirect3DRMFrame methods
  265.      */
  266.     STDMETHOD(AddChild)(THIS_ LPDIRECT3DRMFRAME child) PURE;
  267.     STDMETHOD(AddLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
  268.     STDMETHOD(AddMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
  269.     STDMETHOD(AddTransform)(THIS_ D3DRMCOMBINETYPE, D3DRMMATRIX4D) PURE;
  270.     STDMETHOD(AddTranslation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  271.     STDMETHOD(AddScale)(THIS_ D3DRMCOMBINETYPE, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
  272.     STDMETHOD(AddRotation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE;
  273.     STDMETHOD(AddVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE;
  274.     STDMETHOD(GetChildren)(THIS_ LPDIRECT3DRMFRAMEARRAY *children) PURE;
  275.     STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
  276.     STDMETHOD(GetLights)(THIS_ LPDIRECT3DRMLIGHTARRAY *lights) PURE;
  277.     STDMETHOD_(D3DRMMATERIALMODE, GetMaterialMode)(THIS) PURE;
  278.     STDMETHOD(GetParent)(THIS_ LPDIRECT3DRMFRAME *) PURE;
  279.     STDMETHOD(GetPosition)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_position) PURE;
  280.     STDMETHOD(GetRotation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR axis, LPD3DVALUE return_theta) PURE;
  281.     STDMETHOD(GetScene)(THIS_ LPDIRECT3DRMFRAME *) PURE;
  282.     STDMETHOD_(D3DRMSORTMODE, GetSortMode)(THIS) PURE;
  283.     STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE *) PURE;
  284.     STDMETHOD(GetTransform)(THIS_ D3DRMMATRIX4D return_matrix) PURE;
  285.     STDMETHOD(GetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_velocity, BOOL with_rotation) PURE;
  286.     STDMETHOD(GetOrientation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR dir, LPD3DVECTOR up) PURE;
  287.     STDMETHOD(GetVisuals)(THIS_ LPDIRECT3DRMVISUALARRAY *visuals) PURE;
  288.     STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE;
  289.     STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE;
  290.     STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg)PURE;
  291.     STDMETHOD(LookAt)(THIS_ LPDIRECT3DRMFRAME target, LPDIRECT3DRMFRAME reference, D3DRMFRAMECONSTRAINT) PURE;
  292.     STDMETHOD(Move)(THIS_ D3DVALUE delta) PURE;
  293.     STDMETHOD(DeleteChild)(THIS_ LPDIRECT3DRMFRAME) PURE;
  294.     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
  295.     STDMETHOD(DeleteMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
  296.     STDMETHOD(DeleteVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE;
  297.     STDMETHOD_(D3DCOLOR, GetSceneBackground)(THIS) PURE;
  298.     STDMETHOD(GetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *) PURE;
  299.     STDMETHOD_(D3DCOLOR, GetSceneFogColor)(THIS) PURE;
  300.     STDMETHOD_(BOOL, GetSceneFogEnable)(THIS) PURE;
  301.     STDMETHOD_(D3DRMFOGMODE, GetSceneFogMode)(THIS) PURE;
  302.     STDMETHOD(GetSceneFogParams)(THIS_ D3DVALUE *return_start, D3DVALUE *return_end, D3DVALUE *return_density) PURE;
  303.     STDMETHOD(SetSceneBackground)(THIS_ D3DCOLOR) PURE;
  304.     STDMETHOD(SetSceneBackgroundRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  305.     STDMETHOD(SetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  306.     STDMETHOD(SetSceneBackgroundImage)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
  307.     STDMETHOD(SetSceneFogEnable)(THIS_ BOOL) PURE;
  308.     STDMETHOD(SetSceneFogColor)(THIS_ D3DCOLOR) PURE;
  309.     STDMETHOD(SetSceneFogMode)(THIS_ D3DRMFOGMODE) PURE;
  310.     STDMETHOD(SetSceneFogParams)(THIS_ D3DVALUE start, D3DVALUE end, D3DVALUE density) PURE;
  311.     STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  312.     STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  313.     STDMETHOD_(D3DRMZBUFFERMODE, GetZbufferMode)(THIS) PURE;
  314.     STDMETHOD(SetMaterialMode)(THIS_ D3DRMMATERIALMODE) PURE;
  315.     STDMETHOD(SetOrientation)
  316.     (   THIS_ LPDIRECT3DRMFRAME reference,
  317.         D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  318.         D3DVALUE ux, D3DVALUE uy, D3DVALUE uz
  319.     ) PURE;
  320.     STDMETHOD(SetPosition)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  321.     STDMETHOD(SetRotation)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE;
  322.     STDMETHOD(SetSortMode)(THIS_ D3DRMSORTMODE) PURE;
  323.     STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
  324.     STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
  325.     STDMETHOD(SetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation) PURE;
  326.     STDMETHOD(SetZbufferMode)(THIS_ D3DRMZBUFFERMODE) PURE;
  327.     STDMETHOD(Transform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE;
  328. };
  329.  
  330. #undef INTERFACE
  331. #define INTERFACE IDirect3DRMMesh
  332.  
  333. DECLARE_INTERFACE_(IDirect3DRMMesh, IDirect3DRMVisual)
  334. {
  335.     IUNKNOWN_METHODS(PURE);
  336.     IDIRECT3DRMOBJECT_METHODS(PURE);
  337.  
  338.     /*
  339.      * IDirect3DRMMesh methods
  340.      */
  341.     STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
  342.     STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE;
  343.     STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE;
  344.     STDMETHOD(AddGroup)(THIS_ unsigned vCount, unsigned fCount, unsigned vPerFace, unsigned *fData, D3DRMGROUPINDEX *returnId) PURE;
  345.     STDMETHOD(SetVertices)(THIS_ D3DRMGROUPINDEX id, unsigned index, unsigned count, D3DRMVERTEX *values) PURE;
  346.     STDMETHOD(SetGroupColor)(THIS_ D3DRMGROUPINDEX id, D3DCOLOR value) PURE;
  347.     STDMETHOD(SetGroupColorRGB)(THIS_ D3DRMGROUPINDEX id, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  348.     STDMETHOD(SetGroupMapping)(THIS_ D3DRMGROUPINDEX id, D3DRMMAPPING value) PURE;
  349.     STDMETHOD(SetGroupQuality)(THIS_ D3DRMGROUPINDEX id, D3DRMRENDERQUALITY value) PURE;
  350.     STDMETHOD(SetGroupMaterial)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMMATERIAL value) PURE;
  351.     STDMETHOD(SetGroupTexture)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMTEXTURE value) PURE;
  352.  
  353.     STDMETHOD_(unsigned, GetGroupCount)(THIS) PURE;
  354.     STDMETHOD(GetGroup)(THIS_ D3DRMGROUPINDEX id, unsigned *vCount, unsigned *fCount, unsigned *vPerFace, DWORD *fDataSize, unsigned *fData) PURE;
  355.     STDMETHOD(GetVertices)(THIS_ D3DRMGROUPINDEX id, DWORD index, DWORD count, D3DRMVERTEX *returnPtr) PURE;
  356.     STDMETHOD_(D3DCOLOR, GetGroupColor)(THIS_ D3DRMGROUPINDEX id) PURE;
  357.     STDMETHOD_(D3DRMMAPPING, GetGroupMapping)(THIS_ D3DRMGROUPINDEX id) PURE;
  358.     STDMETHOD_(D3DRMRENDERQUALITY, GetGroupQuality)(THIS_ D3DRMGROUPINDEX id) PURE;
  359.     STDMETHOD(GetGroupMaterial)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMMATERIAL *returnPtr) PURE;
  360.     STDMETHOD(GetGroupTexture)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMTEXTURE *returnPtr) PURE;
  361. };
  362.  
  363. #undef INTERFACE
  364. #define INTERFACE IDirect3DRMShadow
  365.  
  366. DECLARE_INTERFACE_(IDirect3DRMShadow, IDirect3DRMVisual)
  367. {
  368.     IUNKNOWN_METHODS(PURE);
  369.     IDIRECT3DRMOBJECT_METHODS(PURE);
  370.  
  371.     /*
  372.      * IDirect3DRMShadow methods
  373.      */
  374.     STDMETHOD(Init)
  375.     (   THIS_ LPDIRECT3DRMVISUAL visual, LPDIRECT3DRMLIGHT light,
  376.         D3DVALUE px, D3DVALUE py, D3DVALUE pz,
  377.         D3DVALUE nx, D3DVALUE ny, D3DVALUE nz
  378.     ) PURE;
  379. };
  380.  
  381. #undef INTERFACE
  382. #define INTERFACE IDirect3DRMFace
  383.  
  384. DECLARE_INTERFACE_(IDirect3DRMFace, IDirect3DRMObject)
  385. {
  386.     IUNKNOWN_METHODS(PURE);
  387.     IDIRECT3DRMOBJECT_METHODS(PURE);
  388.  
  389.     /*
  390.      * IDirect3DRMFace methods
  391.      */
  392.      STDMETHOD(AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  393.      STDMETHOD(AddVertexAndNormalIndexed)(THIS_ DWORD vertex, DWORD normal) PURE;
  394.      STDMETHOD(SetColorRGB)(THIS_ D3DVALUE, D3DVALUE, D3DVALUE) PURE;
  395.      STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  396.      STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
  397.      STDMETHOD(SetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE u, D3DVALUE v) PURE;
  398.      STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE;
  399.      STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
  400.  
  401.      STDMETHOD(GetVertex)(THIS_ DWORD index, D3DVECTOR *vertex, D3DVECTOR *normal) PURE;
  402.      STDMETHOD(GetVertices)(THIS_ DWORD *vertex_count, D3DVECTOR *coords, D3DVECTOR *normals);
  403.      STDMETHOD(GetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE *u, D3DVALUE *v) PURE;
  404.      STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE;
  405.      STDMETHOD(GetNormal)(THIS_ D3DVECTOR *) PURE;
  406.      STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE *) PURE;
  407.      STDMETHOD(GetMaterial)(THIS_ LPDIRECT3DRMMATERIAL *) PURE;
  408.  
  409.      STDMETHOD_(int, GetVertexCount)(THIS) PURE;
  410.      STDMETHOD_(int, GetVertexIndex)(THIS_ DWORD which) PURE;
  411.      STDMETHOD_(int, GetTextureCoordinateIndex)(THIS_ DWORD which) PURE;
  412.      STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
  413. };
  414.  
  415. #undef INTERFACE
  416. #define INTERFACE IDirect3DRMMeshBuilder
  417.  
  418. DECLARE_INTERFACE_(IDirect3DRMMeshBuilder, IDirect3DRMVisual)
  419. {
  420.     IUNKNOWN_METHODS(PURE);
  421.     IDIRECT3DRMOBJECT_METHODS(PURE);
  422.  
  423.     /*
  424.      * IDirect3DRMMeshBuilder methods
  425.      */
  426.     STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg) PURE;
  427.     STDMETHOD(Save)(THIS_ const char *filename, D3DRMXOFFORMAT, D3DRMSAVEOPTIONS save) PURE;
  428.     STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
  429.     STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE;
  430.     STDMETHOD(SetColorSource)(THIS_ D3DRMCOLORSOURCE) PURE;
  431.     STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE;
  432.     STDMETHOD(GenerateNormals)(THIS) PURE;
  433.     STDMETHOD_(D3DRMCOLORSOURCE, GetColorSource)(THIS) PURE;
  434.  
  435.     STDMETHOD(AddMesh)(THIS_ LPDIRECT3DRMMESH) PURE;
  436.     STDMETHOD(AddMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER) PURE;
  437.     STDMETHOD(AddFrame)(THIS_ LPDIRECT3DRMFRAME) PURE;
  438.     STDMETHOD(AddFace)(THIS_ LPDIRECT3DRMFACE) PURE;
  439.     STDMETHOD(AddFaces)
  440.     (   THIS_ DWORD vcount, D3DVECTOR *vertices, DWORD ncount, D3DVECTOR *normals,
  441.         DWORD *data, LPDIRECT3DRMFACEARRAY*
  442.     ) PURE;
  443.     STDMETHOD(ReserveSpace)(THIS_ DWORD vertex_Count, DWORD normal_count, DWORD face_count) PURE;
  444.     STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  445.     STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  446.     STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
  447.     STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE;
  448.     STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
  449.     STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE;
  450.     STDMETHOD(SetPerspective)(THIS_ BOOL) PURE;
  451.     STDMETHOD(SetVertex)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  452.     STDMETHOD(SetNormal)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  453.     STDMETHOD(SetTextureCoordinates)(THIS_ DWORD index, D3DVALUE u, D3DVALUE v) PURE;
  454.     STDMETHOD(SetVertexColor)(THIS_ DWORD index, D3DCOLOR) PURE;
  455.     STDMETHOD(SetVertexColorRGB)(THIS_ DWORD index, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  456.  
  457.     STDMETHOD(GetFaces)(THIS_ LPDIRECT3DRMFACEARRAY*) PURE;
  458.     STDMETHOD(GetVertices)
  459.     (   THIS_ DWORD *vcount, D3DVECTOR *vertices, DWORD *ncount, D3DVECTOR *normals, DWORD *face_data_size, DWORD *face_data
  460.     ) PURE;
  461.     STDMETHOD(GetTextureCoordinates)(THIS_ DWORD index, D3DVALUE *u, D3DVALUE *v) PURE;
  462.  
  463.     STDMETHOD_(int, AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  464.     STDMETHOD_(int, AddNormal)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  465.     STDMETHOD(CreateFace)(THIS_ LPDIRECT3DRMFACE*) PURE;
  466.     STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE;
  467.     STDMETHOD_(BOOL, GetPerspective)(THIS) PURE;
  468.     STDMETHOD_(int, GetFaceCount)(THIS) PURE;
  469.     STDMETHOD_(int, GetVertexCount)(THIS) PURE;
  470.     STDMETHOD_(D3DCOLOR, GetVertexColor)(THIS_ DWORD index) PURE;
  471.  
  472.     STDMETHOD(CreateMesh)(THIS_ LPDIRECT3DRMMESH*) PURE;
  473. };
  474.  
  475. #undef INTERFACE
  476. #define INTERFACE IDirect3DRMLight
  477.  
  478. DECLARE_INTERFACE_(IDirect3DRMLight, IDirect3DRMObject)
  479. {
  480.     IUNKNOWN_METHODS(PURE);
  481.     IDIRECT3DRMOBJECT_METHODS(PURE);
  482.  
  483.     /*
  484.      * IDirect3DRMLight methods
  485.      */
  486.     STDMETHOD(SetType)(THIS_ D3DRMLIGHTTYPE) PURE;
  487.     STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  488.     STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  489.     STDMETHOD(SetRange)(THIS_ D3DVALUE) PURE;
  490.     STDMETHOD(SetUmbra)(THIS_ D3DVALUE) PURE;
  491.     STDMETHOD(SetPenumbra)(THIS_ D3DVALUE) PURE;
  492.     STDMETHOD(SetConstantAttenuation)(THIS_ D3DVALUE) PURE;
  493.     STDMETHOD(SetLinearAttenuation)(THIS_ D3DVALUE) PURE;
  494.     STDMETHOD(SetQuadraticAttenuation)(THIS_ D3DVALUE) PURE;
  495.  
  496.     STDMETHOD_(D3DVALUE, GetRange)(THIS) PURE;
  497.     STDMETHOD_(D3DVALUE, GetUmbra)(THIS) PURE;
  498.     STDMETHOD_(D3DVALUE, GetPenumbra)(THIS) PURE;
  499.     STDMETHOD_(D3DVALUE, GetConstantAttenuation)(THIS) PURE;
  500.     STDMETHOD_(D3DVALUE, GetLinearAttenuation)(THIS) PURE;
  501.     STDMETHOD_(D3DVALUE, GetQuadraticAttenuation)(THIS) PURE;
  502.     STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
  503.     STDMETHOD_(D3DRMLIGHTTYPE, GetType)(THIS) PURE;
  504.  
  505.     STDMETHOD(SetEnableFrame)(THIS_ LPDIRECT3DRMFRAME) PURE;
  506.     STDMETHOD(GetEnableFrame)(THIS_ LPDIRECT3DRMFRAME*) PURE;
  507. };
  508.  
  509. #undef INTERFACE
  510. #define INTERFACE IDirect3DRMTexture
  511.  
  512. DECLARE_INTERFACE_(IDirect3DRMTexture, IDirect3DRMVisual)
  513. {
  514.     IUNKNOWN_METHODS(PURE);
  515.     IDIRECT3DRMOBJECT_METHODS(PURE);
  516.  
  517.     /*
  518.      * IDirect3DRMTexture methods
  519.      */
  520.     STDMETHOD(InitFromFile)(THIS_ const char *filename) PURE;
  521.     STDMETHOD(InitFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS) PURE;
  522.     STDMETHOD(InitFromResource)(THIS_ HRSRC) PURE;
  523.     STDMETHOD(Changed)(THIS_ BOOL pixels, BOOL palette) PURE;
  524.  
  525.     STDMETHOD(SetColors)(THIS_ DWORD) PURE;
  526.     STDMETHOD(SetShades)(THIS_ DWORD) PURE;
  527.     STDMETHOD(SetDecalSize)(THIS_ D3DVALUE width, D3DVALUE height) PURE;
  528.     STDMETHOD(SetDecalOrigin)(THIS_ LONG x, LONG y) PURE;
  529.     STDMETHOD(SetDecalScale)(THIS_ DWORD) PURE;
  530.     STDMETHOD(SetDecalTransparency)(THIS_ BOOL) PURE;
  531.     STDMETHOD(SetDecalTransparentColor)(THIS_ D3DCOLOR) PURE;
  532.  
  533.     STDMETHOD(GetDecalSize)(THIS_ D3DVALUE *width_return, D3DVALUE *height_return) PURE;
  534.     STDMETHOD(GetDecalOrigin)(THIS_ LONG *x_return, LONG *y_return) PURE;
  535.  
  536.     STDMETHOD_(D3DRMIMAGE *, GetImage)(THIS) PURE;
  537.     STDMETHOD_(DWORD, GetShades)(THIS) PURE;
  538.     STDMETHOD_(DWORD, GetColors)(THIS) PURE;
  539.     STDMETHOD_(DWORD, GetDecalScale)(THIS) PURE;
  540.     STDMETHOD_(BOOL, GetDecalTransparency)(THIS) PURE;
  541.     STDMETHOD_(D3DCOLOR, GetDecalTransparentColor)(THIS) PURE;
  542. };
  543.  
  544. #undef INTERFACE
  545. #define INTERFACE IDirect3DRMWrap
  546.  
  547. DECLARE_INTERFACE_(IDirect3DRMWrap, IDirect3DRMObject)
  548. {
  549.     IUNKNOWN_METHODS(PURE);
  550.     IDIRECT3DRMOBJECT_METHODS(PURE);
  551.  
  552.     /*
  553.      * IDirect3DRMWrap methods
  554.      */
  555.     STDMETHOD(Init)
  556.     (   THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME ref,
  557.         D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
  558.         D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  559.         D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
  560.         D3DVALUE ou, D3DVALUE ov,
  561.         D3DVALUE su, D3DVALUE sv
  562.     ) PURE;
  563.     STDMETHOD(Apply)(THIS_ LPDIRECT3DRMOBJECT) PURE;
  564.     STDMETHOD(ApplyRelative)(THIS_ LPDIRECT3DRMFRAME frame, LPDIRECT3DRMOBJECT) PURE;
  565. };
  566.  
  567. #undef INTERFACE
  568. #define INTERFACE IDirect3DRMMaterial
  569.  
  570. DECLARE_INTERFACE_(IDirect3DRMMaterial, IDirect3DRMObject)
  571. {
  572.     IUNKNOWN_METHODS(PURE);
  573.     IDIRECT3DRMOBJECT_METHODS(PURE);
  574.  
  575.     /*
  576.      * IDirect3DRMMaterial methods
  577.      */
  578.     STDMETHOD(SetPower)(THIS_ D3DVALUE power) PURE;
  579.     STDMETHOD(SetSpecular)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE;
  580.     STDMETHOD(SetEmissive)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE;
  581.  
  582.     STDMETHOD_(D3DVALUE, GetPower)(THIS) PURE;
  583.     STDMETHOD(GetSpecular)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE;
  584.     STDMETHOD(GetEmissive)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE;
  585. };
  586.  
  587. #undef INTERFACE
  588. #define INTERFACE IDirect3DRMAnimation
  589.  
  590. DECLARE_INTERFACE_(IDirect3DRMAnimation, IDirect3DRMObject)
  591. {
  592.     IUNKNOWN_METHODS(PURE);
  593.     IDIRECT3DRMOBJECT_METHODS(PURE);
  594.  
  595.     /*
  596.      * IDirect3DRMAnimation methods
  597.      */
  598.     STDMETHOD(SetOptions)(THIS_ D3DRMANIMATIONOPTIONS flags) PURE;
  599.     STDMETHOD(AddRotateKey)(THIS_ D3DVALUE time, D3DRMQUATERNION *q) PURE;
  600.     STDMETHOD(AddPositionKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  601.     STDMETHOD(AddScaleKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  602.     STDMETHOD(DeleteKey)(THIS_ D3DVALUE time) PURE;
  603.     STDMETHOD(SetFrame)(THIS_ LPDIRECT3DRMFRAME frame) PURE;
  604.     STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE;
  605.  
  606.     STDMETHOD_(D3DRMANIMATIONOPTIONS, GetOptions)(THIS) PURE;
  607. };
  608.  
  609. #undef INTERFACE
  610. #define INTERFACE IDirect3DRMAnimationSet
  611.  
  612. DECLARE_INTERFACE_(IDirect3DRMAnimationSet, IDirect3DRMObject)
  613. {
  614.     IUNKNOWN_METHODS(PURE);
  615.     IDIRECT3DRMOBJECT_METHODS(PURE);
  616.  
  617.     /*
  618.      * IDirect3DRMAnimationSet methods
  619.      */
  620.     STDMETHOD(AddAnimation)(THIS_ LPDIRECT3DRMANIMATION aid) PURE;
  621.     STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg, LPDIRECT3DRMFRAME parent)PURE;
  622.     STDMETHOD(DeleteAnimation)(THIS_ LPDIRECT3DRMANIMATION aid) PURE;
  623.     STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE;
  624. };
  625.  
  626. #undef INTERFACE
  627. #define INTERFACE IDirect3DRMUserVisual
  628.  
  629. DECLARE_INTERFACE_(IDirect3DRMUserVisual, IDirect3DRMVisual)
  630. {
  631.     IUNKNOWN_METHODS(PURE);
  632.     IDIRECT3DRMOBJECT_METHODS(PURE);
  633.  
  634.     /*
  635.      * IDirect3DRMUserVisual methods
  636.      */
  637.     STDMETHOD(Init)(THIS_ D3DRMUSERVISUALCALLBACK fn, void *arg) PURE;
  638. };
  639.  
  640. #undef INTERFACE
  641. #define INTERFACE IDirect3DRMArray
  642.  
  643. DECLARE_INTERFACE_(IDirect3DRMArray, IUnknown)
  644. {
  645.     IUNKNOWN_METHODS(PURE);
  646.  
  647.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  648.     /* No GetElement method as it would get overloaded
  649.      * in derived classes, and overloading is
  650.      * a no-no in COM
  651.      */
  652. };
  653.  
  654. #undef INTERFACE
  655. #define INTERFACE IDirect3DRMDeviceArray
  656.  
  657. DECLARE_INTERFACE_(IDirect3DRMDeviceArray, IDirect3DRMArray)
  658. {
  659.     IUNKNOWN_METHODS(PURE);
  660.  
  661.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  662.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMDEVICE *) PURE;
  663. };
  664.  
  665. #undef INTERFACE
  666. #define INTERFACE IDirect3DRMFrameArray
  667.  
  668. DECLARE_INTERFACE_(IDirect3DRMFrameArray, IDirect3DRMArray)
  669. {
  670.     IUNKNOWN_METHODS(PURE);
  671.  
  672.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  673.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMFRAME *) PURE;
  674. };
  675.  
  676. #undef INTERFACE
  677. #define INTERFACE IDirect3DRMViewportArray
  678.  
  679. DECLARE_INTERFACE_(IDirect3DRMViewportArray, IDirect3DRMArray)
  680. {
  681.     IUNKNOWN_METHODS(PURE);
  682.  
  683.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  684.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMVIEWPORT *) PURE;
  685. };
  686.  
  687. #undef INTERFACE
  688. #define INTERFACE IDirect3DRMVisualArray
  689.  
  690. DECLARE_INTERFACE_(IDirect3DRMVisualArray, IDirect3DRMArray)
  691. {
  692.     IUNKNOWN_METHODS(PURE);
  693.  
  694.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  695.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMVISUAL *) PURE;
  696. };
  697.  
  698. #undef INTERFACE
  699. #define INTERFACE IDirect3DRMPickedArray
  700.  
  701. DECLARE_INTERFACE_(IDirect3DRMPickedArray, IDirect3DRMArray)
  702. {
  703.     IUNKNOWN_METHODS(PURE);
  704.  
  705.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  706.     STDMETHOD(GetPick)(THIS_ DWORD index, LPDIRECT3DRMVISUAL *, LPDIRECT3DRMFRAMEARRAY *, LPD3DRMPICKDESC) PURE;
  707. };
  708.  
  709. #undef INTERFACE
  710. #define INTERFACE IDirect3DRMLightArray
  711.  
  712. DECLARE_INTERFACE_(IDirect3DRMLightArray, IDirect3DRMArray)
  713. {
  714.     IUNKNOWN_METHODS(PURE);
  715.  
  716.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  717.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMLIGHT *) PURE;
  718. };
  719.  
  720. #undef INTERFACE
  721. #define INTERFACE IDirect3DRMFaceArray
  722.  
  723. DECLARE_INTERFACE_(IDirect3DRMFaceArray, IDirect3DRMArray)
  724. {
  725.     IUNKNOWN_METHODS(PURE);
  726.  
  727.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  728.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMFACE *) PURE;
  729. };
  730.  
  731. #ifdef __cplusplus
  732. };
  733. #endif
  734. #pragma option -b.
  735. #endif /* _D3DRMOBJ_H_ */
  736.