BsPhysXSphericalJoint.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsPhysXPrerequisites.h"
  5. #include "Physics/BsSphericalJoint.h"
  6. #include "PxPhysics.h"
  7. #include "extensions/PxSphericalJoint.h"
  8. namespace bs
  9. {
  10. /** @addtogroup PhysX
  11. * @{
  12. */
  13. /** PhysX implementation of a SphericalJoint. */
  14. class PhysXSphericalJoint : public SphericalJoint
  15. {
  16. public:
  17. PhysXSphericalJoint(physx::PxPhysics* physx, const SPHERICAL_JOINT_DESC& desc);
  18. ~PhysXSphericalJoint();
  19. /** @copydoc SphericalJoint::getLimit */
  20. LimitConeRange getLimit() const override;
  21. /** @copydoc SphericalJoint::setLimit */
  22. void setLimit(const LimitConeRange& limit) override;
  23. /** @copydoc SphericalJoint::setFlag */
  24. void setFlag(SphericalJointFlag flag, bool enabled) override;
  25. /** @copydoc SphericalJoint::hasFlag */
  26. bool hasFlag(SphericalJointFlag flag) const override;
  27. private:
  28. /** Returns the internal PhysX representation of the spherical joint. */
  29. inline physx::PxSphericalJoint* getInternal() const;
  30. };
  31. /** @} */
  32. }