Source code of Windows XP (NT5)
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.

417 lines
15 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1999
  6. //
  7. // File: d3drmframe3obj.h
  8. //
  9. //--------------------------------------------------------------------------
  10. // d3drmFrameObj.h : Declaration of the C_dxj_Direct3dRMFrame3Object
  11. #include "resource.h" // main symbols
  12. #include "d3drmObjectObj.h"
  13. #include "d3drmPick2ArrayObj.h"
  14. #define typedef__dxj_Direct3dRMFrame3 LPDIRECT3DRMFRAME3
  15. /////////////////////////////////////////////////////////////////////////////
  16. // Direct
  17. //REVIEW -- using pointers to ID's is necessary because some compilers don't like
  18. //references as template arguments.
  19. // public CComCoClass<Cproj3, &CLSID_proj3>,
  20. class C_dxj_Direct3dRMFrame3Object :
  21. public CComObjectRoot,
  22. public I_dxj_Direct3dRMFrame3,
  23. public I_dxj_Direct3dRMObject,
  24. public I_dxj_Direct3dRMVisual
  25. {
  26. public:
  27. BEGIN_COM_MAP(C_dxj_Direct3dRMFrame3Object)
  28. COM_INTERFACE_ENTRY(I_dxj_Direct3dRMFrame3)
  29. COM_INTERFACE_ENTRY(I_dxj_Direct3dRMObject)
  30. COM_INTERFACE_ENTRY(I_dxj_Direct3dRMVisual)
  31. END_COM_MAP()
  32. C_dxj_Direct3dRMFrame3Object();
  33. virtual ~C_dxj_Direct3dRMFrame3Object();
  34. DECLARE_AGGREGATABLE(C_dxj_Direct3dRMFrame3Object)
  35. // I_dxj_Direct3dRMFrame3
  36. public:
  37. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalSetObject(
  38. /* [in] */ IUnknown __RPC_FAR *lpdd);
  39. /* [hidden] */ HRESULT STDMETHODCALLTYPE InternalGetObject(
  40. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *lpdd);
  41. HRESULT STDMETHODCALLTYPE addDestroyCallback(
  42. /* [in] */ I_dxj_Direct3dRMCallback __RPC_FAR *fn,
  43. /* [in] */ IUnknown __RPC_FAR *arg);
  44. HRESULT STDMETHODCALLTYPE deleteDestroyCallback(
  45. /* [in] */ I_dxj_Direct3dRMCallback __RPC_FAR *fn,
  46. /* [in] */ IUnknown __RPC_FAR *args);
  47. HRESULT STDMETHODCALLTYPE clone(
  48. /* [retval][out] */ IUnknown __RPC_FAR *__RPC_FAR *retv);
  49. HRESULT STDMETHODCALLTYPE setAppData(
  50. /* [in] */ long data);
  51. HRESULT STDMETHODCALLTYPE getAppData(
  52. /* [retval][out] */ long __RPC_FAR *data);
  53. HRESULT STDMETHODCALLTYPE setName(
  54. /* [in] */ BSTR name);
  55. HRESULT STDMETHODCALLTYPE getName(
  56. /* [retval][out] */ BSTR __RPC_FAR *name);
  57. HRESULT STDMETHODCALLTYPE getClassName(
  58. /* [retval][out] */ BSTR __RPC_FAR *name);
  59. HRESULT STDMETHODCALLTYPE addVisual(
  60. /* [in] */ I_dxj_Direct3dRMVisual __RPC_FAR *v);
  61. HRESULT STDMETHODCALLTYPE deleteVisual(
  62. /* [in] */ I_dxj_Direct3dRMVisual __RPC_FAR *v);
  63. HRESULT STDMETHODCALLTYPE addLight(
  64. /* [in] */ I_dxj_Direct3dRMLight __RPC_FAR *val);
  65. HRESULT STDMETHODCALLTYPE deleteLight(
  66. /* [in] */ I_dxj_Direct3dRMLight __RPC_FAR *l);
  67. HRESULT STDMETHODCALLTYPE addChild(
  68. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *child);
  69. HRESULT STDMETHODCALLTYPE deleteChild(
  70. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *c);
  71. HRESULT STDMETHODCALLTYPE getTransform(
  72. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *referenceFrame,
  73. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *val);
  74. HRESULT STDMETHODCALLTYPE addTransform(
  75. /* [in] */ d3drmCombineType t,
  76. /* [in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *val);
  77. HRESULT STDMETHODCALLTYPE addTranslation(
  78. /* [in] */ d3drmCombineType t,
  79. /* [in] */ float x,
  80. /* [in] */ float y,
  81. /* [in] */ float z);
  82. HRESULT STDMETHODCALLTYPE addScale(
  83. /* [in] */ d3drmCombineType combineType,
  84. /* [in] */ float sx,
  85. /* [in] */ float sy,
  86. /* [in] */ float sz);
  87. HRESULT STDMETHODCALLTYPE addRotation(
  88. /* [in] */ d3drmCombineType combineType,
  89. /* [in] */ float x,
  90. /* [in] */ float y,
  91. /* [in] */ float z,
  92. /* [in] */ float theta);
  93. HRESULT STDMETHODCALLTYPE addMoveCallback(
  94. /* [in] */ I_dxj_Direct3dRMFrameMoveCallback3 __RPC_FAR *frameMoveImplementation,
  95. /* [in] */ IUnknown __RPC_FAR *userArgument,
  96. /* [in] */ long flags);
  97. HRESULT STDMETHODCALLTYPE deleteMoveCallback(
  98. /* [in] */ I_dxj_Direct3dRMFrameMoveCallback3 __RPC_FAR *frameMoveImplementation,
  99. /* [in] */ IUnknown __RPC_FAR *userArgument);
  100. HRESULT STDMETHODCALLTYPE transform(
  101. /* [out][in] */ D3dVector __RPC_FAR *d,
  102. /* [in] */ D3dVector __RPC_FAR *s);
  103. HRESULT STDMETHODCALLTYPE transformVectors(
  104. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *reference,
  105. /* [in] */ long num,
  106. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *DstVectors,
  107. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *SrcVectors);
  108. HRESULT STDMETHODCALLTYPE inverseTransform(
  109. /* [out][in] */ D3dVector __RPC_FAR *d,
  110. /* [in] */ D3dVector __RPC_FAR *s);
  111. HRESULT STDMETHODCALLTYPE inverseTransformVectors(
  112. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *reference,
  113. /* [in] */ long num,
  114. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *DstVectors,
  115. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *SrcVectors);
  116. HRESULT STDMETHODCALLTYPE getAxes(
  117. /* [out][in] */ D3dVector __RPC_FAR *dir,
  118. /* [out][in] */ D3dVector __RPC_FAR *up);
  119. HRESULT STDMETHODCALLTYPE getBox(
  120. /* [out][in] */ D3dRMBox __RPC_FAR *box);
  121. HRESULT STDMETHODCALLTYPE getBoxEnable(
  122. /* [retval][out] */ long __RPC_FAR *b);
  123. HRESULT STDMETHODCALLTYPE getChildren(
  124. /* [retval][out] */ I_dxj_Direct3dRMFrameArray __RPC_FAR *__RPC_FAR *children);
  125. HRESULT STDMETHODCALLTYPE getColor(
  126. /* [retval][out] */ d3dcolor __RPC_FAR *retv);
  127. HRESULT STDMETHODCALLTYPE getHierarchyBox(
  128. /* [out][in] */ D3dRMBox __RPC_FAR *box);
  129. HRESULT STDMETHODCALLTYPE getInheritAxes(
  130. /* [retval][out] */ long __RPC_FAR *b);
  131. HRESULT STDMETHODCALLTYPE getLights(
  132. /* [retval][out] */ I_dxj_Direct3dRMLightArray __RPC_FAR *__RPC_FAR *lights);
  133. HRESULT STDMETHODCALLTYPE getMaterial(
  134. I_dxj_Direct3dRMMaterial2 __RPC_FAR *__RPC_FAR *ret);
  135. HRESULT STDMETHODCALLTYPE getMaterialMode(
  136. /* [retval][out] */ d3drmMaterialMode __RPC_FAR *retv);
  137. HRESULT STDMETHODCALLTYPE getOrientation(
  138. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *ref,
  139. /* [out][in] */ D3dVector __RPC_FAR *dir,
  140. /* [out][in] */ D3dVector __RPC_FAR *up);
  141. HRESULT STDMETHODCALLTYPE getMaterialOverride(
  142. /* [out][in] */ D3dMaterialOverride __RPC_FAR *override);
  143. HRESULT STDMETHODCALLTYPE getMaterialOverrideTexture(
  144. /* [retval][out] */ I_dxj_Direct3dRMTexture3 __RPC_FAR *__RPC_FAR *ret);
  145. HRESULT STDMETHODCALLTYPE getParent(
  146. /* [retval][out] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *__RPC_FAR *retv);
  147. HRESULT STDMETHODCALLTYPE getPosition(
  148. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *ref,
  149. /* [out][in] */ D3dVector __RPC_FAR *position);
  150. HRESULT STDMETHODCALLTYPE getRotation(
  151. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *ref,
  152. /* [out][in] */ D3dVector __RPC_FAR *axis,
  153. /* [out] */ float __RPC_FAR *theta);
  154. HRESULT STDMETHODCALLTYPE getScene(
  155. /* [retval][out] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *__RPC_FAR *retv);
  156. HRESULT STDMETHODCALLTYPE getSceneBackground(
  157. /* [retval][out] */ d3dcolor __RPC_FAR *retv);
  158. HRESULT STDMETHODCALLTYPE getSceneBackgroundDepth(
  159. /* [retval][out] */ I_dxj_DirectDrawSurface7 __RPC_FAR *__RPC_FAR *retv);
  160. HRESULT STDMETHODCALLTYPE getSceneFogColor(
  161. /* [retval][out] */ d3dcolor __RPC_FAR *retv);
  162. HRESULT STDMETHODCALLTYPE getSceneFogEnable(
  163. /* [retval][out] */ long __RPC_FAR *enable);
  164. HRESULT STDMETHODCALLTYPE getSceneFogMode(
  165. /* [retval][out] */ long __RPC_FAR *retv);
  166. HRESULT STDMETHODCALLTYPE getSceneFogMethod(
  167. /* [retval][out] */ long __RPC_FAR *method);
  168. HRESULT STDMETHODCALLTYPE getSceneFogParams(
  169. /* [out][in] */ float __RPC_FAR *start,
  170. /* [out][in] */ float __RPC_FAR *end,
  171. /* [out][in] */ float __RPC_FAR *density);
  172. HRESULT STDMETHODCALLTYPE getSortMode(
  173. /* [retval][out] */ d3drmSortMode __RPC_FAR *retv);
  174. HRESULT STDMETHODCALLTYPE getTexture(
  175. /* [retval][out] */ I_dxj_Direct3dRMTexture3 __RPC_FAR *__RPC_FAR *ref);
  176. HRESULT STDMETHODCALLTYPE getVelocity(
  177. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *ref,
  178. /* [out][in] */ D3dVector __RPC_FAR *vel,
  179. /* [in] */ long includeRotationalVelocity);
  180. HRESULT STDMETHODCALLTYPE getVisuals(
  181. /* [retval][out] */ I_dxj_Direct3dRMVisualArray __RPC_FAR *__RPC_FAR *visuals);
  182. HRESULT STDMETHODCALLTYPE getVisual(
  183. /* [in] */ long index,
  184. /* [retval][out] */ I_dxj_Direct3dRMVisual __RPC_FAR *__RPC_FAR *visualArray);
  185. HRESULT STDMETHODCALLTYPE getVisualCount(
  186. /* [retval][out] */ long __RPC_FAR *vis);
  187. HRESULT STDMETHODCALLTYPE getTraversalOptions(
  188. /* [retval][out] */ long __RPC_FAR *ret);
  189. HRESULT STDMETHODCALLTYPE getZBufferMode(
  190. /* [retval][out] */ long __RPC_FAR *ret);
  191. HRESULT STDMETHODCALLTYPE loadFromFile(
  192. /* [in] */ BSTR filename,
  193. /* [in] */ VARIANT id,
  194. /* [in] */ long flags,
  195. /* [in] */ I_dxj_Direct3dRMLoadTextureCallback3 __RPC_FAR *loadTextureImplementation,
  196. /* [in] */ IUnknown __RPC_FAR *userArgument);
  197. HRESULT STDMETHODCALLTYPE lookAt(
  198. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *tgt,
  199. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *reference,
  200. /* [in] */ d3drmFrameConstraint contraint);
  201. HRESULT STDMETHODCALLTYPE move(
  202. /* [in] */ float delta);
  203. HRESULT STDMETHODCALLTYPE rayPick(
  204. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *refer,
  205. /* [in] */ D3dRMRay __RPC_FAR *ray,
  206. /* [in] */ long flags,
  207. /* [retval][out] */ I_dxj_Direct3dRMPick2Array __RPC_FAR *__RPC_FAR *retv);
  208. HRESULT STDMETHODCALLTYPE save(
  209. /* [in] */ BSTR name,
  210. /* [in] */ d3drmXofFormat format,
  211. /* [in] */ d3drmSaveFlags flags);
  212. HRESULT STDMETHODCALLTYPE setAxes(
  213. /* [in] */ float dx,
  214. /* [in] */ float dy,
  215. /* [in] */ float dz,
  216. /* [in] */ float ux,
  217. /* [in] */ float uy,
  218. /* [in] */ float uz);
  219. HRESULT STDMETHODCALLTYPE setBox(
  220. /* [in] */ D3dRMBox __RPC_FAR *box);
  221. HRESULT STDMETHODCALLTYPE setBoxEnable(
  222. /* [in] */ long boxEnable);
  223. HRESULT STDMETHODCALLTYPE setColor(
  224. /* [in] */ d3dcolor c);
  225. HRESULT STDMETHODCALLTYPE setColorRGB(
  226. /* [in] */ float r,
  227. /* [in] */ float g,
  228. /* [in] */ float b);
  229. HRESULT STDMETHODCALLTYPE setInheritAxes(
  230. /* [in] */ long inheritFromParent);
  231. HRESULT STDMETHODCALLTYPE setMaterial(
  232. /* [in] */ I_dxj_Direct3dRMMaterial2 __RPC_FAR *mat);
  233. HRESULT STDMETHODCALLTYPE setMaterialMode(
  234. /* [in] */ d3drmMaterialMode val);
  235. HRESULT STDMETHODCALLTYPE setMaterialOverride(
  236. /* [out][in] */ D3dMaterialOverride __RPC_FAR *override);
  237. HRESULT STDMETHODCALLTYPE setMaterialOverrideTexture(
  238. /* [in] */ I_dxj_Direct3dRMTexture3 __RPC_FAR *tex);
  239. HRESULT STDMETHODCALLTYPE setOrientation(
  240. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *reference,
  241. /* [in] */ float dx,
  242. /* [in] */ float dy,
  243. /* [in] */ float dz,
  244. /* [in] */ float ux,
  245. /* [in] */ float uy,
  246. /* [in] */ float uz);
  247. HRESULT STDMETHODCALLTYPE setPosition(
  248. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *reference,
  249. /* [in] */ float x,
  250. /* [in] */ float y,
  251. /* [in] */ float z);
  252. HRESULT STDMETHODCALLTYPE setQuaternion(
  253. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *reference,
  254. D3dRMQuaternion __RPC_FAR *quat);
  255. HRESULT STDMETHODCALLTYPE setRotation(
  256. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *reference,
  257. /* [in] */ float x,
  258. /* [in] */ float y,
  259. /* [in] */ float z,
  260. /* [in] */ float theta);
  261. HRESULT STDMETHODCALLTYPE setSceneBackground(
  262. /* [in] */ d3dcolor c);
  263. HRESULT STDMETHODCALLTYPE setSceneBackgroundDepth(
  264. /* [in] */ I_dxj_DirectDrawSurface7 __RPC_FAR *s);
  265. HRESULT STDMETHODCALLTYPE setSceneBackgroundImage(
  266. /* [in] */ I_dxj_Direct3dRMTexture3 __RPC_FAR *i);
  267. HRESULT STDMETHODCALLTYPE setSceneBackgroundRGB(
  268. /* [in] */ float r,
  269. /* [in] */ float g,
  270. /* [in] */ float b);
  271. HRESULT STDMETHODCALLTYPE setSceneFogColor(
  272. /* [in] */ d3dcolor c);
  273. HRESULT STDMETHODCALLTYPE setSceneFogEnable(
  274. /* [in] */ long enable);
  275. HRESULT STDMETHODCALLTYPE setSceneFogMethod(
  276. /* [in] */ long method);
  277. HRESULT STDMETHODCALLTYPE setSceneFogMode(
  278. /* [in] */ long c);
  279. HRESULT STDMETHODCALLTYPE setSceneFogParams(
  280. /* [in] */ float start,
  281. /* [in] */ float end,
  282. /* [in] */ float density);
  283. HRESULT STDMETHODCALLTYPE setSortMode(
  284. /* [in] */ d3drmSortMode val);
  285. HRESULT STDMETHODCALLTYPE setTexture(
  286. /* [in] */ I_dxj_Direct3dRMTexture3 __RPC_FAR *t);
  287. HRESULT STDMETHODCALLTYPE setTraversalOptions(
  288. /* [in] */ long flags);
  289. HRESULT STDMETHODCALLTYPE setVelocity(
  290. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *reference,
  291. /* [in] */ float x,
  292. /* [in] */ float y,
  293. /* [in] */ float z,
  294. /* [in] */ long with_rotation);
  295. HRESULT STDMETHODCALLTYPE setZbufferMode(
  296. /* [in] */ d3drmZbufferMode val);
  297. ////////////////////////////////////////////////////////////////////////////////////
  298. //
  299. // note: this is public for the callbacks
  300. DECL_VARIABLE(_dxj_Direct3dRMFrame3);
  301. private:
  302. public:
  303. DX3J_GLOBAL_LINKS( _dxj_Direct3dRMFrame3 )
  304. };