Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

315 lines
12 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: d3drmmeshbuilder3obj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // d3drmMeshBuilderObj.h : Declaration of the C_dxj_Direct3dRMMeshBuilderObject
  11. #include "resource.h" // main symbols
  12. #include "d3drmObjectObj.h"
  13. #define typedef__dxj_Direct3dRMMeshBuilder3 LPDIRECT3DRMMESHBUILDER3
  14. /////////////////////////////////////////////////////////////////////////////
  15. // Direct
  16. //REVIEW -- using pointers to ID's is necessary because some compilers don't like
  17. //references as template arguments.
  18. class C_dxj_Direct3dRMMeshBuilder3Object :
  19. public I_dxj_Direct3dRMMeshBuilder3,
  20. public I_dxj_Direct3dRMObject,
  21. public I_dxj_Direct3dRMVisual,
  22. //public CComCoClass<C_dxj_Direct3dRMMeshBuilder3Object, &CLSID__dxj_Direct3dRMMeshBuilder3>,
  23. public CComObjectRoot
  24. {
  25. public:
  26. C_dxj_Direct3dRMMeshBuilder3Object();
  27. virtual ~C_dxj_Direct3dRMMeshBuilder3Object();
  28. BEGIN_COM_MAP(C_dxj_Direct3dRMMeshBuilder3Object)
  29. COM_INTERFACE_ENTRY(I_dxj_Direct3dRMMeshBuilder3)
  30. COM_INTERFACE_ENTRY(I_dxj_Direct3dRMObject)
  31. COM_INTERFACE_ENTRY(I_dxj_Direct3dRMVisual)
  32. END_COM_MAP()
  33. DECLARE_AGGREGATABLE(C_dxj_Direct3dRMMeshBuilder3Object)
  34. // I_dxj_Direct3dRMMeshBuilder
  35. public:
  36. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  37. /* [in] */ IUnknown __RPC_FAR *lpdd);
  38. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  39. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  40. HRESULT STDMETHODCALLTYPE addDestroyCallback(
  41. /* [in] */ I_dxj_Direct3dRMCallback __RPC_FAR *fn,
  42. /* [in] */ IUnknown __RPC_FAR *arg);
  43. HRESULT STDMETHODCALLTYPE deleteDestroyCallback(
  44. /* [in] */ I_dxj_Direct3dRMCallback __RPC_FAR *fn,
  45. /* [in] */ IUnknown __RPC_FAR *args);
  46. HRESULT STDMETHODCALLTYPE clone(
  47. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *retv);
  48. HRESULT STDMETHODCALLTYPE setAppData(
  49. /* [in] */ long data);
  50. HRESULT STDMETHODCALLTYPE getAppData(
  51. /* [retval][out] */ long __RPC_FAR *data);
  52. HRESULT STDMETHODCALLTYPE setName(
  53. /* [in] */ BSTR name);
  54. HRESULT STDMETHODCALLTYPE getName(
  55. /* [retval][out] */ BSTR __RPC_FAR *name);
  56. HRESULT STDMETHODCALLTYPE getClassName(
  57. /* [retval][out] */ BSTR __RPC_FAR *name);
  58. HRESULT STDMETHODCALLTYPE addFace(
  59. /* [in] */ I_dxj_Direct3dRMFace2 __RPC_FAR *f);
  60. HRESULT STDMETHODCALLTYPE addFaces(
  61. /* [in] */ long vc,
  62. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *verexArray,
  63. /* [in] */ long nc,
  64. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *normalArray,
  65. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *data,
  66. /* [retval][out] */ I_dxj_Direct3dRMFaceArray __RPC_FAR *__RPC_FAR *array);
  67. HRESULT STDMETHODCALLTYPE addFacesIndexed(
  68. /* [in] */ long flags,
  69. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *indexArray,
  70. /* [retval][out] */ long __RPC_FAR *newFaceIndex);
  71. HRESULT STDMETHODCALLTYPE addFrame(
  72. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *f);
  73. HRESULT STDMETHODCALLTYPE addMesh(
  74. /* [in] */ I_dxj_Direct3dRMMesh __RPC_FAR *m);
  75. HRESULT STDMETHODCALLTYPE addMeshBuilder(
  76. /* [in] */ I_dxj_Direct3dRMMeshBuilder3 __RPC_FAR *mb, long flags);
  77. HRESULT STDMETHODCALLTYPE addNormal(
  78. /* [in] */ float x,
  79. /* [in] */ float y,
  80. /* [in] */ float z,
  81. /* [retval][out] */ int __RPC_FAR *index);
  82. HRESULT STDMETHODCALLTYPE addTriangles(
  83. /* [in] */ long format,
  84. /* [in] */ long vertexcount,
  85. /* [in] */ void __RPC_FAR *data);
  86. HRESULT STDMETHODCALLTYPE addVertex(
  87. /* [in] */ float x,
  88. /* [in] */ float y,
  89. /* [in] */ float z,
  90. /* [retval][out] */ int __RPC_FAR *index);
  91. HRESULT STDMETHODCALLTYPE createFace(
  92. /* [retval][out] */ I_dxj_Direct3dRMFace2 __RPC_FAR *__RPC_FAR *retv);
  93. HRESULT STDMETHODCALLTYPE createMesh(
  94. /* [retval][out] */ I_dxj_Direct3dRMMesh __RPC_FAR *__RPC_FAR *retv);
  95. HRESULT STDMETHODCALLTYPE createSubMesh(
  96. /* [retval][out] */ I_dxj_Direct3dRMMeshBuilder3 __RPC_FAR *__RPC_FAR *retv);
  97. HRESULT STDMETHODCALLTYPE deleteFace(
  98. /* [in] */ I_dxj_Direct3dRMFace2 __RPC_FAR *face);
  99. HRESULT STDMETHODCALLTYPE deleteNormals(
  100. /* [in] */ long id, long count);
  101. HRESULT STDMETHODCALLTYPE deleteSubMesh(
  102. /* [in] */ I_dxj_Direct3dRMMeshBuilder3 __RPC_FAR *mesh);
  103. HRESULT STDMETHODCALLTYPE deleteVertices(
  104. /* [in] */ long id, long count);
  105. HRESULT STDMETHODCALLTYPE empty();
  106. HRESULT STDMETHODCALLTYPE enableMesh(
  107. /* [in] */ long flags);
  108. HRESULT STDMETHODCALLTYPE generateNormals(
  109. float angle,
  110. long flags);
  111. HRESULT STDMETHODCALLTYPE getBox(
  112. /* [out][in] */ D3dRMBox __RPC_FAR *retv);
  113. HRESULT STDMETHODCALLTYPE getColorSource(
  114. /* [retval][out] */ d3drmColorSource __RPC_FAR *data);
  115. HRESULT STDMETHODCALLTYPE getEnable(
  116. /* [retval][out] */ long __RPC_FAR *flags);
  117. HRESULT STDMETHODCALLTYPE getFace(
  118. /* [in] */ long id,
  119. /* [retval][out] */ I_dxj_Direct3dRMFace2 __RPC_FAR *__RPC_FAR *retv);
  120. HRESULT STDMETHODCALLTYPE getFaceCount(
  121. /* [retval][out] */ int __RPC_FAR *retv);
  122. HRESULT STDMETHODCALLTYPE getFaces(
  123. /* [retval][out] */ I_dxj_Direct3dRMFaceArray __RPC_FAR *__RPC_FAR *retv);
  124. HRESULT STDMETHODCALLTYPE getGeometry(
  125. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *verexArray,
  126. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *normalArray,
  127. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *faceData);
  128. HRESULT STDMETHODCALLTYPE getNormal(
  129. /* [in] */ long __MIDL_0016,
  130. /* [out][in] */ D3dVector __RPC_FAR *desc);
  131. HRESULT STDMETHODCALLTYPE getNormalCount(
  132. /* [retval][out] */ long __RPC_FAR *n_cnt);
  133. HRESULT STDMETHODCALLTYPE getParentMesh(
  134. /* [in] */ long flags,
  135. /* [retval][out] */ I_dxj_Direct3dRMMeshBuilder3 __RPC_FAR **vis);
  136. HRESULT STDMETHODCALLTYPE getPerspective(
  137. /* [retval][out] */ long __RPC_FAR *retv);
  138. HRESULT STDMETHODCALLTYPE getQuality(
  139. /* [retval][out] */ d3drmRenderQuality __RPC_FAR *retv);
  140. HRESULT STDMETHODCALLTYPE getSubMeshes(
  141. /* [in] */ long count,
  142. /* [retval][out] */ SAFEARRAY **ppsa);
  143. HRESULT STDMETHODCALLTYPE getSubMeshCount(
  144. /* [retval][out] */ long __RPC_FAR *count);
  145. HRESULT STDMETHODCALLTYPE getTextureCoordinates(
  146. /* [in] */ long idx,
  147. /* [out][in] */ float __RPC_FAR *u,
  148. /* [out][in] */ float __RPC_FAR *v);
  149. HRESULT STDMETHODCALLTYPE getVertex(
  150. /* [in] */ long id,
  151. /* [out][in] */ D3dVector __RPC_FAR *vec);
  152. HRESULT STDMETHODCALLTYPE getVertexColor(
  153. /* [in] */ long index,
  154. /* [retval][out] */ d3dcolor __RPC_FAR *retv);
  155. HRESULT STDMETHODCALLTYPE getVertexCount(
  156. /* [retval][out] */ int __RPC_FAR *retv);
  157. HRESULT STDMETHODCALLTYPE getFaceDataSize(
  158. /* [retval][out] */ long __RPC_FAR *f_cnt);
  159. HRESULT STDMETHODCALLTYPE loadFromFile(
  160. /* [in] */ BSTR filename,
  161. /* [in] */ VARIANT id,
  162. /* [in] */ long flags,
  163. /* [in] */ I_dxj_Direct3dRMLoadTextureCallback3 __RPC_FAR *c,
  164. /* [in] */ IUnknown __RPC_FAR *pUser);
  165. HRESULT STDMETHODCALLTYPE optimize();
  166. HRESULT STDMETHODCALLTYPE save(
  167. /* [in] */ BSTR fname,
  168. /* [in] */ d3drmXofFormat xFormat,
  169. /* [in] */ d3drmSaveFlags save);
  170. HRESULT STDMETHODCALLTYPE scaleMesh(
  171. /* [in] */ float sx,
  172. /* [in] */ float sy,
  173. /* [in] */ float sz);
  174. HRESULT STDMETHODCALLTYPE setColor(
  175. /* [in] */ d3dcolor col);
  176. HRESULT STDMETHODCALLTYPE setColorRGB(
  177. /* [in] */ float red,
  178. /* [in] */ float green,
  179. /* [in] */ float blue);
  180. HRESULT STDMETHODCALLTYPE setColorSource(
  181. /* [in] */ d3drmColorSource val);
  182. HRESULT STDMETHODCALLTYPE setMaterial(
  183. /* [in] */ I_dxj_Direct3dRMMaterial2 __RPC_FAR *mat);
  184. HRESULT STDMETHODCALLTYPE setNormal(
  185. /* [in] */ long idx,
  186. /* [in] */ float x,
  187. /* [in] */ float y,
  188. /* [in] */ float z);
  189. HRESULT STDMETHODCALLTYPE setPerspective(
  190. /* [in] */ long persp);
  191. HRESULT STDMETHODCALLTYPE setQuality(
  192. /* [in] */ d3drmRenderQuality q);
  193. HRESULT STDMETHODCALLTYPE setTexture(
  194. /* [in] */ I_dxj_Direct3dRMTexture3 __RPC_FAR *val);
  195. HRESULT STDMETHODCALLTYPE setTextureCoordinates(
  196. /* [in] */ long idx,
  197. /* [in] */ float u,
  198. /* [in] */ float v);
  199. HRESULT STDMETHODCALLTYPE setTextureTopology(
  200. /* [in] */ long wrap_u,
  201. /* [in] */ long wrap_v);
  202. HRESULT STDMETHODCALLTYPE setVertex(
  203. /* [in] */ long idx,
  204. /* [in] */ float x,
  205. /* [in] */ float y,
  206. /* [in] */ float z);
  207. HRESULT STDMETHODCALLTYPE setVertexColor(
  208. /* [in] */ long idx,
  209. /* [in] */ d3dcolor c);
  210. HRESULT STDMETHODCALLTYPE setVertexColorRGB(
  211. /* [in] */ long idx,
  212. /* [in] */ float r,
  213. /* [in] */ float g,
  214. /* [in] */ float b);
  215. HRESULT STDMETHODCALLTYPE translate(
  216. /* [in] */ float tx,
  217. /* [in] */ float ty,
  218. /* [in] */ float tz);
  219. /* [hidden] */ HRESULT STDMETHODCALLTYPE addFacesJava(
  220. /* [in] */ long vc,
  221. /* [in] */ float __RPC_FAR *ver,
  222. /* [in] */ long nc,
  223. /* [in] */ float __RPC_FAR *norm,
  224. /* [in] */ long __RPC_FAR *data,
  225. /* [retval][out] */ I_dxj_Direct3dRMFaceArray __RPC_FAR *__RPC_FAR *array);
  226. ////////////////////////////////////////////////////////////////////////////////////
  227. private:
  228. DECL_VARIABLE(_dxj_Direct3dRMMeshBuilder3);
  229. public:
  230. DX3J_GLOBAL_LINKS( _dxj_Direct3dRMMeshBuilder3 )
  231. };