BsCDistanceJointRTTI.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 "BsCDistanceJoint.h"
  7. #include "BsGameObjectRTTI.h"
  8. namespace BansheeEngine
  9. {
  10. /** @cond RTTI */
  11. /** @addtogroup RTTI-Impl-Core
  12. * @{
  13. */
  14. class BS_CORE_EXPORT CDistanceJointRTTI : public RTTIType<CDistanceJoint, CJoint, CDistanceJointRTTI>
  15. {
  16. BS_PLAIN_MEMBER(mFlag)
  17. BS_PLAIN_MEMBER(mMinDistance)
  18. BS_PLAIN_MEMBER(mMaxDistance)
  19. BS_PLAIN_MEMBER(mTolerance)
  20. BS_PLAIN_MEMBER_NAMED(mSpringDamping, mSpring.damping)
  21. BS_PLAIN_MEMBER_NAMED(mSpringStiffness, mSpring.stiffness)
  22. public:
  23. CDistanceJointRTTI()
  24. {
  25. BS_ADD_PLAIN_FIELD(mFlag, 0);
  26. BS_ADD_PLAIN_FIELD(mMinDistance, 1);
  27. BS_ADD_PLAIN_FIELD(mMaxDistance, 2);
  28. BS_ADD_PLAIN_FIELD(mTolerance, 3);
  29. BS_ADD_PLAIN_FIELD(mSpringDamping, 4);
  30. BS_ADD_PLAIN_FIELD(mSpringStiffness, 5);
  31. }
  32. const String& getRTTIName() override
  33. {
  34. static String name = "CDistanceJoint";
  35. return name;
  36. }
  37. UINT32 getRTTIId() override
  38. {
  39. return TID_CDistanceJoint;
  40. }
  41. SPtr<IReflectable> newRTTIObject() override
  42. {
  43. return GameObjectRTTI::createGameObject<CDistanceJoint>();
  44. }
  45. };
  46. /** @} */
  47. /** @endcond */
  48. }