d3drmobj.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:77k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /*==========================================================================;
  2.  *
  3.  *  Copyright (C) 1995-1997 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File: d3drm.h
  6.  *  Content: Direct3DRM include file
  7.  *
  8.  ***************************************************************************/
  9. #ifndef _D3DRMOBJ_H_
  10. #define _D3DRMOBJ_H_
  11. #include <objbase.h> /* Use Windows header files */
  12. #define VIRTUAL
  13. #include "d3drmdef.h"
  14. #include "d3d.h"
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /*
  19.  * The methods for IUnknown
  20.  */
  21. #define IUNKNOWN_METHODS(kind) 
  22.     STDMETHOD(QueryInterface)     (THIS_ REFIID riid, LPVOID *ppvObj) kind; 
  23.     STDMETHOD_(ULONG, AddRef)     (THIS) kind; 
  24.     STDMETHOD_(ULONG, Release)     (THIS) kind
  25. /*
  26.  * The methods for IDirect3DRMObject
  27.  */
  28. #define IDIRECT3DRMOBJECT_METHODS(kind) 
  29.     STDMETHOD(Clone) (THIS_ LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj) kind; 
  30.     STDMETHOD(AddDestroyCallback)   (THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) kind; 
  31.     STDMETHOD(DeleteDestroyCallback) (THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) kind; 
  32.     STDMETHOD(SetAppData)     (THIS_ DWORD data) kind; 
  33.     STDMETHOD_(DWORD, GetAppData)   (THIS) kind; 
  34.     STDMETHOD(SetName)     (THIS_ LPCSTR) kind; 
  35.     STDMETHOD(GetName) (THIS_ LPDWORD lpdwSize, LPSTR lpName) kind; 
  36.     STDMETHOD(GetClassName) (THIS_ LPDWORD lpdwSize, LPSTR lpName) kind
  37. #define WIN_TYPES(itype, ptype) 
  38.     typedef interface itype FAR *LP##ptype, FAR **LPLP##ptype
  39. WIN_TYPES(IDirect3DRMObject, DIRECT3DRMOBJECT);
  40. WIN_TYPES(IDirect3DRMObject2, DIRECT3DRMOBJECT2);
  41. WIN_TYPES(IDirect3DRMDevice, DIRECT3DRMDEVICE);
  42. WIN_TYPES(IDirect3DRMDevice2, DIRECT3DRMDEVICE2);
  43. WIN_TYPES(IDirect3DRMDevice3, DIRECT3DRMDEVICE3);
  44. WIN_TYPES(IDirect3DRMViewport, DIRECT3DRMVIEWPORT);
  45. WIN_TYPES(IDirect3DRMViewport2, DIRECT3DRMVIEWPORT2);
  46. WIN_TYPES(IDirect3DRMFrame, DIRECT3DRMFRAME);
  47. WIN_TYPES(IDirect3DRMFrame2, DIRECT3DRMFRAME2);
  48. WIN_TYPES(IDirect3DRMFrame3, DIRECT3DRMFRAME3);
  49. WIN_TYPES(IDirect3DRMVisual, DIRECT3DRMVISUAL);
  50. WIN_TYPES(IDirect3DRMMesh, DIRECT3DRMMESH);
  51. WIN_TYPES(IDirect3DRMMeshBuilder, DIRECT3DRMMESHBUILDER);
  52. WIN_TYPES(IDirect3DRMMeshBuilder2, DIRECT3DRMMESHBUILDER2);
  53. WIN_TYPES(IDirect3DRMMeshBuilder3, DIRECT3DRMMESHBUILDER3);
  54. WIN_TYPES(IDirect3DRMFace, DIRECT3DRMFACE);
  55. WIN_TYPES(IDirect3DRMFace2, DIRECT3DRMFACE2);
  56. WIN_TYPES(IDirect3DRMLight, DIRECT3DRMLIGHT);
  57. WIN_TYPES(IDirect3DRMTexture, DIRECT3DRMTEXTURE);
  58. WIN_TYPES(IDirect3DRMTexture2, DIRECT3DRMTEXTURE2);
  59. WIN_TYPES(IDirect3DRMTexture3, DIRECT3DRMTEXTURE3);
  60. WIN_TYPES(IDirect3DRMWrap, DIRECT3DRMWRAP);
  61. WIN_TYPES(IDirect3DRMMaterial, DIRECT3DRMMATERIAL);
  62. WIN_TYPES(IDirect3DRMMaterial2, DIRECT3DRMMATERIAL2);
  63. WIN_TYPES(IDirect3DRMInterpolator, DIRECT3DRMINTERPOLATOR);
  64. WIN_TYPES(IDirect3DRMAnimation, DIRECT3DRMANIMATION);
  65. WIN_TYPES(IDirect3DRMAnimation2, DIRECT3DRMANIMATION2);
  66. WIN_TYPES(IDirect3DRMAnimationSet, DIRECT3DRMANIMATIONSET);
  67. WIN_TYPES(IDirect3DRMAnimationSet2, DIRECT3DRMANIMATIONSET2);
  68. WIN_TYPES(IDirect3DRMUserVisual, DIRECT3DRMUSERVISUAL);
  69. WIN_TYPES(IDirect3DRMShadow, DIRECT3DRMSHADOW);
  70. WIN_TYPES(IDirect3DRMShadow2, DIRECT3DRMSHADOW2);
  71. WIN_TYPES(IDirect3DRMArray, DIRECT3DRMARRAY);
  72. WIN_TYPES(IDirect3DRMObjectArray, DIRECT3DRMOBJECTARRAY);
  73. WIN_TYPES(IDirect3DRMDeviceArray, DIRECT3DRMDEVICEARRAY);
  74. WIN_TYPES(IDirect3DRMFaceArray, DIRECT3DRMFACEARRAY);
  75. WIN_TYPES(IDirect3DRMViewportArray, DIRECT3DRMVIEWPORTARRAY);
  76. WIN_TYPES(IDirect3DRMFrameArray, DIRECT3DRMFRAMEARRAY);
  77. WIN_TYPES(IDirect3DRMAnimationArray, DIRECT3DRMANIMATIONARRAY);
  78. WIN_TYPES(IDirect3DRMVisualArray, DIRECT3DRMVISUALARRAY);
  79. WIN_TYPES(IDirect3DRMPickedArray, DIRECT3DRMPICKEDARRAY);
  80. WIN_TYPES(IDirect3DRMPicked2Array, DIRECT3DRMPICKED2ARRAY);
  81. WIN_TYPES(IDirect3DRMLightArray, DIRECT3DRMLIGHTARRAY);
  82. WIN_TYPES(IDirect3DRMProgressiveMesh, DIRECT3DRMPROGRESSIVEMESH);
  83. WIN_TYPES(IDirect3DRMClippedVisual, DIRECT3DRMCLIPPEDVISUAL);
  84. /*
  85.  * Direct3DRM Object classes
  86.  */
  87. DEFINE_GUID(CLSID_CDirect3DRMDevice,     0x4fa3568e, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  88. DEFINE_GUID(CLSID_CDirect3DRMViewport,     0x4fa3568f, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  89. DEFINE_GUID(CLSID_CDirect3DRMFrame,     0x4fa35690, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  90. DEFINE_GUID(CLSID_CDirect3DRMMesh,     0x4fa35691, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  91. DEFINE_GUID(CLSID_CDirect3DRMMeshBuilder,   0x4fa35692, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  92. DEFINE_GUID(CLSID_CDirect3DRMFace,     0x4fa35693, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  93. DEFINE_GUID(CLSID_CDirect3DRMLight,     0x4fa35694, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  94. DEFINE_GUID(CLSID_CDirect3DRMTexture,     0x4fa35695, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  95. DEFINE_GUID(CLSID_CDirect3DRMWrap,     0x4fa35696, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  96. DEFINE_GUID(CLSID_CDirect3DRMMaterial,     0x4fa35697, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  97. DEFINE_GUID(CLSID_CDirect3DRMAnimation,     0x4fa35698, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  98. DEFINE_GUID(CLSID_CDirect3DRMAnimationSet,  0x4fa35699, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  99. DEFINE_GUID(CLSID_CDirect3DRMUserVisual,    0x4fa3569a, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  100. DEFINE_GUID(CLSID_CDirect3DRMShadow,     0x4fa3569b, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  101. DEFINE_GUID(CLSID_CDirect3DRMViewportInterpolator, 
  102. 0xde9eaa1, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3);
  103. DEFINE_GUID(CLSID_CDirect3DRMFrameInterpolator, 
  104. 0xde9eaa2, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3);
  105. DEFINE_GUID(CLSID_CDirect3DRMMeshInterpolator, 
  106. 0xde9eaa3, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3);
  107. DEFINE_GUID(CLSID_CDirect3DRMLightInterpolator, 
  108. 0xde9eaa6, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3);
  109. DEFINE_GUID(CLSID_CDirect3DRMMaterialInterpolator, 
  110. 0xde9eaa7, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3);
  111. DEFINE_GUID(CLSID_CDirect3DRMTextureInterpolator, 
  112. 0xde9eaa8, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3);
  113. DEFINE_GUID(CLSID_CDirect3DRMProgressiveMesh, 0x4516ec40, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
  114. DEFINE_GUID(CLSID_CDirect3DRMClippedVisual,   0x5434e72d, 0x6d66, 0x11d1, 0xbb, 0xb, 0x0, 0x0, 0xf8, 0x75, 0x86, 0x5a);
  115. /*
  116.  * Direct3DRM Object interfaces
  117.  */
  118. DEFINE_GUID(IID_IDirect3DRMObject,      0xeb16cb00, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  119. DEFINE_GUID(IID_IDirect3DRMObject2,         0x4516ec7c, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
  120. DEFINE_GUID(IID_IDirect3DRMDevice,      0xe9e19280, 0x6e05, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  121. DEFINE_GUID(IID_IDirect3DRMDevice2,     0x4516ec78, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
  122. DEFINE_GUID(IID_IDirect3DRMDevice3,     0x549f498b, 0xbfeb, 0x11d1, 0x8e, 0xd8, 0x0, 0xa0, 0xc9, 0x67, 0xa4, 0x82);
  123. DEFINE_GUID(IID_IDirect3DRMViewport,      0xeb16cb02, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  124. DEFINE_GUID(IID_IDirect3DRMViewport2,   0x4a1b1be6, 0xbfed, 0x11d1, 0x8e, 0xd8, 0x0, 0xa0, 0xc9, 0x67, 0xa4, 0x82);
  125. DEFINE_GUID(IID_IDirect3DRMFrame,      0xeb16cb03, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  126. DEFINE_GUID(IID_IDirect3DRMFrame2,     0xc3dfbd60, 0x3988, 0x11d0, 0x9e, 0xc2, 0x0, 0x0, 0xc0, 0x29, 0x1a, 0xc3);
  127. DEFINE_GUID(IID_IDirect3DRMFrame3,              0xff6b7f70, 0xa40e, 0x11d1, 0x91, 0xf9, 0x0, 0x0, 0xf8, 0x75, 0x8e, 0x66);
  128. DEFINE_GUID(IID_IDirect3DRMVisual,      0xeb16cb04, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  129. DEFINE_GUID(IID_IDirect3DRMMesh,      0xa3a80d01, 0x6e12, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  130. DEFINE_GUID(IID_IDirect3DRMMeshBuilder,     0xa3a80d02, 0x6e12, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  131. DEFINE_GUID(IID_IDirect3DRMMeshBuilder2,    0x4516ec77, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3);
  132. DEFINE_GUID(IID_IDirect3DRMMeshBuilder3,    0x4516ec82, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
  133. DEFINE_GUID(IID_IDirect3DRMFace,      0xeb16cb07, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  134. DEFINE_GUID(IID_IDirect3DRMFace2,           0x4516ec81, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3);
  135. DEFINE_GUID(IID_IDirect3DRMLight,      0xeb16cb08, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  136. DEFINE_GUID(IID_IDirect3DRMTexture,      0xeb16cb09, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  137. DEFINE_GUID(IID_IDirect3DRMTexture2,        0x120f30c0, 0x1629, 0x11d0, 0x94, 0x1c, 0x0, 0x80, 0xc8, 0xc, 0xfa, 0x7b);
  138. DEFINE_GUID(IID_IDirect3DRMTexture3,        0xff6b7f73, 0xa40e, 0x11d1, 0x91, 0xf9, 0x0, 0x0, 0xf8, 0x75, 0x8e, 0x66);
  139. DEFINE_GUID(IID_IDirect3DRMWrap,      0xeb16cb0a, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  140. DEFINE_GUID(IID_IDirect3DRMMaterial,      0xeb16cb0b, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  141. DEFINE_GUID(IID_IDirect3DRMMaterial2,       0xff6b7f75, 0xa40e, 0x11d1, 0x91, 0xf9, 0x0, 0x0, 0xf8, 0x75, 0x8e, 0x66);
  142. DEFINE_GUID(IID_IDirect3DRMAnimation,      0xeb16cb0d, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  143. DEFINE_GUID(IID_IDirect3DRMAnimation2,      0xff6b7f77, 0xa40e, 0x11d1, 0x91, 0xf9, 0x0, 0x0, 0xf8, 0x75, 0x8e, 0x66);
  144. DEFINE_GUID(IID_IDirect3DRMAnimationSet,    0xeb16cb0e, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  145. DEFINE_GUID(IID_IDirect3DRMAnimationSet2,   0xff6b7f79, 0xa40e, 0x11d1, 0x91, 0xf9, 0x0, 0x0, 0xf8, 0x75, 0x8e, 0x66);
  146. DEFINE_GUID(IID_IDirect3DRMObjectArray,     0x242f6bc2, 0x3849, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3);
  147. DEFINE_GUID(IID_IDirect3DRMDeviceArray,     0xeb16cb10, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  148. DEFINE_GUID(IID_IDirect3DRMViewportArray,   0xeb16cb11, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  149. DEFINE_GUID(IID_IDirect3DRMFrameArray,      0xeb16cb12, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  150. DEFINE_GUID(IID_IDirect3DRMVisualArray,     0xeb16cb13, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  151. DEFINE_GUID(IID_IDirect3DRMLightArray,      0xeb16cb14, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  152. DEFINE_GUID(IID_IDirect3DRMPickedArray,     0xeb16cb16, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  153. DEFINE_GUID(IID_IDirect3DRMFaceArray,     0xeb16cb17, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  154. DEFINE_GUID(IID_IDirect3DRMAnimationArray, 
  155. 0xd5f1cae0, 0x4bd7, 0x11d1, 0xb9, 0x74, 0x0, 0x60, 0x8, 0x3e, 0x45, 0xf3);
  156. DEFINE_GUID(IID_IDirect3DRMUserVisual,     0x59163de0, 0x6d43, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  157. DEFINE_GUID(IID_IDirect3DRMShadow,     0xaf359780, 0x6ba3, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1);
  158. DEFINE_GUID(IID_IDirect3DRMShadow2,     0x86b44e25, 0x9c82, 0x11d1, 0xbb, 0xb, 0x0, 0xa0, 0xc9, 0x81, 0xa0, 0xa6);
  159. DEFINE_GUID(IID_IDirect3DRMInterpolator,    0x242f6bc1, 0x3849, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3);
  160. DEFINE_GUID(IID_IDirect3DRMProgressiveMesh, 0x4516ec79, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3);
  161. DEFINE_GUID(IID_IDirect3DRMPicked2Array,    0x4516ec7b, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3);
  162. DEFINE_GUID(IID_IDirect3DRMClippedVisual,   0x5434e733, 0x6d66, 0x11d1, 0xbb, 0xb, 0x0, 0x0, 0xf8, 0x75, 0x86, 0x5a);
  163. typedef void (__cdecl *D3DRMOBJECTCALLBACK)(LPDIRECT3DRMOBJECT obj, LPVOID arg);
  164. typedef void (__cdecl *D3DRMFRAMEMOVECALLBACK)(LPDIRECT3DRMFRAME obj, LPVOID arg, D3DVALUE delta);
  165. typedef void (__cdecl *D3DRMFRAME3MOVECALLBACK)(LPDIRECT3DRMFRAME3 obj, LPVOID arg, D3DVALUE delta);
  166. typedef void (__cdecl *D3DRMUPDATECALLBACK)(LPDIRECT3DRMDEVICE obj, LPVOID arg, int, LPD3DRECT);
  167. typedef void (__cdecl *D3DRMDEVICE3UPDATECALLBACK)(LPDIRECT3DRMDEVICE3 obj, LPVOID arg, int, LPD3DRECT);
  168. typedef int (__cdecl *D3DRMUSERVISUALCALLBACK)
  169.     (   LPDIRECT3DRMUSERVISUAL obj, LPVOID arg, D3DRMUSERVISUALREASON reason,
  170.         LPDIRECT3DRMDEVICE dev, LPDIRECT3DRMVIEWPORT view
  171.     );
  172. typedef HRESULT (__cdecl *D3DRMLOADTEXTURECALLBACK)
  173.     (char *tex_name, void *arg, LPDIRECT3DRMTEXTURE *);
  174. typedef HRESULT (__cdecl *D3DRMLOADTEXTURE3CALLBACK)
  175.     (char *tex_name, void *arg, LPDIRECT3DRMTEXTURE3 *);
  176. typedef void (__cdecl *D3DRMLOADCALLBACK)
  177.     (LPDIRECT3DRMOBJECT object, REFIID objectguid, LPVOID arg);
  178. typedef HRESULT (__cdecl *D3DRMDOWNSAMPLECALLBACK)
  179.     (LPDIRECT3DRMTEXTURE3 lpDirect3DRMTexture, LPVOID pArg,
  180.      LPDIRECTDRAWSURFACE pDDSSrc, LPDIRECTDRAWSURFACE pDDSDst);
  181. typedef HRESULT (__cdecl *D3DRMVALIDATIONCALLBACK)
  182.     (LPDIRECT3DRMTEXTURE3 lpDirect3DRMTexture, LPVOID pArg,
  183.      DWORD dwFlags, DWORD dwcRects, LPRECT pRects);
  184. typedef struct _D3DRMPICKDESC
  185. {
  186.     ULONG ulFaceIdx;
  187.     LONG lGroupIdx;
  188.     D3DVECTOR vPosition;
  189. } D3DRMPICKDESC, *LPD3DRMPICKDESC;
  190. typedef struct _D3DRMPICKDESC2
  191. {
  192.     ULONG ulFaceIdx;
  193.     LONG lGroupIdx;
  194.     D3DVECTOR dvPosition;
  195.     D3DVALUE tu;
  196.     D3DVALUE tv;
  197.     D3DVECTOR dvNormal;
  198.     D3DCOLOR dcColor;
  199. } D3DRMPICKDESC2, *LPD3DRMPICKDESC2;
  200. #undef INTERFACE
  201. #define INTERFACE IDirect3DRMObject
  202. /*
  203.  * Base class
  204.  */
  205. DECLARE_INTERFACE_(IDirect3DRMObject, IUnknown)
  206. {
  207.     IUNKNOWN_METHODS(PURE);
  208.     IDIRECT3DRMOBJECT_METHODS(PURE);
  209. };
  210. #undef INTERFACE
  211. #define INTERFACE IDirect3DRMObject2
  212. DECLARE_INTERFACE_(IDirect3DRMObject2, IUnknown)
  213. {
  214.     IUNKNOWN_METHODS(PURE);
  215.     /*
  216.      * IDirect3DRMObject2 methods
  217.      */
  218.     STDMETHOD(AddDestroyCallback)(THIS_ D3DRMOBJECTCALLBACK lpFunc, LPVOID pvArg) PURE;
  219.     STDMETHOD(Clone)(THIS_ LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj) PURE; 
  220.     STDMETHOD(DeleteDestroyCallback)(THIS_ D3DRMOBJECTCALLBACK lpFunc, LPVOID pvArg) PURE; 
  221.     STDMETHOD(GetClientData)(THIS_ DWORD dwID, LPVOID* lplpvData) PURE;
  222.     STDMETHOD(GetDirect3DRM)(THIS_ LPDIRECT3DRM* lplpDirect3DRM) PURE;
  223.     STDMETHOD(GetName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE;
  224.     STDMETHOD(SetClientData)(THIS_ DWORD dwID, LPVOID lpvData, DWORD dwFlags) PURE;
  225.     STDMETHOD(SetName)(THIS_ LPCSTR lpName) PURE;
  226.     STDMETHOD(GetAge)(THIS_ DWORD dwFlags, LPDWORD pdwAge) PURE;
  227. };
  228. #undef INTERFACE
  229. #define INTERFACE IDirect3DRMVisual
  230. DECLARE_INTERFACE_(IDirect3DRMVisual, IDirect3DRMObject)
  231. {
  232.     IUNKNOWN_METHODS(PURE);
  233.     IDIRECT3DRMOBJECT_METHODS(PURE);
  234. };
  235. #undef INTERFACE
  236. #define INTERFACE IDirect3DRMDevice
  237. DECLARE_INTERFACE_(IDirect3DRMDevice, IDirect3DRMObject)
  238. {
  239.     IUNKNOWN_METHODS(PURE);
  240.     IDIRECT3DRMOBJECT_METHODS(PURE);
  241.     /*
  242.      * IDirect3DRMDevice methods
  243.      */
  244.     STDMETHOD(Init)(THIS_ ULONG width, ULONG height) PURE;
  245.     STDMETHOD(InitFromD3D)(THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev) PURE;
  246.     STDMETHOD(InitFromClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID, int width, int height) PURE;
  247.     STDMETHOD(Update)(THIS) PURE;
  248.     STDMETHOD(AddUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE;
  249.     STDMETHOD(DeleteUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE;
  250.     STDMETHOD(SetBufferCount)(THIS_ DWORD) PURE;
  251.     STDMETHOD_(DWORD, GetBufferCount)(THIS) PURE;
  252.     STDMETHOD(SetDither)(THIS_ BOOL) PURE;
  253.     STDMETHOD(SetShades)(THIS_ DWORD) PURE;
  254.     STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE;
  255.     STDMETHOD(SetTextureQuality)(THIS_ D3DRMTEXTUREQUALITY) PURE;
  256.     STDMETHOD(GetViewports)(THIS_ LPDIRECT3DRMVIEWPORTARRAY *return_views) PURE;
  257.     STDMETHOD_(BOOL, GetDither)(THIS) PURE;
  258.     STDMETHOD_(DWORD, GetShades)(THIS) PURE;
  259.     STDMETHOD_(DWORD, GetHeight)(THIS) PURE;
  260.     STDMETHOD_(DWORD, GetWidth)(THIS) PURE;
  261.     STDMETHOD_(DWORD, GetTrianglesDrawn)(THIS) PURE;
  262.     STDMETHOD_(DWORD, GetWireframeOptions)(THIS) PURE;
  263.     STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE;
  264.     STDMETHOD_(D3DCOLORMODEL, GetColorModel)(THIS) PURE;
  265.     STDMETHOD_(D3DRMTEXTUREQUALITY, GetTextureQuality)(THIS) PURE;
  266.     STDMETHOD(GetDirect3DDevice)(THIS_ LPDIRECT3DDEVICE *) PURE;
  267. };
  268. #undef INTERFACE
  269. #define INTERFACE IDirect3DRMDevice2
  270. DECLARE_INTERFACE_(IDirect3DRMDevice2, IDirect3DRMDevice)
  271. {
  272.     IUNKNOWN_METHODS(PURE);
  273.     IDIRECT3DRMOBJECT_METHODS(PURE);
  274.     /*
  275.      * IDirect3DRMDevice methods
  276.      */
  277.     STDMETHOD(Init)(THIS_ ULONG width, ULONG height) PURE;
  278.     STDMETHOD(InitFromD3D)(THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev) PURE;
  279.     STDMETHOD(InitFromClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID, int width, int height) PURE;
  280.     STDMETHOD(Update)(THIS) PURE;
  281.     STDMETHOD(AddUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE;
  282.     STDMETHOD(DeleteUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE;
  283.     STDMETHOD(SetBufferCount)(THIS_ DWORD) PURE;
  284.     STDMETHOD_(DWORD, GetBufferCount)(THIS) PURE;
  285.     STDMETHOD(SetDither)(THIS_ BOOL) PURE;
  286.     STDMETHOD(SetShades)(THIS_ DWORD) PURE;
  287.     STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE;
  288.     STDMETHOD(SetTextureQuality)(THIS_ D3DRMTEXTUREQUALITY) PURE;
  289.     STDMETHOD(GetViewports)(THIS_ LPDIRECT3DRMVIEWPORTARRAY *return_views) PURE;
  290.     STDMETHOD_(BOOL, GetDither)(THIS) PURE;
  291.     STDMETHOD_(DWORD, GetShades)(THIS) PURE;
  292.     STDMETHOD_(DWORD, GetHeight)(THIS) PURE;
  293.     STDMETHOD_(DWORD, GetWidth)(THIS) PURE;
  294.     STDMETHOD_(DWORD, GetTrianglesDrawn)(THIS) PURE;
  295.     STDMETHOD_(DWORD, GetWireframeOptions)(THIS) PURE;
  296.     STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE;
  297.     STDMETHOD_(D3DCOLORMODEL, GetColorModel)(THIS) PURE;
  298.     STDMETHOD_(D3DRMTEXTUREQUALITY, GetTextureQuality)(THIS) PURE;
  299.     STDMETHOD(GetDirect3DDevice)(THIS_ LPDIRECT3DDEVICE *) PURE;
  300.     /*
  301.      * IDirect3DRMDevice2 methods
  302.      */
  303.     STDMETHOD(InitFromD3D2)(THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev) PURE;
  304.     STDMETHOD(InitFromSurface)(THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD, LPDIRECTDRAWSURFACE lpDDSBack) PURE;
  305.     STDMETHOD(SetRenderMode)(THIS_ DWORD dwFlags) PURE;
  306.     STDMETHOD_(DWORD, GetRenderMode)(THIS) PURE;
  307.     STDMETHOD(GetDirect3DDevice2)(THIS_ LPDIRECT3DDEVICE2 *) PURE;
  308. };
  309. #undef INTERFACE
  310. #define INTERFACE IDirect3DRMDevice3
  311. DECLARE_INTERFACE_(IDirect3DRMDevice3, IDirect3DRMObject)
  312. {
  313.     IUNKNOWN_METHODS(PURE);
  314.     IDIRECT3DRMOBJECT_METHODS(PURE);
  315.     /*
  316.      * IDirect3DRMDevice methods
  317.      */
  318.     STDMETHOD(Init)(THIS_ ULONG width, ULONG height) PURE;
  319.     STDMETHOD(InitFromD3D)(THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev) PURE;
  320.     STDMETHOD(InitFromClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID, int width, int height) PURE;
  321.     STDMETHOD(Update)(THIS) PURE;
  322.     STDMETHOD(AddUpdateCallback)(THIS_ D3DRMDEVICE3UPDATECALLBACK, LPVOID arg) PURE;
  323.     STDMETHOD(DeleteUpdateCallback)(THIS_ D3DRMDEVICE3UPDATECALLBACK, LPVOID arg) PURE;
  324.     STDMETHOD(SetBufferCount)(THIS_ DWORD) PURE;
  325.     STDMETHOD_(DWORD, GetBufferCount)(THIS) PURE;
  326.     STDMETHOD(SetDither)(THIS_ BOOL) PURE;
  327.     STDMETHOD(SetShades)(THIS_ DWORD) PURE;
  328.     STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE;
  329.     STDMETHOD(SetTextureQuality)(THIS_ D3DRMTEXTUREQUALITY) PURE;
  330.     STDMETHOD(GetViewports)(THIS_ LPDIRECT3DRMVIEWPORTARRAY *return_views) PURE;
  331.     STDMETHOD_(BOOL, GetDither)(THIS) PURE;
  332.     STDMETHOD_(DWORD, GetShades)(THIS) PURE;
  333.     STDMETHOD_(DWORD, GetHeight)(THIS) PURE;
  334.     STDMETHOD_(DWORD, GetWidth)(THIS) PURE;
  335.     STDMETHOD_(DWORD, GetTrianglesDrawn)(THIS) PURE;
  336.     STDMETHOD_(DWORD, GetWireframeOptions)(THIS) PURE;
  337.     STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE;
  338.     STDMETHOD_(D3DCOLORMODEL, GetColorModel)(THIS) PURE;
  339.     STDMETHOD_(D3DRMTEXTUREQUALITY, GetTextureQuality)(THIS) PURE;
  340.     STDMETHOD(GetDirect3DDevice)(THIS_ LPDIRECT3DDEVICE *) PURE;
  341.     /*
  342.      * IDirect3DRMDevice2 methods
  343.      */
  344.     STDMETHOD(InitFromD3D2)(THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev) PURE;
  345.     STDMETHOD(InitFromSurface)(THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD, LPDIRECTDRAWSURFACE lpDDSBack, DWORD dwFlags) PURE;
  346.     STDMETHOD(SetRenderMode)(THIS_ DWORD dwFlags) PURE;
  347.     STDMETHOD_(DWORD, GetRenderMode)(THIS) PURE;
  348.     STDMETHOD(GetDirect3DDevice2)(THIS_ LPDIRECT3DDEVICE2 *) PURE;
  349.     /*
  350.      * IDirect3DRMDevice3 methods
  351.      */
  352.     STDMETHOD(FindPreferredTextureFormat)(THIS_ DWORD dwBitDepths, DWORD dwFlags, LPDDPIXELFORMAT lpDDPF) PURE;
  353.     STDMETHOD(RenderStateChange)(THIS_ D3DRENDERSTATETYPE drsType, DWORD dwVal, DWORD dwFlags) PURE;
  354.     STDMETHOD(LightStateChange)(THIS_ D3DLIGHTSTATETYPE drsType, DWORD dwVal, DWORD dwFlags) PURE;
  355.     STDMETHOD(GetStateChangeOptions)(THIS_ DWORD dwStateClass, DWORD dwStateNum, LPDWORD pdwFlags) PURE;
  356.     STDMETHOD(SetStateChangeOptions)(THIS_ DWORD dwStateClass, DWORD dwStateNum, DWORD dwFlags) PURE;
  357. };
  358. #undef INTERFACE
  359. #define INTERFACE IDirect3DRMViewport
  360. DECLARE_INTERFACE_(IDirect3DRMViewport, IDirect3DRMObject)
  361. {
  362.     IUNKNOWN_METHODS(PURE);
  363.     IDIRECT3DRMOBJECT_METHODS(PURE);
  364.     /*
  365.      * IDirect3DRMViewport methods
  366.      */
  367.     STDMETHOD(Init)
  368.     ( THIS_ LPDIRECT3DRMDEVICE dev, LPDIRECT3DRMFRAME camera,
  369. DWORD xpos, DWORD ypos, DWORD width, DWORD height
  370.     ) PURE;
  371.     STDMETHOD(Clear)(THIS) PURE;
  372.     STDMETHOD(Render)(THIS_ LPDIRECT3DRMFRAME) PURE;
  373.     STDMETHOD(SetFront)(THIS_ D3DVALUE) PURE;
  374.     STDMETHOD(SetBack)(THIS_ D3DVALUE) PURE;
  375.     STDMETHOD(SetField)(THIS_ D3DVALUE) PURE;
  376.     STDMETHOD(SetUniformScaling)(THIS_ BOOL) PURE;
  377.     STDMETHOD(SetCamera)(THIS_ LPDIRECT3DRMFRAME) PURE;
  378.     STDMETHOD(SetProjection)(THIS_ D3DRMPROJECTIONTYPE) PURE;
  379.     STDMETHOD(Transform)(THIS_ D3DRMVECTOR4D *d, D3DVECTOR *s) PURE;
  380.     STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DRMVECTOR4D *s) PURE;
  381.     STDMETHOD(Configure)(THIS_ LONG x, LONG y, DWORD width, DWORD height) PURE;
  382.     STDMETHOD(ForceUpdate)(THIS_ DWORD x1, DWORD y1, DWORD x2, DWORD y2) PURE;
  383.     STDMETHOD(SetPlane)(THIS_ D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top) PURE;
  384.     STDMETHOD(GetCamera)(THIS_ LPDIRECT3DRMFRAME *) PURE;
  385.     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DRMDEVICE *) PURE;
  386.     STDMETHOD(GetPlane)(THIS_ D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top) PURE;
  387.     STDMETHOD(Pick)(THIS_ LONG x, LONG y, LPDIRECT3DRMPICKEDARRAY *return_visuals) PURE;
  388.     STDMETHOD_(BOOL, GetUniformScaling)(THIS) PURE;
  389.     STDMETHOD_(LONG, GetX)(THIS) PURE;
  390.     STDMETHOD_(LONG, GetY)(THIS) PURE;
  391.     STDMETHOD_(DWORD, GetWidth)(THIS) PURE;
  392.     STDMETHOD_(DWORD, GetHeight)(THIS) PURE;
  393.     STDMETHOD_(D3DVALUE, GetField)(THIS) PURE;
  394.     STDMETHOD_(D3DVALUE, GetBack)(THIS) PURE;
  395.     STDMETHOD_(D3DVALUE, GetFront)(THIS) PURE;
  396.     STDMETHOD_(D3DRMPROJECTIONTYPE, GetProjection)(THIS) PURE;
  397.     STDMETHOD(GetDirect3DViewport)(THIS_ LPDIRECT3DVIEWPORT *) PURE;
  398. };
  399. #undef INTERFACE
  400. #define INTERFACE IDirect3DRMViewport2
  401. DECLARE_INTERFACE_(IDirect3DRMViewport2, IDirect3DRMObject)
  402. {
  403.     IUNKNOWN_METHODS(PURE);
  404.     IDIRECT3DRMOBJECT_METHODS(PURE);
  405.     /*
  406.      * IDirect3DRMViewport2 methods
  407.      */
  408.     STDMETHOD(Init)
  409.     ( THIS_ LPDIRECT3DRMDEVICE3 dev, LPDIRECT3DRMFRAME3 camera,
  410. DWORD xpos, DWORD ypos, DWORD width, DWORD height
  411.     ) PURE;
  412.     STDMETHOD(Clear)(THIS_ DWORD dwFlags) PURE;
  413.     STDMETHOD(Render)(THIS_ LPDIRECT3DRMFRAME3) PURE;
  414.     STDMETHOD(SetFront)(THIS_ D3DVALUE) PURE;
  415.     STDMETHOD(SetBack)(THIS_ D3DVALUE) PURE;
  416.     STDMETHOD(SetField)(THIS_ D3DVALUE) PURE;
  417.     STDMETHOD(SetUniformScaling)(THIS_ BOOL) PURE;
  418.     STDMETHOD(SetCamera)(THIS_ LPDIRECT3DRMFRAME3) PURE;
  419.     STDMETHOD(SetProjection)(THIS_ D3DRMPROJECTIONTYPE) PURE;
  420.     STDMETHOD(Transform)(THIS_ D3DRMVECTOR4D *d, D3DVECTOR *s) PURE;
  421.     STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DRMVECTOR4D *s) PURE;
  422.     STDMETHOD(Configure)(THIS_ LONG x, LONG y, DWORD width, DWORD height) PURE;
  423.     STDMETHOD(ForceUpdate)(THIS_ DWORD x1, DWORD y1, DWORD x2, DWORD y2) PURE;
  424.     STDMETHOD(SetPlane)(THIS_ D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top) PURE;
  425.     STDMETHOD(GetCamera)(THIS_ LPDIRECT3DRMFRAME3 *) PURE;
  426.     STDMETHOD(GetDevice)(THIS_ LPDIRECT3DRMDEVICE3 *) PURE;
  427.     STDMETHOD(GetPlane)(THIS_ D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top) PURE;
  428.     STDMETHOD(Pick)(THIS_ LONG x, LONG y, LPDIRECT3DRMPICKEDARRAY *return_visuals) PURE;
  429.     STDMETHOD_(BOOL, GetUniformScaling)(THIS) PURE;
  430.     STDMETHOD_(LONG, GetX)(THIS) PURE;
  431.     STDMETHOD_(LONG, GetY)(THIS) PURE;
  432.     STDMETHOD_(DWORD, GetWidth)(THIS) PURE;
  433.     STDMETHOD_(DWORD, GetHeight)(THIS) PURE;
  434.     STDMETHOD_(D3DVALUE, GetField)(THIS) PURE;
  435.     STDMETHOD_(D3DVALUE, GetBack)(THIS) PURE;
  436.     STDMETHOD_(D3DVALUE, GetFront)(THIS) PURE;
  437.     STDMETHOD_(D3DRMPROJECTIONTYPE, GetProjection)(THIS) PURE;
  438.     STDMETHOD(GetDirect3DViewport)(THIS_ LPDIRECT3DVIEWPORT *) PURE;
  439.     STDMETHOD(TransformVectors)(THIS_ DWORD dwNumVectors,
  440. LPD3DRMVECTOR4D lpDstVectors,
  441. LPD3DVECTOR lpSrcVectors) PURE;
  442.     STDMETHOD(InverseTransformVectors)(THIS_ DWORD dwNumVectors,
  443.        LPD3DVECTOR lpDstVectors,
  444.        LPD3DRMVECTOR4D lpSrcVectors) PURE;
  445. };
  446. #undef INTERFACE
  447. #define INTERFACE IDirect3DRMFrame
  448. DECLARE_INTERFACE_(IDirect3DRMFrame, IDirect3DRMVisual)
  449. {
  450.     IUNKNOWN_METHODS(PURE);
  451.     IDIRECT3DRMOBJECT_METHODS(PURE);
  452.     /*
  453.      * IDirect3DRMFrame methods
  454.      */
  455.     STDMETHOD(AddChild)(THIS_ LPDIRECT3DRMFRAME child) PURE;
  456.     STDMETHOD(AddLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
  457.     STDMETHOD(AddMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
  458.     STDMETHOD(AddTransform)(THIS_ D3DRMCOMBINETYPE, D3DRMMATRIX4D) PURE;
  459.     STDMETHOD(AddTranslation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  460.     STDMETHOD(AddScale)(THIS_ D3DRMCOMBINETYPE, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
  461.     STDMETHOD(AddRotation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE;
  462.     STDMETHOD(AddVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE;
  463.     STDMETHOD(GetChildren)(THIS_ LPDIRECT3DRMFRAMEARRAY *children) PURE;
  464.     STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
  465.     STDMETHOD(GetLights)(THIS_ LPDIRECT3DRMLIGHTARRAY *lights) PURE;
  466.     STDMETHOD_(D3DRMMATERIALMODE, GetMaterialMode)(THIS) PURE;
  467.     STDMETHOD(GetParent)(THIS_ LPDIRECT3DRMFRAME *) PURE;
  468.     STDMETHOD(GetPosition)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_position) PURE;
  469.     STDMETHOD(GetRotation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR axis, LPD3DVALUE return_theta) PURE;
  470.     STDMETHOD(GetScene)(THIS_ LPDIRECT3DRMFRAME *) PURE;
  471.     STDMETHOD_(D3DRMSORTMODE, GetSortMode)(THIS) PURE;
  472.     STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE *) PURE;
  473.     STDMETHOD(GetTransform)(THIS_ D3DRMMATRIX4D return_matrix) PURE;
  474.     STDMETHOD(GetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_velocity, BOOL with_rotation) PURE;
  475.     STDMETHOD(GetOrientation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR dir, LPD3DVECTOR up) PURE;
  476.     STDMETHOD(GetVisuals)(THIS_ LPDIRECT3DRMVISUALARRAY *visuals) PURE;
  477.     STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE;
  478.     STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE;
  479.     STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg)PURE;
  480.     STDMETHOD(LookAt)(THIS_ LPDIRECT3DRMFRAME target, LPDIRECT3DRMFRAME reference, D3DRMFRAMECONSTRAINT) PURE;
  481.     STDMETHOD(Move)(THIS_ D3DVALUE delta) PURE;
  482.     STDMETHOD(DeleteChild)(THIS_ LPDIRECT3DRMFRAME) PURE;
  483.     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
  484.     STDMETHOD(DeleteMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
  485.     STDMETHOD(DeleteVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE;
  486.     STDMETHOD_(D3DCOLOR, GetSceneBackground)(THIS) PURE;
  487.     STDMETHOD(GetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *) PURE;
  488.     STDMETHOD_(D3DCOLOR, GetSceneFogColor)(THIS) PURE;
  489.     STDMETHOD_(BOOL, GetSceneFogEnable)(THIS) PURE;
  490.     STDMETHOD_(D3DRMFOGMODE, GetSceneFogMode)(THIS) PURE;
  491.     STDMETHOD(GetSceneFogParams)(THIS_ D3DVALUE *return_start, D3DVALUE *return_end, D3DVALUE *return_density) PURE;
  492.     STDMETHOD(SetSceneBackground)(THIS_ D3DCOLOR) PURE;
  493.     STDMETHOD(SetSceneBackgroundRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  494.     STDMETHOD(SetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  495.     STDMETHOD(SetSceneBackgroundImage)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
  496.     STDMETHOD(SetSceneFogEnable)(THIS_ BOOL) PURE;
  497.     STDMETHOD(SetSceneFogColor)(THIS_ D3DCOLOR) PURE;
  498.     STDMETHOD(SetSceneFogMode)(THIS_ D3DRMFOGMODE) PURE;
  499.     STDMETHOD(SetSceneFogParams)(THIS_ D3DVALUE start, D3DVALUE end, D3DVALUE density) PURE;
  500.     STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  501.     STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  502.     STDMETHOD_(D3DRMZBUFFERMODE, GetZbufferMode)(THIS) PURE;
  503.     STDMETHOD(SetMaterialMode)(THIS_ D3DRMMATERIALMODE) PURE;
  504.     STDMETHOD(SetOrientation)
  505.     ( THIS_ LPDIRECT3DRMFRAME reference,
  506. D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  507. D3DVALUE ux, D3DVALUE uy, D3DVALUE uz
  508.     ) PURE;
  509.     STDMETHOD(SetPosition)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  510.     STDMETHOD(SetRotation)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE;
  511.     STDMETHOD(SetSortMode)(THIS_ D3DRMSORTMODE) PURE;
  512.     STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
  513.     STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
  514.     STDMETHOD(SetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation) PURE;
  515.     STDMETHOD(SetZbufferMode)(THIS_ D3DRMZBUFFERMODE) PURE;
  516.     STDMETHOD(Transform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE;
  517. };
  518. #undef INTERFACE
  519. #define INTERFACE IDirect3DRMFrame2
  520. DECLARE_INTERFACE_(IDirect3DRMFrame2, IDirect3DRMFrame)
  521. {
  522.     IUNKNOWN_METHODS(PURE);
  523.     IDIRECT3DRMOBJECT_METHODS(PURE);
  524.     /*
  525.      * IDirect3DRMFrame methods
  526.      */
  527.     STDMETHOD(AddChild)(THIS_ LPDIRECT3DRMFRAME child) PURE;
  528.     STDMETHOD(AddLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
  529.     STDMETHOD(AddMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
  530.     STDMETHOD(AddTransform)(THIS_ D3DRMCOMBINETYPE, D3DRMMATRIX4D) PURE;
  531.     STDMETHOD(AddTranslation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  532.     STDMETHOD(AddScale)(THIS_ D3DRMCOMBINETYPE, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
  533.     STDMETHOD(AddRotation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE;
  534.     STDMETHOD(AddVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE;
  535.     STDMETHOD(GetChildren)(THIS_ LPDIRECT3DRMFRAMEARRAY *children) PURE;
  536.     STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
  537.     STDMETHOD(GetLights)(THIS_ LPDIRECT3DRMLIGHTARRAY *lights) PURE;
  538.     STDMETHOD_(D3DRMMATERIALMODE, GetMaterialMode)(THIS) PURE;
  539.     STDMETHOD(GetParent)(THIS_ LPDIRECT3DRMFRAME *) PURE;
  540.     STDMETHOD(GetPosition)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_position) PURE;
  541.     STDMETHOD(GetRotation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR axis, LPD3DVALUE return_theta) PURE;
  542.     STDMETHOD(GetScene)(THIS_ LPDIRECT3DRMFRAME *) PURE;
  543.     STDMETHOD_(D3DRMSORTMODE, GetSortMode)(THIS) PURE;
  544.     STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE *) PURE;
  545.     STDMETHOD(GetTransform)(THIS_ D3DRMMATRIX4D return_matrix) PURE;
  546.     STDMETHOD(GetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_velocity, BOOL with_rotation) PURE;
  547.     STDMETHOD(GetOrientation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR dir, LPD3DVECTOR up) PURE;
  548.     STDMETHOD(GetVisuals)(THIS_ LPDIRECT3DRMVISUALARRAY *visuals) PURE;
  549.     STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE;
  550.     STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE;
  551.     STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg)PURE;
  552.     STDMETHOD(LookAt)(THIS_ LPDIRECT3DRMFRAME target, LPDIRECT3DRMFRAME reference, D3DRMFRAMECONSTRAINT) PURE;
  553.     STDMETHOD(Move)(THIS_ D3DVALUE delta) PURE;
  554.     STDMETHOD(DeleteChild)(THIS_ LPDIRECT3DRMFRAME) PURE;
  555.     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
  556.     STDMETHOD(DeleteMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE;
  557.     STDMETHOD(DeleteVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE;
  558.     STDMETHOD_(D3DCOLOR, GetSceneBackground)(THIS) PURE;
  559.     STDMETHOD(GetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *) PURE;
  560.     STDMETHOD_(D3DCOLOR, GetSceneFogColor)(THIS) PURE;
  561.     STDMETHOD_(BOOL, GetSceneFogEnable)(THIS) PURE;
  562.     STDMETHOD_(D3DRMFOGMODE, GetSceneFogMode)(THIS) PURE;
  563.     STDMETHOD(GetSceneFogParams)(THIS_ D3DVALUE *return_start, D3DVALUE *return_end, D3DVALUE *return_density) PURE;
  564.     STDMETHOD(SetSceneBackground)(THIS_ D3DCOLOR) PURE;
  565.     STDMETHOD(SetSceneBackgroundRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  566.     STDMETHOD(SetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  567.     STDMETHOD(SetSceneBackgroundImage)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
  568.     STDMETHOD(SetSceneFogEnable)(THIS_ BOOL) PURE;
  569.     STDMETHOD(SetSceneFogColor)(THIS_ D3DCOLOR) PURE;
  570.     STDMETHOD(SetSceneFogMode)(THIS_ D3DRMFOGMODE) PURE;
  571.     STDMETHOD(SetSceneFogParams)(THIS_ D3DVALUE start, D3DVALUE end, D3DVALUE density) PURE;
  572.     STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  573.     STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  574.     STDMETHOD_(D3DRMZBUFFERMODE, GetZbufferMode)(THIS) PURE;
  575.     STDMETHOD(SetMaterialMode)(THIS_ D3DRMMATERIALMODE) PURE;
  576.     STDMETHOD(SetOrientation)
  577.     ( THIS_ LPDIRECT3DRMFRAME reference,
  578. D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  579. D3DVALUE ux, D3DVALUE uy, D3DVALUE uz
  580.     ) PURE;
  581.     STDMETHOD(SetPosition)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  582.     STDMETHOD(SetRotation)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE;
  583.     STDMETHOD(SetSortMode)(THIS_ D3DRMSORTMODE) PURE;
  584.     STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
  585.     STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
  586.     STDMETHOD(SetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation) PURE;
  587.     STDMETHOD(SetZbufferMode)(THIS_ D3DRMZBUFFERMODE) PURE;
  588.     STDMETHOD(Transform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE;
  589.     /*
  590.      * IDirect3DRMFrame2 methods
  591.      */
  592.     STDMETHOD(AddMoveCallback2)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg, DWORD dwFlags) PURE;
  593.     STDMETHOD(GetBox)(THIS_ LPD3DRMBOX) PURE;
  594.     STDMETHOD_(BOOL, GetBoxEnable)(THIS) PURE;
  595.     STDMETHOD(GetAxes)(THIS_ LPD3DVECTOR dir, LPD3DVECTOR up);
  596.     STDMETHOD(GetMaterial)(THIS_ LPDIRECT3DRMMATERIAL *) PURE;
  597.     STDMETHOD_(BOOL, GetInheritAxes)(THIS);
  598.     STDMETHOD(GetHierarchyBox)(THIS_ LPD3DRMBOX) PURE;
  599.     STDMETHOD(SetBox)(THIS_ LPD3DRMBOX) PURE;
  600.     STDMETHOD(SetBoxEnable)(THIS_ BOOL) PURE;
  601.     STDMETHOD(SetAxes)(THIS_ D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  602.        D3DVALUE ux, D3DVALUE uy, D3DVALUE uz);
  603.     STDMETHOD(SetInheritAxes)(THIS_ BOOL inherit_from_parent);
  604.     STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE;
  605.     STDMETHOD(SetQuaternion)(THIS_ LPDIRECT3DRMFRAME reference, D3DRMQUATERNION *q) PURE;
  606.     STDMETHOD(RayPick)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DRMRAY ray, DWORD dwFlags, LPDIRECT3DRMPICKED2ARRAY *return_visuals) PURE;
  607.     STDMETHOD(Save)(THIS_ LPCSTR filename, D3DRMXOFFORMAT d3dFormat, 
  608.     D3DRMSAVEOPTIONS d3dSaveFlags);
  609. };
  610. #undef INTERFACE
  611. #define INTERFACE IDirect3DRMFrame3
  612. DECLARE_INTERFACE_(IDirect3DRMFrame3, IDirect3DRMVisual)
  613. {
  614.     IUNKNOWN_METHODS(PURE);
  615.     IDIRECT3DRMOBJECT_METHODS(PURE);
  616.     /*
  617.      * IDirect3DRMFrame3 methods
  618.      */
  619.     STDMETHOD(AddChild)(THIS_ LPDIRECT3DRMFRAME3 child) PURE;
  620.     STDMETHOD(AddLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
  621.     STDMETHOD(AddMoveCallback)(THIS_ D3DRMFRAME3MOVECALLBACK, VOID *arg, DWORD dwFlags) PURE;
  622.     STDMETHOD(AddTransform)(THIS_ D3DRMCOMBINETYPE, D3DRMMATRIX4D) PURE;
  623.     STDMETHOD(AddTranslation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  624.     STDMETHOD(AddScale)(THIS_ D3DRMCOMBINETYPE, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
  625.     STDMETHOD(AddRotation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE;
  626.     STDMETHOD(AddVisual)(THIS_ LPUNKNOWN) PURE;
  627.     STDMETHOD(GetChildren)(THIS_ LPDIRECT3DRMFRAMEARRAY *children) PURE;
  628.     STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
  629.     STDMETHOD(GetLights)(THIS_ LPDIRECT3DRMLIGHTARRAY *lights) PURE;
  630.     STDMETHOD_(D3DRMMATERIALMODE, GetMaterialMode)(THIS) PURE;
  631.     STDMETHOD(GetParent)(THIS_ LPDIRECT3DRMFRAME3 *) PURE;
  632.     STDMETHOD(GetPosition)(THIS_ LPDIRECT3DRMFRAME3 reference, LPD3DVECTOR return_position) PURE;
  633.     STDMETHOD(GetRotation)(THIS_ LPDIRECT3DRMFRAME3 reference, LPD3DVECTOR axis, LPD3DVALUE return_theta) PURE;
  634.     STDMETHOD(GetScene)(THIS_ LPDIRECT3DRMFRAME3 *) PURE;
  635.     STDMETHOD_(D3DRMSORTMODE, GetSortMode)(THIS) PURE;
  636.     STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE3 *) PURE;
  637.     STDMETHOD(GetTransform)(THIS_ LPDIRECT3DRMFRAME3 reference,
  638.      D3DRMMATRIX4D rmMatrix) PURE;
  639.     STDMETHOD(GetVelocity)(THIS_ LPDIRECT3DRMFRAME3 reference, LPD3DVECTOR return_velocity, BOOL with_rotation) PURE;
  640.     STDMETHOD(GetOrientation)(THIS_ LPDIRECT3DRMFRAME3 reference, LPD3DVECTOR dir, LPD3DVECTOR up) PURE;
  641.     STDMETHOD(GetVisuals)(THIS_ LPDWORD lpdwCount, LPUNKNOWN *) PURE;
  642.     STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE;
  643.     STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURE3CALLBACK, LPVOID lpArg)PURE;
  644.     STDMETHOD(LookAt)(THIS_ LPDIRECT3DRMFRAME3 target, LPDIRECT3DRMFRAME3 reference, D3DRMFRAMECONSTRAINT) PURE;
  645.     STDMETHOD(Move)(THIS_ D3DVALUE delta) PURE;
  646.     STDMETHOD(DeleteChild)(THIS_ LPDIRECT3DRMFRAME3) PURE;
  647.     STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DRMLIGHT) PURE;
  648.     STDMETHOD(DeleteMoveCallback)(THIS_ D3DRMFRAME3MOVECALLBACK, VOID *arg) PURE;
  649.     STDMETHOD(DeleteVisual)(THIS_ LPUNKNOWN) PURE;
  650.     STDMETHOD_(D3DCOLOR, GetSceneBackground)(THIS) PURE;
  651.     STDMETHOD(GetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *) PURE;
  652.     STDMETHOD_(D3DCOLOR, GetSceneFogColor)(THIS) PURE;
  653.     STDMETHOD_(BOOL, GetSceneFogEnable)(THIS) PURE;
  654.     STDMETHOD_(D3DRMFOGMODE, GetSceneFogMode)(THIS) PURE;
  655.     STDMETHOD(GetSceneFogParams)(THIS_ D3DVALUE *return_start, D3DVALUE *return_end, D3DVALUE *return_density) PURE;
  656.     STDMETHOD(SetSceneBackground)(THIS_ D3DCOLOR) PURE;
  657.     STDMETHOD(SetSceneBackgroundRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  658.     STDMETHOD(SetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE;
  659.     STDMETHOD(SetSceneBackgroundImage)(THIS_ LPDIRECT3DRMTEXTURE3) PURE;
  660.     STDMETHOD(SetSceneFogEnable)(THIS_ BOOL) PURE;
  661.     STDMETHOD(SetSceneFogColor)(THIS_ D3DCOLOR) PURE;
  662.     STDMETHOD(SetSceneFogMode)(THIS_ D3DRMFOGMODE) PURE;
  663.     STDMETHOD(SetSceneFogParams)(THIS_ D3DVALUE start, D3DVALUE end, D3DVALUE density) PURE;
  664.     STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  665.     STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  666.     STDMETHOD_(D3DRMZBUFFERMODE, GetZbufferMode)(THIS) PURE;
  667.     STDMETHOD(SetMaterialMode)(THIS_ D3DRMMATERIALMODE) PURE;
  668.     STDMETHOD(SetOrientation)
  669.     ( THIS_ LPDIRECT3DRMFRAME3 reference,
  670. D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  671. D3DVALUE ux, D3DVALUE uy, D3DVALUE uz
  672.     ) PURE;
  673.     STDMETHOD(SetPosition)(THIS_ LPDIRECT3DRMFRAME3 reference, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  674.     STDMETHOD(SetRotation)(THIS_ LPDIRECT3DRMFRAME3 reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE;
  675.     STDMETHOD(SetSortMode)(THIS_ D3DRMSORTMODE) PURE;
  676.     STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE3) PURE;
  677.     STDMETHOD(SetVelocity)(THIS_ LPDIRECT3DRMFRAME3 reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation) PURE;
  678.     STDMETHOD(SetZbufferMode)(THIS_ D3DRMZBUFFERMODE) PURE;
  679.     STDMETHOD(Transform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE;
  680.     STDMETHOD(GetBox)(THIS_ LPD3DRMBOX) PURE;
  681.     STDMETHOD_(BOOL, GetBoxEnable)(THIS) PURE;
  682.     STDMETHOD(GetAxes)(THIS_ LPD3DVECTOR dir, LPD3DVECTOR up);
  683.     STDMETHOD(GetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2 *) PURE;
  684.     STDMETHOD_(BOOL, GetInheritAxes)(THIS);
  685.     STDMETHOD(GetHierarchyBox)(THIS_ LPD3DRMBOX) PURE;
  686.     STDMETHOD(SetBox)(THIS_ LPD3DRMBOX) PURE;
  687.     STDMETHOD(SetBoxEnable)(THIS_ BOOL) PURE;
  688.     STDMETHOD(SetAxes)(THIS_ D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  689.        D3DVALUE ux, D3DVALUE uy, D3DVALUE uz);
  690.     STDMETHOD(SetInheritAxes)(THIS_ BOOL inherit_from_parent);
  691.     STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2) PURE;
  692.     STDMETHOD(SetQuaternion)(THIS_ LPDIRECT3DRMFRAME3 reference, D3DRMQUATERNION *q) PURE;
  693.     STDMETHOD(RayPick)(THIS_ LPDIRECT3DRMFRAME3 reference, LPD3DRMRAY ray, DWORD dwFlags, LPDIRECT3DRMPICKED2ARRAY *return_visuals) PURE;
  694.     STDMETHOD(Save)(THIS_ LPCSTR filename, D3DRMXOFFORMAT d3dFormat, 
  695.     D3DRMSAVEOPTIONS d3dSaveFlags);
  696.     STDMETHOD(TransformVectors)(THIS_ LPDIRECT3DRMFRAME3 reference,
  697. DWORD dwNumVectors,
  698. LPD3DVECTOR lpDstVectors,
  699. LPD3DVECTOR lpSrcVectors) PURE;
  700.     STDMETHOD(InverseTransformVectors)(THIS_ LPDIRECT3DRMFRAME3 reference,
  701.        DWORD dwNumVectors,
  702.        LPD3DVECTOR lpDstVectors,
  703.        LPD3DVECTOR lpSrcVectors) PURE;
  704.     STDMETHOD(SetTraversalOptions)(THIS_ DWORD dwFlags) PURE;
  705.     STDMETHOD(GetTraversalOptions)(THIS_ LPDWORD lpdwFlags) PURE;
  706.     STDMETHOD(SetSceneFogMethod)(THIS_ DWORD dwFlags) PURE;
  707.     STDMETHOD(GetSceneFogMethod)(THIS_ LPDWORD lpdwFlags) PURE;
  708.     STDMETHOD(SetMaterialOverride)(THIS_ LPD3DRMMATERIALOVERRIDE) PURE;
  709.     STDMETHOD(GetMaterialOverride)(THIS_ LPD3DRMMATERIALOVERRIDE) PURE;
  710. };
  711. #undef INTERFACE
  712. #define INTERFACE IDirect3DRMMesh
  713. DECLARE_INTERFACE_(IDirect3DRMMesh, IDirect3DRMVisual)
  714. {
  715.     IUNKNOWN_METHODS(PURE);
  716.     IDIRECT3DRMOBJECT_METHODS(PURE);
  717.     /*
  718.      * IDirect3DRMMesh methods
  719.      */
  720.     STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
  721.     STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE;
  722.     STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE;
  723.     STDMETHOD(AddGroup)(THIS_ unsigned vCount, unsigned fCount, unsigned vPerFace, unsigned *fData, D3DRMGROUPINDEX *returnId) PURE;
  724.     STDMETHOD(SetVertices)(THIS_ D3DRMGROUPINDEX id, unsigned index, unsigned count, D3DRMVERTEX *values) PURE;
  725.     STDMETHOD(SetGroupColor)(THIS_ D3DRMGROUPINDEX id, D3DCOLOR value) PURE;
  726.     STDMETHOD(SetGroupColorRGB)(THIS_ D3DRMGROUPINDEX id, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  727.     STDMETHOD(SetGroupMapping)(THIS_ D3DRMGROUPINDEX id, D3DRMMAPPING value) PURE;
  728.     STDMETHOD(SetGroupQuality)(THIS_ D3DRMGROUPINDEX id, D3DRMRENDERQUALITY value) PURE;
  729.     STDMETHOD(SetGroupMaterial)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMMATERIAL value) PURE;
  730.     STDMETHOD(SetGroupTexture)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMTEXTURE value) PURE;
  731.     STDMETHOD_(unsigned, GetGroupCount)(THIS) PURE;
  732.     STDMETHOD(GetGroup)(THIS_ D3DRMGROUPINDEX id, unsigned *vCount, unsigned *fCount, unsigned *vPerFace, DWORD *fDataSize, unsigned *fData) PURE;
  733.     STDMETHOD(GetVertices)(THIS_ D3DRMGROUPINDEX id, DWORD index, DWORD count, D3DRMVERTEX *returnPtr) PURE;
  734.     STDMETHOD_(D3DCOLOR, GetGroupColor)(THIS_ D3DRMGROUPINDEX id) PURE;
  735.     STDMETHOD_(D3DRMMAPPING, GetGroupMapping)(THIS_ D3DRMGROUPINDEX id) PURE;
  736.     STDMETHOD_(D3DRMRENDERQUALITY, GetGroupQuality)(THIS_ D3DRMGROUPINDEX id) PURE;
  737.     STDMETHOD(GetGroupMaterial)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMMATERIAL *returnPtr) PURE;
  738.     STDMETHOD(GetGroupTexture)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMTEXTURE *returnPtr) PURE;
  739. };
  740. #undef INTERFACE
  741. #define INTERFACE IDirect3DRMProgressiveMesh
  742. DECLARE_INTERFACE_(IDirect3DRMProgressiveMesh, IDirect3DRMVisual)
  743. {
  744.     IUNKNOWN_METHODS(PURE);
  745.     IDIRECT3DRMOBJECT_METHODS(PURE);
  746.     /*
  747.      * IDirect3DRMProgressiveMesh methods
  748.      */
  749.     STDMETHOD(Load) (THIS_ LPVOID lpObjLocation, LPVOID lpObjId, 
  750.      D3DRMLOADOPTIONS dloLoadflags, D3DRMLOADTEXTURECALLBACK lpCallback,
  751.      LPVOID lpArg) PURE;
  752.     STDMETHOD(GetLoadStatus) (THIS_ LPD3DRMPMESHLOADSTATUS lpStatus) PURE;
  753.     STDMETHOD(SetMinRenderDetail) (THIS_ D3DVALUE d3dVal) PURE;
  754.     STDMETHOD(Abort) (THIS_ DWORD dwFlags) PURE;
  755.     
  756.     STDMETHOD(GetFaceDetail) (THIS_ LPDWORD lpdwCount) PURE;
  757.     STDMETHOD(GetVertexDetail) (THIS_ LPDWORD lpdwCount) PURE;
  758.     STDMETHOD(SetFaceDetail) (THIS_ DWORD dwCount) PURE;
  759.     STDMETHOD(SetVertexDetail) (THIS_ DWORD dwCount) PURE;
  760.     STDMETHOD(GetFaceDetailRange) (THIS_ LPDWORD lpdwMin, LPDWORD lpdwMax) PURE;
  761.     STDMETHOD(GetVertexDetailRange) (THIS_ LPDWORD lpdwMin, LPDWORD lpdwMax) PURE;
  762.     STDMETHOD(GetDetail) (THIS_ D3DVALUE *lpdvVal) PURE;
  763.     STDMETHOD(SetDetail) (THIS_ D3DVALUE d3dVal) PURE;
  764.     STDMETHOD(RegisterEvents) (THIS_ HANDLE hEvent, DWORD dwFlags, DWORD dwReserved) PURE;
  765.     STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *lplpD3DRMMesh) PURE;
  766.     STDMETHOD(Duplicate) (THIS_ LPDIRECT3DRMPROGRESSIVEMESH *lplpD3DRMPMesh) PURE;
  767.     STDMETHOD(GetBox) (THIS_ LPD3DRMBOX lpBBox) PURE;
  768.     STDMETHOD(SetQuality) (THIS_ D3DRMRENDERQUALITY) PURE;
  769.     STDMETHOD(GetQuality) (THIS_ LPD3DRMRENDERQUALITY lpdwquality) PURE;
  770. };
  771. #undef INTERFACE
  772. #define INTERFACE IDirect3DRMShadow
  773. DECLARE_INTERFACE_(IDirect3DRMShadow, IDirect3DRMVisual)
  774. {
  775.     IUNKNOWN_METHODS(PURE);
  776.     IDIRECT3DRMOBJECT_METHODS(PURE);
  777.     /*
  778.      * IDirect3DRMShadow methods
  779.      */
  780.     STDMETHOD(Init)
  781.     ( THIS_ LPDIRECT3DRMVISUAL visual, LPDIRECT3DRMLIGHT light,
  782. D3DVALUE px, D3DVALUE py, D3DVALUE pz,
  783. D3DVALUE nx, D3DVALUE ny, D3DVALUE nz
  784.     ) PURE;
  785. };
  786. #undef INTERFACE
  787. #define INTERFACE IDirect3DRMShadow2
  788. DECLARE_INTERFACE_(IDirect3DRMShadow2, IDirect3DRMVisual)
  789. {
  790.     IUNKNOWN_METHODS(PURE);
  791.     IDIRECT3DRMOBJECT_METHODS(PURE);
  792.     /*
  793.      * IDirect3DRMShadow methods
  794.      */
  795.     STDMETHOD(Init)
  796.     ( THIS_ LPUNKNOWN pUNK, LPDIRECT3DRMLIGHT light,
  797. D3DVALUE px, D3DVALUE py, D3DVALUE pz,
  798. D3DVALUE nx, D3DVALUE ny, D3DVALUE nz
  799.     ) PURE;
  800.     /*
  801.      * IDirect3DRMShadow2 methods
  802.      */
  803.     STDMETHOD(GetVisual)(THIS_ LPDIRECT3DRMVISUAL *) PURE;
  804.     STDMETHOD(SetVisual)(THIS_ LPUNKNOWN pUNK, DWORD) PURE;
  805.     STDMETHOD(GetLight)(THIS_ LPDIRECT3DRMLIGHT *) PURE;
  806.     STDMETHOD(SetLight)(THIS_ LPDIRECT3DRMLIGHT, DWORD) PURE;
  807.     STDMETHOD(GetPlane)(THIS_ LPD3DVALUE px, LPD3DVALUE py, LPD3DVALUE pz,
  808. LPD3DVALUE nx, LPD3DVALUE ny, LPD3DVALUE nz) PURE;
  809.     STDMETHOD(SetPlane)(THIS_ D3DVALUE px, D3DVALUE py, D3DVALUE pz,
  810. D3DVALUE nx, D3DVALUE ny, D3DVALUE nz, DWORD) PURE;
  811.     STDMETHOD(GetOptions)(THIS_ LPDWORD) PURE;
  812.     STDMETHOD(SetOptions)(THIS_ DWORD) PURE;
  813. };
  814. #undef INTERFACE
  815. #define INTERFACE IDirect3DRMFace
  816. DECLARE_INTERFACE_(IDirect3DRMFace, IDirect3DRMObject)
  817. {
  818.     IUNKNOWN_METHODS(PURE);
  819.     IDIRECT3DRMOBJECT_METHODS(PURE);
  820.     /*
  821.      * IDirect3DRMFace methods
  822.      */
  823.      STDMETHOD(AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  824.      STDMETHOD(AddVertexAndNormalIndexed)(THIS_ DWORD vertex, DWORD normal) PURE;
  825.      STDMETHOD(SetColorRGB)(THIS_ D3DVALUE, D3DVALUE, D3DVALUE) PURE;
  826.      STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  827.      STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
  828.      STDMETHOD(SetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE u, D3DVALUE v) PURE;
  829.      STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE;
  830.      STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
  831.      STDMETHOD(GetVertex)(THIS_ DWORD index, D3DVECTOR *vertex, D3DVECTOR *normal) PURE;
  832.      STDMETHOD(GetVertices)(THIS_ DWORD *vertex_count, D3DVECTOR *coords, D3DVECTOR *normals);
  833.      STDMETHOD(GetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE *u, D3DVALUE *v) PURE;
  834.      STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE;
  835.      STDMETHOD(GetNormal)(THIS_ D3DVECTOR *) PURE;
  836.      STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE *) PURE;
  837.      STDMETHOD(GetMaterial)(THIS_ LPDIRECT3DRMMATERIAL *) PURE;
  838.      STDMETHOD_(int, GetVertexCount)(THIS) PURE;
  839.      STDMETHOD_(int, GetVertexIndex)(THIS_ DWORD which) PURE;
  840.      STDMETHOD_(int, GetTextureCoordinateIndex)(THIS_ DWORD which) PURE;
  841.      STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
  842. };
  843. #undef INTERFACE
  844. #define INTERFACE IDirect3DRMFace2
  845. DECLARE_INTERFACE_(IDirect3DRMFace2, IDirect3DRMObject)
  846. {
  847.     IUNKNOWN_METHODS(PURE);
  848.     IDIRECT3DRMOBJECT_METHODS(PURE);
  849.     /*
  850.      * IDirect3DRMFace methods
  851.      */
  852.      STDMETHOD(AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  853.      STDMETHOD(AddVertexAndNormalIndexed)(THIS_ DWORD vertex, DWORD normal) PURE;
  854.      STDMETHOD(SetColorRGB)(THIS_ D3DVALUE, D3DVALUE, D3DVALUE) PURE;
  855.      STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  856.      STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE3) PURE;
  857.      STDMETHOD(SetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE u, D3DVALUE v) PURE;
  858.      STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2) PURE;
  859.      STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
  860.      STDMETHOD(GetVertex)(THIS_ DWORD index, D3DVECTOR *vertex, D3DVECTOR *normal) PURE;
  861.      STDMETHOD(GetVertices)(THIS_ DWORD *vertex_count, D3DVECTOR *coords, D3DVECTOR *normals);
  862.      STDMETHOD(GetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE *u, D3DVALUE *v) PURE;
  863.      STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE;
  864.      STDMETHOD(GetNormal)(THIS_ D3DVECTOR *) PURE;
  865.      STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE3 *) PURE;
  866.      STDMETHOD(GetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2 *) PURE;
  867.      STDMETHOD_(int, GetVertexCount)(THIS) PURE;
  868.      STDMETHOD_(int, GetVertexIndex)(THIS_ DWORD which) PURE;
  869.      STDMETHOD_(int, GetTextureCoordinateIndex)(THIS_ DWORD which) PURE;
  870.      STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
  871. };
  872. #undef INTERFACE
  873. #define INTERFACE IDirect3DRMMeshBuilder
  874. DECLARE_INTERFACE_(IDirect3DRMMeshBuilder, IDirect3DRMVisual)
  875. {
  876.     IUNKNOWN_METHODS(PURE);
  877.     IDIRECT3DRMOBJECT_METHODS(PURE);
  878.     /*
  879.      * IDirect3DRMMeshBuilder methods
  880.      */
  881.     STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg) PURE;
  882.     STDMETHOD(Save)(THIS_ const char *filename, D3DRMXOFFORMAT, D3DRMSAVEOPTIONS save) PURE;
  883.     STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
  884.     STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE;
  885.     STDMETHOD(SetColorSource)(THIS_ D3DRMCOLORSOURCE) PURE;
  886.     STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE;
  887.     STDMETHOD(GenerateNormals)(THIS) PURE;
  888.     STDMETHOD_(D3DRMCOLORSOURCE, GetColorSource)(THIS) PURE;
  889.     STDMETHOD(AddMesh)(THIS_ LPDIRECT3DRMMESH) PURE;
  890.     STDMETHOD(AddMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER) PURE;
  891.     STDMETHOD(AddFrame)(THIS_ LPDIRECT3DRMFRAME) PURE;
  892.     STDMETHOD(AddFace)(THIS_ LPDIRECT3DRMFACE) PURE;
  893.     STDMETHOD(AddFaces)
  894.     ( THIS_ DWORD vcount, D3DVECTOR *vertices, DWORD ncount, D3DVECTOR *normals,
  895. DWORD *data, LPDIRECT3DRMFACEARRAY*
  896.     ) PURE;
  897.     STDMETHOD(ReserveSpace)(THIS_ DWORD vertex_Count, DWORD normal_count, DWORD face_count) PURE;
  898.     STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  899.     STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  900.     STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
  901.     STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE;
  902.     STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
  903.     STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE;
  904.     STDMETHOD(SetPerspective)(THIS_ BOOL) PURE;
  905.     STDMETHOD(SetVertex)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  906.     STDMETHOD(SetNormal)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  907.     STDMETHOD(SetTextureCoordinates)(THIS_ DWORD index, D3DVALUE u, D3DVALUE v) PURE;
  908.     STDMETHOD(SetVertexColor)(THIS_ DWORD index, D3DCOLOR) PURE;
  909.     STDMETHOD(SetVertexColorRGB)(THIS_ DWORD index, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  910.     STDMETHOD(GetFaces)(THIS_ LPDIRECT3DRMFACEARRAY*) PURE;
  911.     STDMETHOD(GetVertices)
  912.     ( THIS_ DWORD *vcount, D3DVECTOR *vertices, DWORD *ncount, D3DVECTOR *normals, DWORD *face_data_size, DWORD *face_data
  913.     ) PURE;
  914.     STDMETHOD(GetTextureCoordinates)(THIS_ DWORD index, D3DVALUE *u, D3DVALUE *v) PURE;
  915.     STDMETHOD_(int, AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  916.     STDMETHOD_(int, AddNormal)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  917.     STDMETHOD(CreateFace)(THIS_ LPDIRECT3DRMFACE*) PURE;
  918.     STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE;
  919.     STDMETHOD_(BOOL, GetPerspective)(THIS) PURE;
  920.     STDMETHOD_(int, GetFaceCount)(THIS) PURE;
  921.     STDMETHOD_(int, GetVertexCount)(THIS) PURE;
  922.     STDMETHOD_(D3DCOLOR, GetVertexColor)(THIS_ DWORD index) PURE;
  923.     STDMETHOD(CreateMesh)(THIS_ LPDIRECT3DRMMESH*) PURE;
  924. };
  925. #undef INTERFACE
  926. #define INTERFACE IDirect3DRMMeshBuilder2
  927. DECLARE_INTERFACE_(IDirect3DRMMeshBuilder2, IDirect3DRMMeshBuilder)
  928. {
  929.     IUNKNOWN_METHODS(PURE);
  930.     IDIRECT3DRMOBJECT_METHODS(PURE);
  931.     /*
  932.      * IDirect3DRMMeshBuilder methods
  933.      */
  934.     STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg) PURE;
  935.     STDMETHOD(Save)(THIS_ const char *filename, D3DRMXOFFORMAT, D3DRMSAVEOPTIONS save) PURE;
  936.     STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
  937.     STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE;
  938.     STDMETHOD(SetColorSource)(THIS_ D3DRMCOLORSOURCE) PURE;
  939.     STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE;
  940.     STDMETHOD(GenerateNormals)(THIS) PURE;
  941.     STDMETHOD_(D3DRMCOLORSOURCE, GetColorSource)(THIS) PURE;
  942.     STDMETHOD(AddMesh)(THIS_ LPDIRECT3DRMMESH) PURE;
  943.     STDMETHOD(AddMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER) PURE;
  944.     STDMETHOD(AddFrame)(THIS_ LPDIRECT3DRMFRAME) PURE;
  945.     STDMETHOD(AddFace)(THIS_ LPDIRECT3DRMFACE) PURE;
  946.     STDMETHOD(AddFaces)
  947.     ( THIS_ DWORD vcount, D3DVECTOR *vertices, DWORD ncount, D3DVECTOR *normals,
  948. DWORD *data, LPDIRECT3DRMFACEARRAY*
  949.     ) PURE;
  950.     STDMETHOD(ReserveSpace)(THIS_ DWORD vertex_Count, DWORD normal_count, DWORD face_count) PURE;
  951.     STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  952.     STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  953.     STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE;
  954.     STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE;
  955.     STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
  956.     STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE;
  957.     STDMETHOD(SetPerspective)(THIS_ BOOL) PURE;
  958.     STDMETHOD(SetVertex)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  959.     STDMETHOD(SetNormal)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  960.     STDMETHOD(SetTextureCoordinates)(THIS_ DWORD index, D3DVALUE u, D3DVALUE v) PURE;
  961.     STDMETHOD(SetVertexColor)(THIS_ DWORD index, D3DCOLOR) PURE;
  962.     STDMETHOD(SetVertexColorRGB)(THIS_ DWORD index, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  963.     STDMETHOD(GetFaces)(THIS_ LPDIRECT3DRMFACEARRAY*) PURE;
  964.     STDMETHOD(GetVertices)
  965.     ( THIS_ DWORD *vcount, D3DVECTOR *vertices, DWORD *ncount, D3DVECTOR *normals, DWORD *face_data_size, DWORD *face_data
  966.     ) PURE;
  967.     STDMETHOD(GetTextureCoordinates)(THIS_ DWORD index, D3DVALUE *u, D3DVALUE *v) PURE;
  968.     STDMETHOD_(int, AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  969.     STDMETHOD_(int, AddNormal)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  970.     STDMETHOD(CreateFace)(THIS_ LPDIRECT3DRMFACE*) PURE;
  971.     STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE;
  972.     STDMETHOD_(BOOL, GetPerspective)(THIS) PURE;
  973.     STDMETHOD_(int, GetFaceCount)(THIS) PURE;
  974.     STDMETHOD_(int, GetVertexCount)(THIS) PURE;
  975.     STDMETHOD_(D3DCOLOR, GetVertexColor)(THIS_ DWORD index) PURE;
  976.     STDMETHOD(CreateMesh)(THIS_ LPDIRECT3DRMMESH*) PURE;
  977.     /*
  978.      * IDirect3DRMMeshBuilder2 methods
  979.      */
  980.     STDMETHOD(GenerateNormals2)(THIS_ D3DVALUE crease, DWORD dwFlags) PURE;
  981.     STDMETHOD(GetFace)(THIS_ DWORD index, LPDIRECT3DRMFACE*) PURE;
  982. };
  983. #undef INTERFACE
  984. #define INTERFACE IDirect3DRMMeshBuilder3
  985. DECLARE_INTERFACE_(IDirect3DRMMeshBuilder3, IDirect3DRMVisual)
  986. {
  987.     IUNKNOWN_METHODS(PURE);
  988.     IDIRECT3DRMOBJECT_METHODS(PURE);
  989.     /*
  990.      * IDirect3DRMMeshBuilder3 methods
  991.      */
  992.     STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURE3CALLBACK, LPVOID lpArg) PURE;
  993.     STDMETHOD(Save)(THIS_ const char *filename, D3DRMXOFFORMAT, D3DRMSAVEOPTIONS save) PURE;
  994.     STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE;
  995.     STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE;
  996.     STDMETHOD(SetColorSource)(THIS_ D3DRMCOLORSOURCE) PURE;
  997.     STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE;
  998.     STDMETHOD(GenerateNormals)(THIS_ D3DVALUE crease, DWORD dwFlags) PURE;
  999.     STDMETHOD_(D3DRMCOLORSOURCE, GetColorSource)(THIS) PURE;
  1000.     STDMETHOD(AddMesh)(THIS_ LPDIRECT3DRMMESH) PURE;
  1001.     STDMETHOD(AddMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER3, DWORD dwFlags) PURE;
  1002.     STDMETHOD(AddFrame)(THIS_ LPDIRECT3DRMFRAME3) PURE;
  1003.     STDMETHOD(AddFace)(THIS_ LPDIRECT3DRMFACE2) PURE;
  1004.     STDMETHOD(AddFaces)
  1005.     ( THIS_ DWORD vcount, D3DVECTOR *vertices, DWORD ncount, D3DVECTOR *normals,
  1006. DWORD *data, LPDIRECT3DRMFACEARRAY*
  1007.     ) PURE;
  1008.     STDMETHOD(ReserveSpace)(THIS_ DWORD vertex_Count, DWORD normal_count, DWORD face_count) PURE;
  1009.     STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  1010.     STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  1011.     STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE3) PURE;
  1012.     STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2) PURE;
  1013.     STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE;
  1014.     STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE;
  1015.     STDMETHOD(SetPerspective)(THIS_ BOOL) PURE;
  1016.     STDMETHOD(SetVertex)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  1017.     STDMETHOD(SetNormal)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  1018.     STDMETHOD(SetTextureCoordinates)(THIS_ DWORD index, D3DVALUE u, D3DVALUE v) PURE;
  1019.     STDMETHOD(SetVertexColor)(THIS_ DWORD index, D3DCOLOR) PURE;
  1020.     STDMETHOD(SetVertexColorRGB)(THIS_ DWORD index, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  1021.     STDMETHOD(GetFaces)(THIS_ LPDIRECT3DRMFACEARRAY*) PURE;
  1022.     STDMETHOD(GetGeometry)
  1023.     ( THIS_ DWORD *vcount, D3DVECTOR *vertices, DWORD *ncount, D3DVECTOR *normals, DWORD *face_data_size, DWORD *face_data
  1024.     ) PURE;
  1025.     STDMETHOD(GetTextureCoordinates)(THIS_ DWORD index, D3DVALUE *u, D3DVALUE *v) PURE;
  1026.     STDMETHOD_(int, AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  1027.     STDMETHOD_(int, AddNormal)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  1028.     STDMETHOD(CreateFace)(THIS_ LPDIRECT3DRMFACE2 *) PURE;
  1029.     STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE;
  1030.     STDMETHOD_(BOOL, GetPerspective)(THIS) PURE;
  1031.     STDMETHOD_(int, GetFaceCount)(THIS) PURE;
  1032.     STDMETHOD_(int, GetVertexCount)(THIS) PURE;
  1033.     STDMETHOD_(D3DCOLOR, GetVertexColor)(THIS_ DWORD index) PURE;
  1034.     STDMETHOD(CreateMesh)(THIS_ LPDIRECT3DRMMESH*) PURE;
  1035.     STDMETHOD(GetFace)(THIS_ DWORD index, LPDIRECT3DRMFACE2 *) PURE;
  1036.     STDMETHOD(GetVertex)(THIS_ DWORD dwIndex, LPD3DVECTOR lpVector) PURE;
  1037.     STDMETHOD(GetNormal)(THIS_ DWORD dwIndex, LPD3DVECTOR lpVector) PURE;
  1038.     STDMETHOD(DeleteVertices)(THIS_ DWORD dwIndexFirst, DWORD dwCount) PURE;
  1039.     STDMETHOD(DeleteNormals)(THIS_ DWORD dwIndexFirst, DWORD dwCount) PURE;
  1040.     STDMETHOD(DeleteFace)(THIS_ LPDIRECT3DRMFACE2) PURE;
  1041.     STDMETHOD(Empty)(THIS_ DWORD dwFlags) PURE;
  1042.     STDMETHOD(Optimize)(THIS_ DWORD dwFlags) PURE;
  1043.     STDMETHOD(AddFacesIndexed)(THIS_ DWORD dwFlags, DWORD *lpdwvIndices, DWORD *dwIndexFirst, DWORD *dwCount) PURE;
  1044.     STDMETHOD(CreateSubMesh)(THIS_ LPUNKNOWN *) PURE;
  1045.     STDMETHOD(GetParentMesh)(THIS_ DWORD, LPUNKNOWN *) PURE;
  1046.     STDMETHOD(GetSubMeshes)(THIS_ LPDWORD lpdwCount, LPUNKNOWN *) PURE;
  1047.     STDMETHOD(DeleteSubMesh)(THIS_ LPUNKNOWN) PURE;
  1048.     STDMETHOD(Enable)(THIS_ DWORD) PURE;
  1049.     STDMETHOD(GetEnable)(THIS_ DWORD *) PURE;
  1050.     STDMETHOD(AddTriangles)(THIS_ DWORD dwFlags, DWORD dwFormat,
  1051.     DWORD dwVertexCount, LPVOID lpvData) PURE;
  1052.     STDMETHOD(SetVertices)(THIS_ DWORD dwIndexFirst, DWORD dwCount, LPD3DVECTOR) PURE;
  1053.     STDMETHOD(GetVertices)(THIS_ DWORD dwIndexFirst, LPDWORD lpdwCount, LPD3DVECTOR) PURE;
  1054.     STDMETHOD(SetNormals)(THIS_ DWORD dwIndexFirst, DWORD dwCount, LPD3DVECTOR) PURE;
  1055.     STDMETHOD(GetNormals)(THIS_ DWORD dwIndexFirst, LPDWORD lpdwCount, LPD3DVECTOR) PURE;
  1056.     STDMETHOD_(int, GetNormalCount)(THIS) PURE;
  1057. };  
  1058. #undef INTERFACE
  1059. #define INTERFACE IDirect3DRMLight
  1060. DECLARE_INTERFACE_(IDirect3DRMLight, IDirect3DRMObject)
  1061. {
  1062.     IUNKNOWN_METHODS(PURE);
  1063.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1064.     /*
  1065.      * IDirect3DRMLight methods
  1066.      */
  1067.     STDMETHOD(SetType)(THIS_ D3DRMLIGHTTYPE) PURE;
  1068.     STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE;
  1069.     STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE;
  1070.     STDMETHOD(SetRange)(THIS_ D3DVALUE) PURE;
  1071.     STDMETHOD(SetUmbra)(THIS_ D3DVALUE) PURE;
  1072.     STDMETHOD(SetPenumbra)(THIS_ D3DVALUE) PURE;
  1073.     STDMETHOD(SetConstantAttenuation)(THIS_ D3DVALUE) PURE;
  1074.     STDMETHOD(SetLinearAttenuation)(THIS_ D3DVALUE) PURE;
  1075.     STDMETHOD(SetQuadraticAttenuation)(THIS_ D3DVALUE) PURE;
  1076.     STDMETHOD_(D3DVALUE, GetRange)(THIS) PURE;
  1077.     STDMETHOD_(D3DVALUE, GetUmbra)(THIS) PURE;
  1078.     STDMETHOD_(D3DVALUE, GetPenumbra)(THIS) PURE;
  1079.     STDMETHOD_(D3DVALUE, GetConstantAttenuation)(THIS) PURE;
  1080.     STDMETHOD_(D3DVALUE, GetLinearAttenuation)(THIS) PURE;
  1081.     STDMETHOD_(D3DVALUE, GetQuadraticAttenuation)(THIS) PURE;
  1082.     STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE;
  1083.     STDMETHOD_(D3DRMLIGHTTYPE, GetType)(THIS) PURE;
  1084.     STDMETHOD(SetEnableFrame)(THIS_ LPDIRECT3DRMFRAME) PURE;
  1085.     STDMETHOD(GetEnableFrame)(THIS_ LPDIRECT3DRMFRAME*) PURE;
  1086. };
  1087. #undef INTERFACE
  1088. #define INTERFACE IDirect3DRMTexture
  1089. DECLARE_INTERFACE_(IDirect3DRMTexture, IDirect3DRMVisual)
  1090. {
  1091.     IUNKNOWN_METHODS(PURE);
  1092.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1093.     /*
  1094.      * IDirect3DRMTexture methods
  1095.      */
  1096.     STDMETHOD(InitFromFile)(THIS_ const char *filename) PURE;
  1097.     STDMETHOD(InitFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS) PURE;
  1098.     STDMETHOD(InitFromResource)(THIS_ HRSRC) PURE;
  1099.     STDMETHOD(Changed)(THIS_ BOOL pixels, BOOL palette) PURE;
  1100.     STDMETHOD(SetColors)(THIS_ DWORD) PURE;
  1101.     STDMETHOD(SetShades)(THIS_ DWORD) PURE;
  1102.     STDMETHOD(SetDecalSize)(THIS_ D3DVALUE width, D3DVALUE height) PURE;
  1103.     STDMETHOD(SetDecalOrigin)(THIS_ LONG x, LONG y) PURE;
  1104.     STDMETHOD(SetDecalScale)(THIS_ DWORD) PURE;
  1105.     STDMETHOD(SetDecalTransparency)(THIS_ BOOL) PURE;
  1106.     STDMETHOD(SetDecalTransparentColor)(THIS_ D3DCOLOR) PURE;
  1107.     STDMETHOD(GetDecalSize)(THIS_ D3DVALUE *width_return, D3DVALUE *height_return) PURE;
  1108.     STDMETHOD(GetDecalOrigin)(THIS_ LONG *x_return, LONG *y_return) PURE;
  1109.     STDMETHOD_(D3DRMIMAGE *, GetImage)(THIS) PURE;
  1110.     STDMETHOD_(DWORD, GetShades)(THIS) PURE;
  1111.     STDMETHOD_(DWORD, GetColors)(THIS) PURE;
  1112.     STDMETHOD_(DWORD, GetDecalScale)(THIS) PURE;
  1113.     STDMETHOD_(BOOL, GetDecalTransparency)(THIS) PURE;
  1114.     STDMETHOD_(D3DCOLOR, GetDecalTransparentColor)(THIS) PURE;
  1115. };
  1116. #undef INTERFACE
  1117. #define INTERFACE IDirect3DRMTexture2
  1118. DECLARE_INTERFACE_(IDirect3DRMTexture2, IDirect3DRMTexture)
  1119. {
  1120.     IUNKNOWN_METHODS(PURE);
  1121.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1122.     /*
  1123.      * IDirect3DRMTexture methods
  1124.      */
  1125.     STDMETHOD(InitFromFile)(THIS_ const char *filename) PURE;
  1126.     STDMETHOD(InitFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS) PURE;
  1127.     STDMETHOD(InitFromResource)(THIS_ HRSRC) PURE;
  1128.     STDMETHOD(Changed)(THIS_ BOOL pixels, BOOL palette) PURE;
  1129.     STDMETHOD(SetColors)(THIS_ DWORD) PURE;
  1130.     STDMETHOD(SetShades)(THIS_ DWORD) PURE;
  1131.     STDMETHOD(SetDecalSize)(THIS_ D3DVALUE width, D3DVALUE height) PURE;
  1132.     STDMETHOD(SetDecalOrigin)(THIS_ LONG x, LONG y) PURE;
  1133.     STDMETHOD(SetDecalScale)(THIS_ DWORD) PURE;
  1134.     STDMETHOD(SetDecalTransparency)(THIS_ BOOL) PURE;
  1135.     STDMETHOD(SetDecalTransparentColor)(THIS_ D3DCOLOR) PURE;
  1136.     STDMETHOD(GetDecalSize)(THIS_ D3DVALUE *width_return, D3DVALUE *height_return) PURE;
  1137.     STDMETHOD(GetDecalOrigin)(THIS_ LONG *x_return, LONG *y_return) PURE;
  1138.     STDMETHOD_(D3DRMIMAGE *, GetImage)(THIS) PURE;
  1139.     STDMETHOD_(DWORD, GetShades)(THIS) PURE;
  1140.     STDMETHOD_(DWORD, GetColors)(THIS) PURE;
  1141.     STDMETHOD_(DWORD, GetDecalScale)(THIS) PURE;
  1142.     STDMETHOD_(BOOL, GetDecalTransparency)(THIS) PURE;
  1143.     STDMETHOD_(D3DCOLOR, GetDecalTransparentColor)(THIS) PURE;
  1144.     /*
  1145.      * IDirect3DRMTexture2 methods
  1146.      */
  1147.     STDMETHOD(InitFromImage)(THIS_ LPD3DRMIMAGE) PURE;
  1148.     STDMETHOD(InitFromResource2)(THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType) PURE;
  1149.     STDMETHOD(GenerateMIPMap)(THIS_ DWORD) PURE;
  1150. };
  1151. #undef INTERFACE
  1152. #define INTERFACE IDirect3DRMTexture3
  1153. DECLARE_INTERFACE_(IDirect3DRMTexture3, IDirect3DRMVisual)
  1154. {
  1155.     IUNKNOWN_METHODS(PURE);
  1156.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1157.     /*
  1158.      * IDirect3DRMTexture3 methods
  1159.      */
  1160.     STDMETHOD(InitFromFile)(THIS_ const char *filename) PURE;
  1161.     STDMETHOD(InitFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS) PURE;
  1162.     STDMETHOD(InitFromResource)(THIS_ HRSRC) PURE;
  1163.     STDMETHOD(Changed)(THIS_ DWORD dwFlags, DWORD dwcRects, LPRECT pRects) PURE;
  1164.     STDMETHOD(SetColors)(THIS_ DWORD) PURE;
  1165.     STDMETHOD(SetShades)(THIS_ DWORD) PURE;
  1166.     STDMETHOD(SetDecalSize)(THIS_ D3DVALUE width, D3DVALUE height) PURE;
  1167.     STDMETHOD(SetDecalOrigin)(THIS_ LONG x, LONG y) PURE;
  1168.     STDMETHOD(SetDecalScale)(THIS_ DWORD) PURE;
  1169.     STDMETHOD(SetDecalTransparency)(THIS_ BOOL) PURE;
  1170.     STDMETHOD(SetDecalTransparentColor)(THIS_ D3DCOLOR) PURE;
  1171.     STDMETHOD(GetDecalSize)(THIS_ D3DVALUE *width_return, D3DVALUE *height_return) PURE;
  1172.     STDMETHOD(GetDecalOrigin)(THIS_ LONG *x_return, LONG *y_return) PURE;
  1173.     STDMETHOD_(D3DRMIMAGE *, GetImage)(THIS) PURE;
  1174.     STDMETHOD_(DWORD, GetShades)(THIS) PURE;
  1175.     STDMETHOD_(DWORD, GetColors)(THIS) PURE;
  1176.     STDMETHOD_(DWORD, GetDecalScale)(THIS) PURE;
  1177.     STDMETHOD_(BOOL, GetDecalTransparency)(THIS) PURE;
  1178.     STDMETHOD_(D3DCOLOR, GetDecalTransparentColor)(THIS) PURE;
  1179.     STDMETHOD(InitFromImage)(THIS_ LPD3DRMIMAGE) PURE;
  1180.     STDMETHOD(InitFromResource2)(THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType) PURE;
  1181.     STDMETHOD(GenerateMIPMap)(THIS_ DWORD) PURE;
  1182.     STDMETHOD(GetSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE* lplpDDS) PURE;
  1183.     STDMETHOD(SetCacheOptions)(THIS_ LONG lImportance, DWORD dwFlags) PURE;
  1184.     STDMETHOD(GetCacheOptions)(THIS_ LPLONG lplImportance, LPDWORD lpdwFlags) PURE;
  1185.     STDMETHOD(SetDownsampleCallback)(THIS_ D3DRMDOWNSAMPLECALLBACK pCallback, LPVOID pArg) PURE;
  1186.     STDMETHOD(SetValidationCallback)(THIS_ D3DRMVALIDATIONCALLBACK pCallback, LPVOID pArg) PURE;
  1187. };
  1188. #undef INTERFACE
  1189. #define INTERFACE IDirect3DRMWrap
  1190. DECLARE_INTERFACE_(IDirect3DRMWrap, IDirect3DRMObject)
  1191. {
  1192.     IUNKNOWN_METHODS(PURE);
  1193.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1194.     /*
  1195.      * IDirect3DRMWrap methods
  1196.      */
  1197.     STDMETHOD(Init)
  1198.     ( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME ref,
  1199. D3DVALUE ox, D3DVALUE oy, D3DVALUE oz,
  1200. D3DVALUE dx, D3DVALUE dy, D3DVALUE dz,
  1201. D3DVALUE ux, D3DVALUE uy, D3DVALUE uz,
  1202. D3DVALUE ou, D3DVALUE ov,
  1203. D3DVALUE su, D3DVALUE sv
  1204.     ) PURE;
  1205.     STDMETHOD(Apply)(THIS_ LPDIRECT3DRMOBJECT) PURE;
  1206.     STDMETHOD(ApplyRelative)(THIS_ LPDIRECT3DRMFRAME frame, LPDIRECT3DRMOBJECT) PURE;
  1207. };
  1208. #undef INTERFACE
  1209. #define INTERFACE IDirect3DRMMaterial
  1210. DECLARE_INTERFACE_(IDirect3DRMMaterial, IDirect3DRMObject)
  1211. {
  1212.     IUNKNOWN_METHODS(PURE);
  1213.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1214.     /*
  1215.      * IDirect3DRMMaterial methods
  1216.      */
  1217.     STDMETHOD(SetPower)(THIS_ D3DVALUE power) PURE;
  1218.     STDMETHOD(SetSpecular)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE;
  1219.     STDMETHOD(SetEmissive)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE;
  1220.     STDMETHOD_(D3DVALUE, GetPower)(THIS) PURE;
  1221.     STDMETHOD(GetSpecular)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE;
  1222.     STDMETHOD(GetEmissive)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE;
  1223. };
  1224. #undef INTERFACE
  1225. #define INTERFACE IDirect3DRMMaterial2
  1226. DECLARE_INTERFACE_(IDirect3DRMMaterial2, IDirect3DRMObject)
  1227. {
  1228.     IUNKNOWN_METHODS(PURE);
  1229.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1230.     /*
  1231.      * IDirect3DRMMaterial2 methods
  1232.      */
  1233.     STDMETHOD(SetPower)(THIS_ D3DVALUE power) PURE;
  1234.     STDMETHOD(SetSpecular)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE;
  1235.     STDMETHOD(SetEmissive)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE;
  1236.     STDMETHOD_(D3DVALUE, GetPower)(THIS) PURE;
  1237.     STDMETHOD(GetSpecular)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE;
  1238.     STDMETHOD(GetEmissive)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE;
  1239.     STDMETHOD(GetAmbient)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE;
  1240.     STDMETHOD(SetAmbient)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE;
  1241. };
  1242. #undef INTERFACE
  1243. #define INTERFACE IDirect3DRMAnimation
  1244. DECLARE_INTERFACE_(IDirect3DRMAnimation, IDirect3DRMObject)
  1245. {
  1246.     IUNKNOWN_METHODS(PURE);
  1247.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1248.     /*
  1249.      * IDirect3DRMAnimation methods
  1250.      */
  1251.     STDMETHOD(SetOptions)(THIS_ D3DRMANIMATIONOPTIONS flags) PURE;
  1252.     STDMETHOD(AddRotateKey)(THIS_ D3DVALUE time, D3DRMQUATERNION *q) PURE;
  1253.     STDMETHOD(AddPositionKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  1254.     STDMETHOD(AddScaleKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  1255.     STDMETHOD(DeleteKey)(THIS_ D3DVALUE time) PURE;
  1256.     STDMETHOD(SetFrame)(THIS_ LPDIRECT3DRMFRAME frame) PURE;
  1257.     STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE;
  1258.     STDMETHOD_(D3DRMANIMATIONOPTIONS, GetOptions)(THIS) PURE;
  1259. };
  1260. #undef INTERFACE
  1261. #define INTERFACE IDirect3DRMAnimation2
  1262. DECLARE_INTERFACE_(IDirect3DRMAnimation2, IDirect3DRMObject)
  1263. {
  1264.     IUNKNOWN_METHODS(PURE);
  1265.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1266.     /*
  1267.      * IDirect3DRMAnimation2 methods
  1268.      */
  1269.     STDMETHOD(SetOptions)(THIS_ D3DRMANIMATIONOPTIONS flags) PURE;
  1270.     STDMETHOD(AddRotateKey)(THIS_ D3DVALUE time, D3DRMQUATERNION *q) PURE;
  1271.     STDMETHOD(AddPositionKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  1272.     STDMETHOD(AddScaleKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE;
  1273.     STDMETHOD(DeleteKey)(THIS_ D3DVALUE time) PURE;
  1274.     STDMETHOD(SetFrame)(THIS_ LPDIRECT3DRMFRAME3 frame) PURE;
  1275.     STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE;
  1276.     STDMETHOD_(D3DRMANIMATIONOPTIONS, GetOptions)(THIS) PURE;
  1277.     STDMETHOD(GetFrame)(THIS_ LPDIRECT3DRMFRAME3 *lpD3DFrame) PURE;
  1278.     STDMETHOD(DeleteKeyByID)(THIS_ DWORD dwID) PURE;
  1279.     STDMETHOD(AddKey)(THIS_ LPD3DRMANIMATIONKEY lpKey) PURE;
  1280.     STDMETHOD(ModifyKey)(THIS_ LPD3DRMANIMATIONKEY lpKey) PURE;
  1281.     STDMETHOD(GetKeys)(THIS_ D3DVALUE dvTimeMin,
  1282.        D3DVALUE dvTimeMax, LPDWORD lpdwNumKeys,
  1283.        LPD3DRMANIMATIONKEY lpKey);
  1284. };
  1285. #undef INTERFACE
  1286. #define INTERFACE IDirect3DRMAnimationSet
  1287. DECLARE_INTERFACE_(IDirect3DRMAnimationSet, IDirect3DRMObject)
  1288. {
  1289.     IUNKNOWN_METHODS(PURE);
  1290.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1291.     /*
  1292.      * IDirect3DRMAnimationSet methods
  1293.      */
  1294.     STDMETHOD(AddAnimation)(THIS_ LPDIRECT3DRMANIMATION aid) PURE;
  1295.     STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg, LPDIRECT3DRMFRAME parent)PURE;
  1296.     STDMETHOD(DeleteAnimation)(THIS_ LPDIRECT3DRMANIMATION aid) PURE;
  1297.     STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE;
  1298. };
  1299. #undef INTERFACE
  1300. #define INTERFACE IDirect3DRMAnimationSet2
  1301. DECLARE_INTERFACE_(IDirect3DRMAnimationSet2, IDirect3DRMObject)
  1302. {
  1303.     IUNKNOWN_METHODS(PURE);
  1304.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1305.     /*
  1306.      * IDirect3DRMAnimationSet2 methods
  1307.      */
  1308.     STDMETHOD(AddAnimation)(THIS_ LPDIRECT3DRMANIMATION2 aid) PURE;
  1309.     STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURE3CALLBACK, LPVOID lpArg, LPDIRECT3DRMFRAME3 parent)PURE;
  1310.     STDMETHOD(DeleteAnimation)(THIS_ LPDIRECT3DRMANIMATION2 aid) PURE;
  1311.     STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE;
  1312.     STDMETHOD(GetAnimations)(THIS_ LPDIRECT3DRMANIMATIONARRAY *) PURE;
  1313. };
  1314. #undef INTERFACE
  1315. #define INTERFACE IDirect3DRMUserVisual
  1316. DECLARE_INTERFACE_(IDirect3DRMUserVisual, IDirect3DRMVisual)
  1317. {
  1318.     IUNKNOWN_METHODS(PURE);
  1319.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1320.     /*
  1321.      * IDirect3DRMUserVisual methods
  1322.      */
  1323.     STDMETHOD(Init)(THIS_ D3DRMUSERVISUALCALLBACK fn, void *arg) PURE;
  1324. };
  1325. #undef INTERFACE
  1326. #define INTERFACE IDirect3DRMArray
  1327. DECLARE_INTERFACE_(IDirect3DRMArray, IUnknown)
  1328. {
  1329.     IUNKNOWN_METHODS(PURE);
  1330.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  1331.     /* No GetElement method as it would get overloaded
  1332.      * in derived classes, and overloading is
  1333.      * a no-no in COM
  1334.      */
  1335. };
  1336. #undef INTERFACE
  1337. #define INTERFACE IDirect3DRMObjectArray
  1338. DECLARE_INTERFACE_(IDirect3DRMObjectArray, IDirect3DRMArray)
  1339. {
  1340.     IUNKNOWN_METHODS(PURE);
  1341.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  1342.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMOBJECT *) PURE;
  1343. };
  1344. #undef INTERFACE
  1345. #define INTERFACE IDirect3DRMDeviceArray
  1346. DECLARE_INTERFACE_(IDirect3DRMDeviceArray, IDirect3DRMArray)
  1347. {
  1348.     IUNKNOWN_METHODS(PURE);
  1349.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  1350.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMDEVICE *) PURE;
  1351. };
  1352. #undef INTERFACE
  1353. #define INTERFACE IDirect3DRMFrameArray
  1354. DECLARE_INTERFACE_(IDirect3DRMFrameArray, IDirect3DRMArray)
  1355. {
  1356.     IUNKNOWN_METHODS(PURE);
  1357.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  1358.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMFRAME *) PURE;
  1359. };
  1360. #undef INTERFACE
  1361. #define INTERFACE IDirect3DRMViewportArray
  1362. DECLARE_INTERFACE_(IDirect3DRMViewportArray, IDirect3DRMArray)
  1363. {
  1364.     IUNKNOWN_METHODS(PURE);
  1365.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  1366.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMVIEWPORT *) PURE;
  1367. };
  1368. #undef INTERFACE
  1369. #define INTERFACE IDirect3DRMVisualArray
  1370. DECLARE_INTERFACE_(IDirect3DRMVisualArray, IDirect3DRMArray)
  1371. {
  1372.     IUNKNOWN_METHODS(PURE);
  1373.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  1374.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMVISUAL *) PURE;
  1375. };
  1376. #undef INTERFACE
  1377. #define INTERFACE IDirect3DRMAnimationArray
  1378. DECLARE_INTERFACE_(IDirect3DRMAnimationArray, IDirect3DRMArray)
  1379. {
  1380.     IUNKNOWN_METHODS(PURE);
  1381.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  1382.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMANIMATION2 *) PURE;
  1383. };
  1384. #undef INTERFACE
  1385. #define INTERFACE IDirect3DRMPickedArray
  1386. DECLARE_INTERFACE_(IDirect3DRMPickedArray, IDirect3DRMArray)
  1387. {
  1388.     IUNKNOWN_METHODS(PURE);
  1389.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  1390.     STDMETHOD(GetPick)(THIS_ DWORD index, LPDIRECT3DRMVISUAL *, LPDIRECT3DRMFRAMEARRAY *, LPD3DRMPICKDESC) PURE;
  1391. };
  1392. #undef INTERFACE
  1393. #define INTERFACE IDirect3DRMLightArray
  1394. DECLARE_INTERFACE_(IDirect3DRMLightArray, IDirect3DRMArray)
  1395. {
  1396.     IUNKNOWN_METHODS(PURE);
  1397.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  1398.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMLIGHT *) PURE;
  1399. };
  1400. #undef INTERFACE
  1401. #define INTERFACE IDirect3DRMFaceArray
  1402. DECLARE_INTERFACE_(IDirect3DRMFaceArray, IDirect3DRMArray)
  1403. {
  1404.     IUNKNOWN_METHODS(PURE);
  1405.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  1406.     STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMFACE *) PURE;
  1407. };
  1408. #undef INTERFACE
  1409. #define INTERFACE IDirect3DRMPicked2Array
  1410. DECLARE_INTERFACE_(IDirect3DRMPicked2Array, IDirect3DRMArray)
  1411. {
  1412.     IUNKNOWN_METHODS(PURE);
  1413.     STDMETHOD_(DWORD, GetSize)(THIS) PURE;
  1414.     STDMETHOD(GetPick)(THIS_ DWORD index, LPDIRECT3DRMVISUAL *, LPDIRECT3DRMFRAMEARRAY *, LPD3DRMPICKDESC2) PURE;
  1415. };
  1416. #undef INTERFACE
  1417. #define INTERFACE IDirect3DRMInterpolator
  1418. DECLARE_INTERFACE_(IDirect3DRMInterpolator, IDirect3DRMObject)
  1419. {
  1420.     IUNKNOWN_METHODS(PURE);
  1421.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1422.     /*
  1423.      * IDirect3DRMInterpolator methods
  1424.      */
  1425.     STDMETHOD(AttachObject)(THIS_ LPDIRECT3DRMOBJECT) PURE;
  1426.     STDMETHOD(GetAttachedObjects)(THIS_ LPDIRECT3DRMOBJECTARRAY *) PURE;
  1427.     STDMETHOD(DetachObject)(THIS_ LPDIRECT3DRMOBJECT) PURE;
  1428.     STDMETHOD(SetIndex)(THIS_ D3DVALUE) PURE;
  1429.     STDMETHOD_(D3DVALUE, GetIndex)(THIS) PURE;
  1430.     STDMETHOD(Interpolate)(THIS_ D3DVALUE, LPDIRECT3DRMOBJECT, D3DRMINTERPOLATIONOPTIONS) PURE;
  1431. };
  1432. #undef INTERFACE
  1433. #define INTERFACE IDirect3DRMClippedVisual
  1434. DECLARE_INTERFACE_(IDirect3DRMClippedVisual, IDirect3DRMVisual)
  1435. {
  1436.     IUNKNOWN_METHODS(PURE);
  1437.     IDIRECT3DRMOBJECT_METHODS(PURE);
  1438.     /*
  1439.      * IDirect3DRMClippedVisual methods
  1440.      */
  1441.     STDMETHOD(Init) (THIS_ LPDIRECT3DRMVISUAL) PURE;
  1442.     STDMETHOD(AddPlane) (THIS_ LPDIRECT3DRMFRAME3, LPD3DVECTOR, LPD3DVECTOR, DWORD, LPDWORD) PURE;
  1443.     STDMETHOD(DeletePlane)(THIS_ DWORD, DWORD) PURE;
  1444.     STDMETHOD(GetPlaneIDs)(THIS_ LPDWORD, LPDWORD, DWORD) PURE;
  1445.     STDMETHOD(GetPlane) (THIS_ DWORD, LPDIRECT3DRMFRAME3, LPD3DVECTOR, LPD3DVECTOR, DWORD) PURE;
  1446.     STDMETHOD(SetPlane) (THIS_ DWORD, LPDIRECT3DRMFRAME3, LPD3DVECTOR, LPD3DVECTOR, DWORD) PURE;
  1447. };
  1448. #ifdef __cplusplus
  1449. };
  1450. #endif
  1451. #endif /* _D3DRMOBJ_H_ */