BsCHingeJointRTTI.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 "BsCHingeJoint.h"
  7. #include "BsGameObjectRTTI.h"
  8. namespace BansheeEngine
  9. {
  10. /** @cond RTTI */
  11. /** @addtogroup RTTI-Impl-Core
  12. * @{
  13. */
  14. class BS_CORE_EXPORT CHingeJointRTTI : public RTTIType<CHingeJoint, CJoint, CHingeJointRTTI>
  15. {
  16. BS_BEGIN_RTTI_MEMBERS
  17. BS_RTTI_MEMBER_PLAIN_NAMED(mFlag, mDesc.flag, 0)
  18. BS_RTTI_MEMBER_PLAIN_NAMED(mDriveSpeed, mDesc.drive.speed, 1)
  19. BS_RTTI_MEMBER_PLAIN_NAMED(mDriveForceLimit, mDesc.drive.forceLimit, 2)
  20. BS_RTTI_MEMBER_PLAIN_NAMED(mDriveGearRatio, mDesc.drive.gearRatio, 3)
  21. BS_RTTI_MEMBER_PLAIN_NAMED(mDriveFreeSpin, mDesc.drive.freeSpin, 4)
  22. BS_RTTI_MEMBER_PLAIN_NAMED(mLimitLower, mDesc.limit.lower, 5)
  23. BS_RTTI_MEMBER_PLAIN_NAMED(mLimitUpper, mDesc.limit.upper, 6)
  24. BS_RTTI_MEMBER_PLAIN_NAMED(mLimitContactDist, mDesc.limit.contactDist, 7)
  25. BS_RTTI_MEMBER_PLAIN_NAMED(mLimitRestitution, mDesc.limit.restitution, 8)
  26. BS_RTTI_MEMBER_PLAIN_NAMED(mSpringDamping, mDesc.limit.spring.damping, 9)
  27. BS_RTTI_MEMBER_PLAIN_NAMED(mSpringStiffness, mDesc.limit.spring.stiffness, 10)
  28. BS_END_RTTI_MEMBERS
  29. public:
  30. CHingeJointRTTI()
  31. :mInitMembers(this)
  32. { }
  33. const String& getRTTIName() override
  34. {
  35. static String name = "CHingeJoint";
  36. return name;
  37. }
  38. UINT32 getRTTIId() override
  39. {
  40. return TID_CHingeJoint;
  41. }
  42. SPtr<IReflectable> newRTTIObject() override
  43. {
  44. return GameObjectRTTI::createGameObject<CHingeJoint>();
  45. }
  46. };
  47. /** @} */
  48. /** @endcond */
  49. }