BsScriptJointCommon.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsScriptEnginePrerequisites.h"
  5. #include "BsScriptObject.h"
  6. #include "BsJoint.h"
  7. #include "BsD6Joint.h"
  8. #include "BsHingeJoint.h"
  9. namespace bs
  10. {
  11. /** @addtogroup ScriptInteropEngine
  12. * @{
  13. */
  14. /** Helper class for dealing with D6Joint::Drive structure. */
  15. class BS_SCR_BE_EXPORT ScriptD6JointDrive : public ScriptObject<ScriptD6JointDrive>
  16. {
  17. public:
  18. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "D6JointDrive")
  19. /** Converts managed limit to its native counterpart. */
  20. static D6Joint::Drive convert(MonoObject* object);
  21. private:
  22. ScriptD6JointDrive(MonoObject* instance);
  23. /************************************************************************/
  24. /* CLR HOOKS */
  25. /************************************************************************/
  26. typedef MonoObject*(__stdcall *GetNativeDataThunkDef) (MonoObject*, MonoException**);
  27. static GetNativeDataThunkDef getNativeDataThunk;
  28. };
  29. /** Helper class for dealing with HingeJoint::Drive structure. */
  30. class BS_SCR_BE_EXPORT ScriptHingeJointDrive : public ScriptObject<ScriptHingeJointDrive>
  31. {
  32. public:
  33. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "HingeJointDrive")
  34. /** Converts managed limit to its native counterpart. */
  35. static HingeJoint::Drive convert(MonoObject* object);
  36. private:
  37. ScriptHingeJointDrive(MonoObject* instance);
  38. /************************************************************************/
  39. /* CLR HOOKS */
  40. /************************************************************************/
  41. typedef MonoObject*(__stdcall *GetNativeDataThunkDef) (MonoObject*, MonoException**);
  42. static GetNativeDataThunkDef getNativeDataThunk;
  43. };
  44. /** Helper class for dealing with LimitLinearRange structure. */
  45. class BS_SCR_BE_EXPORT ScriptLimitLinearRange : public ScriptObject<ScriptLimitLinearRange>
  46. {
  47. public:
  48. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LimitLinearRange")
  49. /** Converts managed limit to its native counterpart. */
  50. static LimitLinearRange convert(MonoObject* object);
  51. private:
  52. ScriptLimitLinearRange(MonoObject* instance);
  53. /************************************************************************/
  54. /* CLR HOOKS */
  55. /************************************************************************/
  56. typedef MonoObject*(__stdcall *GetNativeDataThunkDef) (MonoObject*, MonoException**);
  57. static GetNativeDataThunkDef getNativeDataThunk;
  58. };
  59. /** Helper class for dealing with LimitLinear structure. */
  60. class BS_SCR_BE_EXPORT ScriptLimitLinear : public ScriptObject<ScriptLimitLinear>
  61. {
  62. public:
  63. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LimitLinear")
  64. /** Converts managed limit to its native counterpart. */
  65. static LimitLinear convert(MonoObject* object);
  66. private:
  67. ScriptLimitLinear(MonoObject* instance);
  68. /************************************************************************/
  69. /* CLR HOOKS */
  70. /************************************************************************/
  71. typedef MonoObject*(__stdcall *GetNativeDataThunkDef) (MonoObject*, MonoException**);
  72. static GetNativeDataThunkDef getNativeDataThunk;
  73. };
  74. /** Helper class for dealing with LimitAngularRange structure. */
  75. class BS_SCR_BE_EXPORT ScriptLimitAngularRange : public ScriptObject<ScriptLimitAngularRange>
  76. {
  77. public:
  78. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LimitAngularRange")
  79. /** Converts managed limit to its native counterpart. */
  80. static LimitAngularRange convert(MonoObject* object);
  81. private:
  82. ScriptLimitAngularRange(MonoObject* instance);
  83. /************************************************************************/
  84. /* CLR HOOKS */
  85. /************************************************************************/
  86. typedef MonoObject*(__stdcall *GetNativeDataThunkDef) (MonoObject*, MonoException**);
  87. static GetNativeDataThunkDef getNativeDataThunk;
  88. };
  89. /** Helper class for dealing with LimitConeRange structure. */
  90. class BS_SCR_BE_EXPORT ScriptLimitConeRange : public ScriptObject<ScriptLimitConeRange>
  91. {
  92. public:
  93. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LimitConeRange")
  94. /** Converts managed limit to its native counterpart. */
  95. static LimitConeRange convert(MonoObject* object);
  96. private:
  97. ScriptLimitConeRange(MonoObject* instance);
  98. /************************************************************************/
  99. /* CLR HOOKS */
  100. /************************************************************************/
  101. typedef MonoObject*(__stdcall *GetNativeDataThunkDef) (MonoObject*, MonoException**);
  102. static GetNativeDataThunkDef getNativeDataThunk;
  103. };
  104. /** @} */
  105. }