BsCSphericalJoint.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. /** @name Internal
  30. * @{
  31. */
  32. /** Returns the spherical joint that this component wraps. */
  33. SphericalJoint* _getInternal() const { return static_cast<SphericalJoint*>(mInternal.get()); }
  34. /** @} */
  35. /************************************************************************/
  36. /* COMPONENT OVERRIDES */
  37. /************************************************************************/
  38. protected:
  39. friend class SceneObject;
  40. /** @copydoc CJoint::createInternal */
  41. SPtr<Joint> createInternal() override;
  42. SPHERICAL_JOINT_DESC mDesc;
  43. /************************************************************************/
  44. /* RTTI */
  45. /************************************************************************/
  46. public:
  47. friend class CSphericalJointRTTI;
  48. static RTTITypeBase* getRTTIStatic();
  49. RTTITypeBase* getRTTI() const override;
  50. protected:
  51. CSphericalJoint(); // Serialization only
  52. };
  53. /** @} */
  54. }