BsScriptD6Joint.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 "BsScriptCollider.h"
  6. #include "BsScriptJoint.h"
  7. #include "BsD6Joint.h"
  8. namespace BansheeEngine
  9. {
  10. /** Interop class between C++ & CLR for D6Joint. */
  11. class BS_SCR_BE_EXPORT ScriptD6Joint : public TScriptJoint<ScriptD6Joint>
  12. {
  13. public:
  14. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeD6Joint")
  15. private:
  16. ScriptD6Joint(MonoObject* instance, const SPtr<Joint>& joint);
  17. /** Returns the native D6 joint wrapped by this object. */
  18. D6Joint* getD6Joint() const;
  19. /************************************************************************/
  20. /* CLR HOOKS */
  21. /************************************************************************/
  22. static void internal_CreateInstance(MonoObject* instance);
  23. static void internal_SetMotion(ScriptD6Joint* thisPtr, D6Joint::Axis axis, D6Joint::Motion motion);
  24. static float internal_GetTwist(ScriptD6Joint* thisPtr);
  25. static float internal_GetSwingY(ScriptD6Joint* thisPtr);
  26. static float internal_GetSwingZ(ScriptD6Joint* thisPtr);
  27. static void internal_SetLimitLinear(ScriptD6Joint* thisPtr, MonoObject* limit);
  28. static void internal_SetLimitTwist(ScriptD6Joint* thisPtr, MonoObject* limit);
  29. static void internal_SetLimitSwing(ScriptD6Joint* thisPtr, MonoObject* limit);
  30. static void internal_SetDrive(ScriptD6Joint* thisPtr, D6Joint::DriveType type, MonoObject* drive);
  31. static void internal_SetDrivePosition(ScriptD6Joint* thisPtr, Vector3* position);
  32. static void internal_SetDriveRotation(ScriptD6Joint* thisPtr, Quaternion* rotation);
  33. static void internal_SetDriveLinearVelocity(ScriptD6Joint* thisPtr, Vector3* velocity);
  34. static void internal_SetDriveAngularVelocity(ScriptD6Joint* thisPtr, Vector3* velocity);
  35. };
  36. }