BsPhysXDistanceJoint.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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 "BsDistanceJoint.h"
  6. #include "PxPhysics.h"
  7. #include "extensions\PxDistanceJoint.h"
  8. namespace bs
  9. {
  10. /** @addtogroup PhysX
  11. * @{
  12. */
  13. /** PhysX implementation of a DistanceJoint */
  14. class PhysXDistanceJoint : public DistanceJoint
  15. {
  16. public:
  17. PhysXDistanceJoint(physx::PxPhysics* physx, const DISTANCE_JOINT_DESC& desc);
  18. ~PhysXDistanceJoint();
  19. /** @copydoc DistanceJoint::getDistance */
  20. float getDistance() const override;
  21. /** @copydoc DistanceJoint::getMinDistance */
  22. float getMinDistance() const override;
  23. /** @copydoc DistanceJoint::setMinDistance */
  24. void setMinDistance(float value) override;
  25. /** @copydoc DistanceJoint::getMaxDistance */
  26. float getMaxDistance() const override;
  27. /** @copydoc DistanceJoint::setMaxDistance */
  28. void setMaxDistance(float value) override;
  29. /** @copydoc DistanceJoint::getTolerance */
  30. float getTolerance() const override;
  31. /** @copydoc DistanceJoint::setTolerance */
  32. void setTolerance(float value) override;
  33. /** @copydoc DistanceJoint::getSpring */
  34. Spring getSpring() const override;
  35. /** @copydoc DistanceJoint::setSpring */
  36. void setSpring(const Spring& value) override;
  37. /** @copydoc DistanceJoint::setFlag */
  38. void setFlag(Flag flag, bool enabled) override;
  39. /** @copydoc DistanceJoint::hasFlag */
  40. bool hasFlag(Flag flag) const override;
  41. private:
  42. /** Returns the internal PhysX representation of the distance joint. */
  43. inline physx::PxDistanceJoint* getInternal() const;
  44. };
  45. /** @} */
  46. }