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 "Particles/BsVectorField.h"
8
9namespace bs
10{
11 /** @cond RTTI */
12 /** @addtogroup RTTI-Impl-Core
13 * @{
14 */
15
16 class BS_CORE_EXPORT VectorFieldRTTI : public RTTIType<VectorField, Resource, VectorFieldRTTI>
17 {
18 private:
19 BS_BEGIN_RTTI_MEMBERS
20 BS_RTTI_MEMBER_PLAIN_NAMED(countX, mDesc.countX, 0)
21 BS_RTTI_MEMBER_PLAIN_NAMED(countY, mDesc.countY, 1)
22 BS_RTTI_MEMBER_PLAIN_NAMED(countZ, mDesc.countZ, 2)
23 BS_RTTI_MEMBER_PLAIN_NAMED(bounds, mDesc.bounds, 3)
24 BS_RTTI_MEMBER_REFLPTR(mTexture, 4)
25 BS_END_RTTI_MEMBERS
26
27 public:
28 const String& getRTTIName() override
29 {
30 static String name = "VectorField";
31 return name;
32 }
33
34 UINT32 getRTTIId() override
35 {
36 return TID_VectorField;
37 }
38
39 SPtr<IReflectable> newRTTIObject() override
40 {
41 return VectorField::_createEmpty();
42 }
43
44 protected:
45 void onDeserializationEnded(IReflectable* obj, SerializationContext* context) override
46 {
47 VectorField* vectorField = static_cast<VectorField*>(obj);
48 vectorField->initialize();
49 }
50 };
51
52 /** @} */
53 /** @endcond */
54}
55