BsScriptJointCommon.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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 BansheeEngine
  10. {
  11. /** Helper class for dealing with D6Joint::Drive structure. */
  12. class BS_SCR_BE_EXPORT ScriptD6JointDrive : public ScriptObject<ScriptD6JointDrive>
  13. {
  14. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "D6JointDrive")
  15. public:
  16. /** Converts managed limit to its native counterpart. */
  17. static D6Joint::Drive convert(MonoObject* object);
  18. private:
  19. ScriptD6JointDrive(MonoObject* instance);
  20. /************************************************************************/
  21. /* CLR HOOKS */
  22. /************************************************************************/
  23. typedef void(__stdcall *GetNativeDataThunkDef) (MonoObject*, D6Joint::Drive*, MonoException**);
  24. static GetNativeDataThunkDef getNativeDataThunk;
  25. };
  26. /** Helper class for dealing with HingeJoint::Drive structure. */
  27. class BS_SCR_BE_EXPORT ScriptHingeJointDrive : public ScriptObject<ScriptHingeJointDrive>
  28. {
  29. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "HingeJointDrive")
  30. public:
  31. /** Converts managed limit to its native counterpart. */
  32. static HingeJoint::Drive convert(MonoObject* object);
  33. private:
  34. ScriptHingeJointDrive(MonoObject* instance);
  35. /************************************************************************/
  36. /* CLR HOOKS */
  37. /************************************************************************/
  38. typedef void(__stdcall *GetNativeDataThunkDef) (MonoObject*, HingeJoint::Drive*, MonoException**);
  39. static GetNativeDataThunkDef getNativeDataThunk;
  40. };
  41. /** Helper class for dealing with LimitLinearRange structure. */
  42. class BS_SCR_BE_EXPORT ScriptLimitLinearRange : public ScriptObject<ScriptLimitLinearRange>
  43. {
  44. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LimitLinearRange")
  45. public:
  46. /** Converts managed limit to its native counterpart. */
  47. static LimitLinearRange convert(MonoObject* object);
  48. private:
  49. ScriptLimitLinearRange(MonoObject* instance);
  50. /************************************************************************/
  51. /* CLR HOOKS */
  52. /************************************************************************/
  53. typedef void(__stdcall *GetNativeDataThunkDef) (MonoObject*, LimitLinearRange*, MonoException**);
  54. static GetNativeDataThunkDef getNativeDataThunk;
  55. };
  56. /** Helper class for dealing with LimitLinear structure. */
  57. class BS_SCR_BE_EXPORT ScriptLimitLinear : public ScriptObject<ScriptLimitLinear>
  58. {
  59. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LimitLinear")
  60. public:
  61. /** Converts managed limit to its native counterpart. */
  62. static LimitLinear convert(MonoObject* object);
  63. private:
  64. ScriptLimitLinear(MonoObject* instance);
  65. /************************************************************************/
  66. /* CLR HOOKS */
  67. /************************************************************************/
  68. typedef void(__stdcall *GetNativeDataThunkDef) (MonoObject*, LimitLinear*, MonoException**);
  69. static GetNativeDataThunkDef getNativeDataThunk;
  70. };
  71. /** Helper class for dealing with LimitAngularRange structure. */
  72. class BS_SCR_BE_EXPORT ScriptLimitAngularRange : public ScriptObject<ScriptLimitAngularRange>
  73. {
  74. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LimitAngularRange")
  75. public:
  76. /** Converts managed limit to its native counterpart. */
  77. static LimitAngularRange convert(MonoObject* object);
  78. private:
  79. ScriptLimitAngularRange(MonoObject* instance);
  80. /************************************************************************/
  81. /* CLR HOOKS */
  82. /************************************************************************/
  83. typedef void(__stdcall *GetNativeDataThunkDef) (MonoObject*, LimitAngularRange*, MonoException**);
  84. static GetNativeDataThunkDef getNativeDataThunk;
  85. };
  86. /** Helper class for dealing with LimitConeRange structure. */
  87. class BS_SCR_BE_EXPORT ScriptLimitConeRange : public ScriptObject<ScriptLimitConeRange>
  88. {
  89. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "LimitConeRange")
  90. public:
  91. /** Converts managed limit to its native counterpart. */
  92. static LimitConeRange convert(MonoObject* object);
  93. private:
  94. ScriptLimitConeRange(MonoObject* instance);
  95. /************************************************************************/
  96. /* CLR HOOKS */
  97. /************************************************************************/
  98. typedef void(__stdcall *GetNativeDataThunkDef) (MonoObject*, LimitConeRange*, MonoException**);
  99. static GetNativeDataThunkDef getNativeDataThunk;
  100. };
  101. }