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/BsCRigidbody.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 CRigidbodyRTTI : public RTTIType<CRigidbody, Component, CRigidbodyRTTI>
18 {
19 private:
20 BS_BEGIN_RTTI_MEMBERS
21 BS_RTTI_MEMBER_PLAIN(mPositionSolverCount, 0)
22 BS_RTTI_MEMBER_PLAIN(mVelocitySolverCount, 1)
23 BS_RTTI_MEMBER_PLAIN(mFlags, 2)
24 BS_RTTI_MEMBER_PLAIN(mCMassPosition, 3)
25 BS_RTTI_MEMBER_PLAIN(mCMassRotation, 4)
26 BS_RTTI_MEMBER_PLAIN(mInertiaTensor, 5)
27 BS_RTTI_MEMBER_PLAIN(mMass, 6)
28 BS_RTTI_MEMBER_PLAIN(mMaxAngularVelocity, 7)
29 BS_RTTI_MEMBER_PLAIN(mLinearDrag, 8)
30 BS_RTTI_MEMBER_PLAIN(mAngularDrag, 9)
31 BS_RTTI_MEMBER_PLAIN(mSleepThreshold, 10)
32 BS_RTTI_MEMBER_PLAIN(mUseGravity, 11)
33 BS_RTTI_MEMBER_PLAIN(mIsKinematic, 12)
34 BS_RTTI_MEMBER_PLAIN(mCollisionReportMode, 14)
35 BS_END_RTTI_MEMBERS
36 public:
37 const String& getRTTIName() override
38 {
39 static String name = "CRigidbody";
40 return name;
41 }
42
43 UINT32 getRTTIId() override
44 {
45 return TID_CRigidbody;
46 }
47
48 SPtr<IReflectable> newRTTIObject() override
49 {
50 return SceneObject::createEmptyComponent<CRigidbody>();
51 }
52 };
53
54 /** @} */
55 /** @endcond */
56}
57