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/BsCCollider.h" |
8 | |
9 | namespace bs |
10 | { |
11 | /** @cond RTTI */ |
12 | /** @addtogroup RTTI-Impl-Core |
13 | * @{ |
14 | */ |
15 | |
16 | class BS_CORE_EXPORT CColliderRTTI : public RTTIType<CCollider, Component, CColliderRTTI> |
17 | { |
18 | BS_BEGIN_RTTI_MEMBERS |
19 | BS_RTTI_MEMBER_PLAIN(mLayer, 0) |
20 | BS_RTTI_MEMBER_PLAIN(mRestOffset, 1) |
21 | BS_RTTI_MEMBER_PLAIN(mContactOffset, 2) |
22 | BS_RTTI_MEMBER_REFL(mMaterial, 3) |
23 | BS_RTTI_MEMBER_PLAIN(mMass, 4) |
24 | BS_RTTI_MEMBER_PLAIN(mIsTrigger, 5) |
25 | BS_RTTI_MEMBER_PLAIN(mLocalPosition, 6) |
26 | BS_RTTI_MEMBER_PLAIN(mLocalRotation, 7) |
27 | BS_RTTI_MEMBER_PLAIN(mCollisionReportMode, 8) |
28 | BS_END_RTTI_MEMBERS |
29 | public: |
30 | const String& getRTTIName() override |
31 | { |
32 | static String name = "CCollider" ; |
33 | return name; |
34 | } |
35 | |
36 | UINT32 getRTTIId() override |
37 | { |
38 | return TID_CCollider; |
39 | } |
40 | |
41 | SPtr<IReflectable> newRTTIObject() override |
42 | { |
43 | BS_EXCEPT(InternalErrorException, "Cannot instantiate an abstract class." ); |
44 | return nullptr; |
45 | } |
46 | }; |
47 | |
48 | /** @} */ |
49 | /** @endcond */ |
50 | } |
51 | |