BsCRigidbodyRTTI.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 "BsCRigidbody.h"
  7. #include "BsGameObjectRTTI.h"
  8. namespace BansheeEngine
  9. {
  10. /** @cond RTTI */
  11. /** @addtogroup RTTI-Impl-Core
  12. * @{
  13. */
  14. class BS_CORE_EXPORT CRigidbodyRTTI : public RTTIType<CRigidbody, Component, CRigidbodyRTTI>
  15. {
  16. private:
  17. BS_BEGIN_RTTI_MEMBERS
  18. BS_RTTI_MEMBER_PLAIN(mPositionSolverCount, 0)
  19. BS_RTTI_MEMBER_PLAIN(mVelocitySolverCount, 1)
  20. BS_RTTI_MEMBER_PLAIN(mFlags, 2)
  21. BS_RTTI_MEMBER_PLAIN(mCMassPosition, 3)
  22. BS_RTTI_MEMBER_PLAIN(mCMassRotation, 4)
  23. BS_RTTI_MEMBER_PLAIN(mInertiaTensor, 5)
  24. BS_RTTI_MEMBER_PLAIN(mMass, 6)
  25. BS_RTTI_MEMBER_PLAIN(mMaxAngularVelocity, 7)
  26. BS_RTTI_MEMBER_PLAIN(mLinearDrag, 8)
  27. BS_RTTI_MEMBER_PLAIN(mAngularDrag, 9)
  28. BS_RTTI_MEMBER_PLAIN(mSleepThreshold, 10)
  29. BS_RTTI_MEMBER_PLAIN(mUseGravity, 11)
  30. BS_RTTI_MEMBER_PLAIN(mIsKinematic, 12)
  31. BS_RTTI_MEMBER_PLAIN(mCollisionReportMode, 14)
  32. BS_END_RTTI_MEMBERS
  33. public:
  34. CRigidbodyRTTI()
  35. :mInitMembers(this)
  36. { }
  37. const String& getRTTIName() override
  38. {
  39. static String name = "CRigidbody";
  40. return name;
  41. }
  42. UINT32 getRTTIId() override
  43. {
  44. return TID_CRigidbody;
  45. }
  46. SPtr<IReflectable> newRTTIObject() override
  47. {
  48. return GameObjectRTTI::createGameObject<CRigidbody>();
  49. }
  50. };
  51. /** @} */
  52. /** @endcond */
  53. }