BsCFixedJoint.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "Physics/BsFixedJoint.h"
  6. #include "Components/BsCJoint.h"
  7. #include "Physics/BsJoint.h"
  8. namespace bs
  9. {
  10. /** @addtogroup Components-Core
  11. * @{
  12. */
  13. /**
  14. * @copydoc FixedJoint
  15. *
  16. * @note Wraps FixedJoint as a Component.
  17. */
  18. class BS_CORE_EXPORT BS_SCRIPT_EXPORT(m:Physics,n:FixedJoint) CFixedJoint : public CJoint
  19. {
  20. public:
  21. CFixedJoint(const HSceneObject& parent);
  22. /** @name Internal
  23. * @{
  24. */
  25. /** Returns the fixed joint that this component wraps. */
  26. FixedJoint* _getInternal() const { return static_cast<FixedJoint*>(mInternal.get()); }
  27. /** @} */
  28. /************************************************************************/
  29. /* COMPONENT OVERRIDES */
  30. /************************************************************************/
  31. protected:
  32. friend class SceneObject;
  33. /** @copydoc CJoint::createInternal */
  34. SPtr<Joint> createInternal() override;
  35. /** @copydoc CJoint::getLocalTransform */
  36. void getLocalTransform(JointBody body, Vector3& position, Quaternion& rotation) override;
  37. FIXED_JOINT_DESC mDesc;
  38. /************************************************************************/
  39. /* RTTI */
  40. /************************************************************************/
  41. public:
  42. friend class CFixedJointRTTI;
  43. static RTTITypeBase* getRTTIStatic();
  44. RTTITypeBase* getRTTI() const override;
  45. protected:
  46. CFixedJoint(); // Serialization only
  47. };
  48. /** @} */
  49. }