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 "Animation/BsMorphShapes.h"
8
9namespace bs
10{
11 /** @cond RTTI */
12 /** @addtogroup RTTI-Impl-Core
13 * @{
14 */
15
16 class BS_CORE_EXPORT MorphShapeRTTI : public RTTIType <MorphShape, IReflectable, MorphShapeRTTI>
17 {
18 private:
19 BS_BEGIN_RTTI_MEMBERS
20 BS_RTTI_MEMBER_PLAIN(mName, 0)
21 BS_RTTI_MEMBER_PLAIN(mWeight, 1)
22 BS_RTTI_MEMBER_PLAIN_ARRAY(mVertices, 2)
23 BS_END_RTTI_MEMBERS
24
25 public:
26 const String& getRTTIName() override
27 {
28 static String name = "MorphShape";
29 return name;
30 }
31
32 UINT32 getRTTIId() override
33 {
34 return TID_MorphShape;
35 }
36
37 SPtr<IReflectable> newRTTIObject() override
38 {
39 return bs_shared_ptr_new<MorphShape>();
40 }
41 };
42
43 class BS_CORE_EXPORT MorphChannelRTTI : public RTTIType <MorphChannel, IReflectable, MorphChannelRTTI>
44 {
45 private:
46 BS_BEGIN_RTTI_MEMBERS
47 BS_RTTI_MEMBER_PLAIN(mName, 0)
48 BS_RTTI_MEMBER_REFLPTR_ARRAY(mShapes, 1)
49 BS_END_RTTI_MEMBERS
50
51 public:
52 const String& getRTTIName() override
53 {
54 static String name = "MorphChannel";
55 return name;
56 }
57
58 UINT32 getRTTIId() override
59 {
60 return TID_MorphChannel;
61 }
62
63 SPtr<IReflectable> newRTTIObject() override
64 {
65 return MorphChannel::createEmpty();
66 }
67 };
68
69 class BS_CORE_EXPORT MorphShapesRTTI : public RTTIType <MorphShapes, IReflectable, MorphShapesRTTI>
70 {
71 private:
72 BS_BEGIN_RTTI_MEMBERS
73 BS_RTTI_MEMBER_REFLPTR_ARRAY(mChannels, 0)
74 BS_RTTI_MEMBER_PLAIN(mNumVertices, 1)
75 BS_END_RTTI_MEMBERS
76
77 public:
78 const String& getRTTIName() override
79 {
80 static String name = "MorphShapes";
81 return name;
82 }
83
84 UINT32 getRTTIId() override
85 {
86 return TID_MorphShapes;
87 }
88
89 SPtr<IReflectable> newRTTIObject() override
90 {
91 return MorphShapes::createEmpty();
92 }
93 };
94
95 BS_ALLOW_MEMCPY_SERIALIZATION(MorphVertex);
96
97 /** @} */
98 /** @endcond */
99}
100