diff --git a/include/Nazara/BulletPhysics3D/BulletConstraint3D.hpp b/include/Nazara/BulletPhysics3D/BulletConstraint3D.hpp index 40e61a8c7..bcf3ba44d 100644 --- a/include/Nazara/BulletPhysics3D/BulletConstraint3D.hpp +++ b/include/Nazara/BulletPhysics3D/BulletConstraint3D.hpp @@ -64,8 +64,14 @@ namespace Nz Vector3f GetFirstAnchor() const; Vector3f GetSecondAnchor() const; + float GetDamping() const; + float GetImpulseClamp() const; + void SetFirstAnchor(const Vector3f& firstAnchor); void SetSecondAnchor(const Vector3f& secondAnchor); + + void SetDamping(float damping); + void SetImpulseClamp(float impulseClamp); }; } diff --git a/src/Nazara/BulletPhysics3D/BulletConstraint3D.cpp b/src/Nazara/BulletPhysics3D/BulletConstraint3D.cpp index 0126108de..ec68bfa36 100644 --- a/src/Nazara/BulletPhysics3D/BulletConstraint3D.cpp +++ b/src/Nazara/BulletPhysics3D/BulletConstraint3D.cpp @@ -111,6 +111,16 @@ namespace Nz return FromBullet(GetConstraint()->getPivotInB()); } + float BulletPivotConstraint3D::GetDamping() const + { + return GetConstraint()->m_setting.m_damping; + } + + float BulletPivotConstraint3D::GetImpulseClamp() const + { + return GetConstraint()->m_setting.m_impulseClamp; + } + void BulletPivotConstraint3D::SetFirstAnchor(const Vector3f& firstAnchor) { GetConstraint()->setPivotA(ToBullet(firstAnchor)); @@ -120,4 +130,14 @@ namespace Nz { GetConstraint()->setPivotB(ToBullet(secondAnchor)); } + + void BulletPivotConstraint3D::SetDamping(float damping) + { + GetConstraint()->m_setting.m_damping = damping; + } + + void BulletPivotConstraint3D::SetImpulseClamp(float impulseClamp) + { + GetConstraint()->m_setting.m_impulseClamp = impulseClamp; + } }