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 "Reflection/BsRTTIType.h"
7#include "Components/BsCHingeJoint.h"
8#include "Private/RTTI/BsGameObjectRTTI.h"
9
10namespace bs
11{
12 /** @cond RTTI */
13 /** @addtogroup RTTI-Impl-Core
14 * @{
15 */
16
17 class BS_CORE_EXPORT CHingeJointRTTI : public RTTIType<CHingeJoint, CJoint, CHingeJointRTTI>
18 {
19 BS_BEGIN_RTTI_MEMBERS
20 BS_RTTI_MEMBER_PLAIN_NAMED(mFlag, mDesc.flag, 0)
21 BS_RTTI_MEMBER_PLAIN_NAMED(mDriveSpeed, mDesc.drive.speed, 1)
22 BS_RTTI_MEMBER_PLAIN_NAMED(mDriveForceLimit, mDesc.drive.forceLimit, 2)
23 BS_RTTI_MEMBER_PLAIN_NAMED(mDriveGearRatio, mDesc.drive.gearRatio, 3)
24 BS_RTTI_MEMBER_PLAIN_NAMED(mDriveFreeSpin, mDesc.drive.freeSpin, 4)
25 BS_RTTI_MEMBER_PLAIN_NAMED(mLimitLower, mDesc.limit.lower, 5)
26 BS_RTTI_MEMBER_PLAIN_NAMED(mLimitUpper, mDesc.limit.upper, 6)
27 BS_RTTI_MEMBER_PLAIN_NAMED(mLimitContactDist, mDesc.limit.contactDist, 7)
28 BS_RTTI_MEMBER_PLAIN_NAMED(mLimitRestitution, mDesc.limit.restitution, 8)
29 BS_RTTI_MEMBER_PLAIN_NAMED(mSpringDamping, mDesc.limit.spring.damping, 9)
30 BS_RTTI_MEMBER_PLAIN_NAMED(mSpringStiffness, mDesc.limit.spring.stiffness, 10)
31 BS_END_RTTI_MEMBERS
32
33 public:
34 const String& getRTTIName() override
35 {
36 static String name = "CHingeJoint";
37 return name;
38 }
39
40 UINT32 getRTTIId() override
41 {
42 return TID_CHingeJoint;
43 }
44
45 SPtr<IReflectable> newRTTIObject() override
46 {
47 return SceneObject::createEmptyComponent<CHingeJoint>();
48 }
49 };
50
51 /** @} */
52 /** @endcond */
53}
54