BsCSphericalJoint.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 "BsSphericalJoint.h"
  6. #include "BsCJoint.h"
  7. namespace BansheeEngine
  8. {
  9. /** @addtogroup Components-Core
  10. * @{
  11. */
  12. /**
  13. * @copydoc SphericalJoint
  14. *
  15. * Wraps SphericalJoint as a Component.
  16. */
  17. class BS_CORE_EXPORT CSphericalJoint : public CJoint
  18. {
  19. public:
  20. CSphericalJoint(const HSceneObject& parent);
  21. /** @copydoc SphericalJoint::getLimit */
  22. inline LimitConeRange getLimit() const;
  23. /** @copydoc SphericalJoint::setLimit */
  24. inline void setLimit(const LimitConeRange& limit);
  25. /** @copydoc SphericalJoint::setFlag */
  26. inline void setFlag(SphericalJoint::Flag flag, bool enabled);
  27. /** @copydoc SphericalJoint::hasFlag */
  28. inline bool hasFlag(SphericalJoint::Flag flag) const;
  29. /** @cond INTERNAL */
  30. /** Returns the spherical joint that this component wraps. */
  31. SphericalJoint* _getInternal() const { return static_cast<SphericalJoint*>(mInternal.get()); }
  32. /** @endcond */
  33. /************************************************************************/
  34. /* COMPONENT OVERRIDES */
  35. /************************************************************************/
  36. protected:
  37. friend class SceneObject;
  38. /** @copydoc CJoint::createInternal */
  39. SPtr<Joint> createInternal() override;
  40. SphericalJoint::Flag mFlag = (SphericalJoint::Flag)0;
  41. LimitConeRange mLimit;
  42. /************************************************************************/
  43. /* RTTI */
  44. /************************************************************************/
  45. public:
  46. friend class CSphericalJointRTTI;
  47. static RTTITypeBase* getRTTIStatic();
  48. RTTITypeBase* getRTTI() const override;
  49. protected:
  50. CSphericalJoint() {} // Serialization only
  51. };
  52. /** @} */
  53. }