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/BsCReflectionProbe.h" |
8 | #include "Private/RTTI/BsGameObjectRTTI.h" |
9 | |
10 | namespace bs |
11 | { |
12 | /** @cond RTTI */ |
13 | /** @addtogroup RTTI-Impl-Engine |
14 | * @{ |
15 | */ |
16 | |
17 | class BS_CORE_EXPORT CReflectionProbeRTTI : public RTTIType <CReflectionProbe, Component, CReflectionProbeRTTI> |
18 | { |
19 | private: |
20 | SPtr<ReflectionProbe> getInternal(CReflectionProbe* obj) { return obj->mInternal; } |
21 | void setInternal(CReflectionProbe* obj, SPtr<ReflectionProbe> val) { obj->mInternal = val; } |
22 | |
23 | public: |
24 | CReflectionProbeRTTI() |
25 | { |
26 | addReflectablePtrField("mInternal", 0, &CReflectionProbeRTTI::getInternal, &CReflectionProbeRTTI::setInternal); |
27 | } |
28 | |
29 | const String& getRTTIName() override |
30 | { |
31 | static String name = "CReflectionProbe"; |
32 | return name; |
33 | } |
34 | |
35 | UINT32 getRTTIId() override |
36 | { |
37 | return TID_CReflectionProbe; |
38 | } |
39 | |
40 | SPtr<IReflectable> newRTTIObject() override |
41 | { |
42 | return SceneObject::createEmptyComponent<CReflectionProbe>(); |
43 | } |
44 | }; |
45 | |
46 | /** @} */ |
47 | /** @endcond */ |
48 | } |