BsScriptHingeJoint.h 1.5 KB

123456789101112131415161718192021222324252627282930313233
  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. namespace BansheeEngine
  8. {
  9. /** Interop class between C++ & CLR for HingeJoint. */
  10. class BS_SCR_BE_EXPORT ScriptHingeJoint : public TScriptJoint<ScriptHingeJoint>
  11. {
  12. public:
  13. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeHingeJoint")
  14. private:
  15. ScriptHingeJoint(MonoObject* instance, const SPtr<Joint>& joint);
  16. /** Returns the native hinge joint wrapped by this object. */
  17. HingeJoint* getHingeJoint() const;
  18. /************************************************************************/
  19. /* CLR HOOKS */
  20. /************************************************************************/
  21. static void internal_CreateInstance(MonoObject* instance);
  22. static float internal_GetAngle(ScriptHingeJoint* thisPtr);
  23. static float internal_GetSpeed(ScriptHingeJoint* thisPtr);
  24. static void internal_SetLimit(ScriptHingeJoint* thisPtr, MonoObject* limit);
  25. static void internal_SetDrive(ScriptHingeJoint* thisPtr, MonoObject* drive);
  26. static void internal_SetEnableLimit(ScriptHingeJoint* thisPtr, bool value);
  27. static void internal_SetEnableDrive(ScriptHingeJoint* thisPtr, bool value);
  28. };
  29. }