BsCSphericalJoint.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 "Physics/BsSphericalJoint.h"
  6. #include "Components/BsCJoint.h"
  7. namespace bs
  8. {
  9. /** @addtogroup Components-Core
  10. * @{
  11. */
  12. /**
  13. * @copydoc SphericalJoint
  14. *
  15. * @note Wraps SphericalJoint as a Component.
  16. */
  17. class BS_CORE_EXPORT BS_SCRIPT_EXPORT(m:Physics,n:SphericalJoint) CSphericalJoint : public CJoint
  18. {
  19. public:
  20. CSphericalJoint(const HSceneObject& parent);
  21. /** @copydoc SphericalJoint::getLimit */
  22. BS_SCRIPT_EXPORT(n:Limit,pr:getter)
  23. LimitConeRange getLimit() const;
  24. /** @copydoc SphericalJoint::setLimit */
  25. BS_SCRIPT_EXPORT(n:Limit,pr:setter)
  26. void setLimit(const LimitConeRange& limit);
  27. /** @copydoc SphericalJoint::setFlag */
  28. BS_SCRIPT_EXPORT(n:SetFlag)
  29. void setFlag(SphericalJointFlag flag, bool enabled);
  30. /** @copydoc SphericalJoint::hasFlag */
  31. BS_SCRIPT_EXPORT(n:HasFlag)
  32. bool hasFlag(SphericalJointFlag flag) const;
  33. /** @name Internal
  34. * @{
  35. */
  36. /** Returns the spherical joint that this component wraps. */
  37. SphericalJoint* _getInternal() const { return static_cast<SphericalJoint*>(mInternal.get()); }
  38. /** @} */
  39. /************************************************************************/
  40. /* COMPONENT OVERRIDES */
  41. /************************************************************************/
  42. protected:
  43. friend class SceneObject;
  44. /** @copydoc CJoint::createInternal */
  45. SPtr<Joint> createInternal() override;
  46. SPHERICAL_JOINT_DESC mDesc;
  47. /************************************************************************/
  48. /* RTTI */
  49. /************************************************************************/
  50. public:
  51. friend class CSphericalJointRTTI;
  52. static RTTITypeBase* getRTTIStatic();
  53. RTTITypeBase* getRTTI() const override;
  54. protected:
  55. CSphericalJoint(); // Serialization only
  56. };
  57. /** @} */
  58. }