BsPhysXMaterial.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 "BsPhysicsMaterial.h"
  6. #include "PxMaterial.h"
  7. namespace BansheeEngine
  8. {
  9. /** @addtogroup PhysX
  10. * @{
  11. */
  12. /** PhysX implementation of a PhysicsMaterial. */
  13. class PhysXMaterial : public PhysicsMaterial
  14. {
  15. public:
  16. PhysXMaterial(physx::PxPhysics* physx, float staFric, float dynFriction, float restitution);
  17. ~PhysXMaterial();
  18. /** @copydoc PhysicsMaterial::setStaticFriction */
  19. void setStaticFriction(float value) override;
  20. /** @copydoc PhysicsMaterial::getStaticFriction */
  21. float getStaticFriction() const override;
  22. /** @copydoc PhysicsMaterial::setDynamicFriction */
  23. void setDynamicFriction(float value) override;
  24. /** @copydoc PhysicsMaterial::getDynamicFriction */
  25. float getDynamicFriction() const override;
  26. /** @copydoc PhysicsMaterial::setRestitutionCoefficient */
  27. void setRestitutionCoefficient(float value) override;
  28. /** @copydoc PhysicsMaterial::getRestitutionCoefficient */
  29. float getRestitutionCoefficient() const override;
  30. /** Returns the internal PhysX material. */
  31. physx::PxMaterial* _getInternal() const { return mInternal; }
  32. private:
  33. physx::PxMaterial* mInternal;
  34. };
  35. /** @} */
  36. }