BsPhysXSliderJoint.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 "BsSliderJoint.h"
  6. #include "PxPhysics.h"
  7. #include "extensions\PxPrismaticJoint.h"
  8. namespace BansheeEngine
  9. {
  10. /** @addtogroup PhysX
  11. * @{
  12. */
  13. /** PhysX implementation of a SliderJoint. */
  14. class BS_PHYSX_EXPORT PhysXSliderJoint : public SliderJoint
  15. {
  16. public:
  17. PhysXSliderJoint(physx::PxPhysics* physx, const SLIDER_JOINT_DESC& desc);
  18. ~PhysXSliderJoint();
  19. /** @copydoc SliderJoint::getPosition */
  20. float getPosition() const override;
  21. /** @copydoc SliderJoint::getSpeed */
  22. float getSpeed() const override;
  23. /** @copydoc SliderJoint::getLimit */
  24. LimitLinearRange getLimit() const override;
  25. /** @copydoc SliderJoint::setLimit */
  26. void setLimit(const LimitLinearRange& limit) override;
  27. /** @copydoc SliderJoint::setFlag */
  28. void setFlag(Flag flag, bool enabled) override;
  29. /** @copydoc SliderJoint::hasFlag */
  30. bool hasFlag(Flag flag) const override;
  31. private:
  32. /** Returns the internal PhysX representation of the slider (prismatic) joint. */
  33. inline physx::PxPrismaticJoint* getInternal() const;
  34. };
  35. /** @} */
  36. }