| 1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
| 2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
| 3 | #pragma once |
| 4 | |
| 5 | #include "BsCorePrerequisites.h" |
| 6 | #include "Physics/BsFixedJoint.h" |
| 7 | #include "Components/BsCJoint.h" |
| 8 | #include "Physics/BsJoint.h" |
| 9 | |
| 10 | namespace bs |
| 11 | { |
| 12 | /** @addtogroup Components-Core |
| 13 | * @{ |
| 14 | */ |
| 15 | |
| 16 | /** |
| 17 | * @copydoc FixedJoint |
| 18 | * |
| 19 | * @note Wraps FixedJoint as a Component. |
| 20 | */ |
| 21 | class BS_CORE_EXPORT BS_SCRIPT_EXPORT(m:Physics,n:FixedJoint) CFixedJoint : public CJoint |
| 22 | { |
| 23 | public: |
| 24 | CFixedJoint(const HSceneObject& parent); |
| 25 | |
| 26 | /** @name Internal |
| 27 | * @{ |
| 28 | */ |
| 29 | |
| 30 | /** Returns the fixed joint that this component wraps. */ |
| 31 | FixedJoint* _getInternal() const { return static_cast<FixedJoint*>(mInternal.get()); } |
| 32 | |
| 33 | /** @} */ |
| 34 | |
| 35 | /************************************************************************/ |
| 36 | /* COMPONENT OVERRIDES */ |
| 37 | /************************************************************************/ |
| 38 | protected: |
| 39 | friend class SceneObject; |
| 40 | |
| 41 | /** @copydoc CJoint::createInternal */ |
| 42 | SPtr<Joint> createInternal() override; |
| 43 | |
| 44 | /** @copydoc CJoint::getLocalTransform */ |
| 45 | void getLocalTransform(JointBody body, Vector3& position, Quaternion& rotation) override; |
| 46 | |
| 47 | FIXED_JOINT_DESC mDesc; |
| 48 | |
| 49 | /************************************************************************/ |
| 50 | /* RTTI */ |
| 51 | /************************************************************************/ |
| 52 | public: |
| 53 | friend class CFixedJointRTTI; |
| 54 | static RTTITypeBase* getRTTIStatic(); |
| 55 | RTTITypeBase* getRTTI() const override; |
| 56 | |
| 57 | protected: |
| 58 | CFixedJoint(); // Serialization only |
| 59 | }; |
| 60 | |
| 61 | /** @} */ |
| 62 | } |