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.

143 lines
4.2 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1998 - 1998
  6. //
  7. // File: d3drmclippedvisualobj.cpp
  8. //
  9. //--------------------------------------------------------------------------
  10. // d3dRMClippedVisualObj.cpp : Implementation of CDirectApp and DLL registration.
  11. #include "stdafx.h"
  12. #include "Direct.h"
  13. #include "dms.h"
  14. #include "d3dRMClippedVisualObj.h"
  15. CONSTRUCTOR(_dxj_Direct3dRMClippedVisual, {});
  16. DESTRUCTOR(_dxj_Direct3dRMClippedVisual, {});
  17. GETSET_OBJECT(_dxj_Direct3dRMClippedVisual);
  18. CLONE_R(_dxj_Direct3dRMClippedVisual,Direct3DRMClippedVisual);
  19. GETNAME_R(_dxj_Direct3dRMClippedVisual);
  20. SETNAME_R(_dxj_Direct3dRMClippedVisual);
  21. GETCLASSNAME_R(_dxj_Direct3dRMClippedVisual);
  22. ADDDESTROYCALLBACK_R(_dxj_Direct3dRMClippedVisual);
  23. DELETEDESTROYCALLBACK_R(_dxj_Direct3dRMClippedVisual);
  24. PASS_THROUGH_CAST_1_R(_dxj_Direct3dRMClippedVisual, setAppData, SetAppData, long,(DWORD));
  25. GET_DIRECT_R(_dxj_Direct3dRMClippedVisual, getAppData, GetAppData, long);
  26. //PASS_THROUGH_CAST_2_R(_dxj_Direct3dRMClippedVisual, deletePlane, DeletePlane, long,(DWORD),long,(DWORD));
  27. STDMETHODIMP C_dxj_Direct3dRMClippedVisualObject::deletePlane( long id) {
  28. HRESULT hr;
  29. hr = m__dxj_Direct3dRMClippedVisual->DeletePlane(id,0);
  30. return hr;
  31. }
  32. /////////////////////////////////////////////////////////////////////////////
  33. STDMETHODIMP C_dxj_Direct3dRMClippedVisualObject::addPlane(
  34. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *ref,
  35. /* [out][in] */ D3dVector __RPC_FAR *point,
  36. /* [out][in] */ D3dVector __RPC_FAR *normal,
  37. ///* [in] */ long flags,
  38. /* [retval][out] */ long __RPC_FAR *ret)
  39. {
  40. HRESULT hr;
  41. if (!point) return E_INVALIDARG;
  42. if (!normal) return E_INVALIDARG;
  43. DO_GETOBJECT_NOTNULL(LPDIRECT3DRMFRAME3,lpFrame,ref);
  44. hr = m__dxj_Direct3dRMClippedVisual->AddPlane(
  45. lpFrame,
  46. (D3DVECTOR*) point,
  47. (D3DVECTOR*) normal,
  48. (DWORD) 0,
  49. (DWORD*)ret);
  50. return hr;
  51. }
  52. /////////////////////////////////////////////////////////////////////////////
  53. STDMETHODIMP C_dxj_Direct3dRMClippedVisualObject::getPlane(
  54. /* [in] */ long id,
  55. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *ref,
  56. /* [out][in] */ D3dVector __RPC_FAR *point,
  57. /* [out][in] */ D3dVector __RPC_FAR *normal
  58. ///* [in] */ long flags
  59. )
  60. {
  61. HRESULT hr;
  62. if (!point) return E_INVALIDARG;
  63. if (!normal) return E_INVALIDARG;
  64. DO_GETOBJECT_NOTNULL(LPDIRECT3DRMFRAME3,lpFrame,ref);
  65. hr = m__dxj_Direct3dRMClippedVisual->GetPlane(
  66. (DWORD)id,
  67. lpFrame,
  68. (D3DVECTOR*) point,
  69. (D3DVECTOR*) normal,
  70. (DWORD) 0);
  71. return hr;
  72. }
  73. /////////////////////////////////////////////////////////////////////////////
  74. STDMETHODIMP C_dxj_Direct3dRMClippedVisualObject::setPlane(
  75. /* [in] */ long id,
  76. /* [in] */ I_dxj_Direct3dRMFrame3 __RPC_FAR *ref,
  77. /* [out][in] */ D3dVector __RPC_FAR *point,
  78. /* [out][in] */ D3dVector __RPC_FAR *normal
  79. ///* [in] */ long flags
  80. )
  81. {
  82. HRESULT hr;
  83. if (!point) return E_INVALIDARG;
  84. if (!normal) return E_INVALIDARG;
  85. DO_GETOBJECT_NOTNULL(LPDIRECT3DRMFRAME3,lpFrame,ref);
  86. hr = m__dxj_Direct3dRMClippedVisual->SetPlane(
  87. (DWORD)id,
  88. lpFrame,
  89. (D3DVECTOR*) point,
  90. (D3DVECTOR*) normal,
  91. (DWORD) 0);
  92. return hr;
  93. }
  94. /////////////////////////////////////////////////////////////////////////////
  95. STDMETHODIMP C_dxj_Direct3dRMClippedVisualObject::getPlaneIdsCount(
  96. /* [in] */ long *count)
  97. {
  98. HRESULT hr;
  99. hr = m__dxj_Direct3dRMClippedVisual->GetPlaneIDs((DWORD*)count,NULL,0);
  100. return hr;
  101. }
  102. /////////////////////////////////////////////////////////////////////////////
  103. STDMETHODIMP C_dxj_Direct3dRMClippedVisualObject::getPlaneIds(
  104. /* [in] */ long count,
  105. /* [out][in] */ SAFEARRAY __RPC_FAR * __RPC_FAR *arrayOfIds) \
  106. {
  107. HRESULT hr;
  108. if (!ISSAFEARRAY1D(arrayOfIds,(DWORD)count)) return E_INVALIDARG;
  109. hr = m__dxj_Direct3dRMClippedVisual->GetPlaneIDs((DWORD*)&count,
  110. (DWORD*)(((SAFEARRAY *)*arrayOfIds)->pvData),0);
  111. return hr;
  112. //getDibits
  113. }