BsMorphShapesRTTI.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsRTTIType.h"
  6. #include "BsMorphShapes.h"
  7. namespace BansheeEngine
  8. {
  9. /** @cond RTTI */
  10. /** @addtogroup RTTI-Impl-Core
  11. * @{
  12. */
  13. class BS_CORE_EXPORT MorphShapeRTTI : public RTTIType <MorphShape, IReflectable, MorphShapeRTTI>
  14. {
  15. private:
  16. BS_BEGIN_RTTI_MEMBERS
  17. BS_RTTI_MEMBER_PLAIN(mName, 0)
  18. BS_RTTI_MEMBER_PLAIN_ARRAY(mVertices, 1)
  19. BS_END_RTTI_MEMBERS
  20. public:
  21. MorphShapeRTTI()
  22. :mInitMembers(this)
  23. { }
  24. const String& getRTTIName() override
  25. {
  26. static String name = "MorphShape";
  27. return name;
  28. }
  29. UINT32 getRTTIId() override
  30. {
  31. return TID_MorphShape;
  32. }
  33. SPtr<IReflectable> newRTTIObject() override
  34. {
  35. return bs_shared_ptr_new<MorphShape>();
  36. }
  37. };
  38. class BS_CORE_EXPORT MorphShapesRTTI : public RTTIType <MorphShapes, IReflectable, MorphShapesRTTI>
  39. {
  40. private:
  41. BS_BEGIN_RTTI_MEMBERS
  42. BS_RTTI_MEMBER_REFLPTR_ARRAY(mShapes, 0)
  43. BS_RTTI_MEMBER_PLAIN(mNumVertices, 1)
  44. BS_END_RTTI_MEMBERS
  45. public:
  46. MorphShapesRTTI()
  47. :mInitMembers(this)
  48. { }
  49. const String& getRTTIName() override
  50. {
  51. static String name = "MorphShapes";
  52. return name;
  53. }
  54. UINT32 getRTTIId() override
  55. {
  56. return TID_MorphShapes;
  57. }
  58. SPtr<IReflectable> newRTTIObject() override
  59. {
  60. return MorphShapes::createEmpty();
  61. }
  62. };
  63. BS_ALLOW_MEMCPY_SERIALIZATION(MorphVertex);
  64. /** @} */
  65. /** @endcond */
  66. }