From 5af0cbfae41a8693a383e539d67e5dffbc8d8f81 Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Sat, 16 Jan 2021 23:53:45 +0100 Subject: [PATCH] Modifications in RigidBodyComponents for locking linear/angular axis --- .../components/RigidBodyComponents.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/reactphysics3d/components/RigidBodyComponents.h b/include/reactphysics3d/components/RigidBodyComponents.h index bf7457c3..23d30eba 100644 --- a/include/reactphysics3d/components/RigidBodyComponents.h +++ b/include/reactphysics3d/components/RigidBodyComponents.h @@ -354,10 +354,10 @@ class RigidBodyComponents : public Components { /// Set the value to know if the entity is already in an island void setIsAlreadyInIsland(Entity bodyEntity, bool isAlreadyInIsland); - /// Set the lock translation factor - void setLinearLockAxisFactor(Entity bodyEntity, const Vector3& lockTranslationFactor); + /// Set the linear lock axis factor + void setLinearLockAxisFactor(Entity bodyEntity, const Vector3& linearLockAxisFactor); - /// Set the lock rotation factor + /// Set the angular lock axis factor void setAngularLockAxisFactor(Entity bodyEntity, const Vector3& rotationTranslationFactor); /// Return the array of joints of a body @@ -805,17 +805,17 @@ RP3D_FORCE_INLINE void RigidBodyComponents::setIsAlreadyInIsland(Entity bodyEnti } // Set the linear lock axis factor -RP3D_FORCE_INLINE void RigidBodyComponents::setLinearLockAxisFactor(Entity bodyEntity, const Vector3& lockTranslationFactor) { +RP3D_FORCE_INLINE void RigidBodyComponents::setLinearLockAxisFactor(Entity bodyEntity, const Vector3& linearLockAxisFactor) { assert(mMapEntityToComponentIndex.containsKey(bodyEntity)); - mLinearLockAxisFactors[mMapEntityToComponentIndex[bodyEntity]] = lockTranslationFactor; + mLinearLockAxisFactors[mMapEntityToComponentIndex[bodyEntity]] = linearLockAxisFactor; } // Set the angular lock axis factor -RP3D_FORCE_INLINE void RigidBodyComponents::setAngularLockAxisFactor(Entity bodyEntity, const Vector3& lockRotationFactor) { +RP3D_FORCE_INLINE void RigidBodyComponents::setAngularLockAxisFactor(Entity bodyEntity, const Vector3& angularLockAxisFactor) { assert(mMapEntityToComponentIndex.containsKey(bodyEntity)); - mAngularLockAxisFactors[mMapEntityToComponentIndex[bodyEntity]] = lockRotationFactor; + mAngularLockAxisFactors[mMapEntityToComponentIndex[bodyEntity]] = angularLockAxisFactor; } // Return the array of joints of a body