summaryrefslogtreecommitdiff
path: root/thirdparty/bullet/BulletDynamics/ConstraintSolver/btGearConstraint.cpp
diff options
context:
space:
mode:
authorOussama <o.boukhelf@gmail.com>2019-01-03 14:26:51 +0100
committerRĂ©mi Verschelde <rverschelde@gmail.com>2019-01-07 12:30:35 +0100
commit22b7c9dfa80d0f7abca40f061865c2ab3c136a74 (patch)
tree311cd3f22b012329160f9d43810aea429994af48 /thirdparty/bullet/BulletDynamics/ConstraintSolver/btGearConstraint.cpp
parenta6722cf36251ddcb538e6ebed9fa4950342b68ba (diff)
Update Bullet to the latest commit 126b676
Diffstat (limited to 'thirdparty/bullet/BulletDynamics/ConstraintSolver/btGearConstraint.cpp')
-rw-r--r--thirdparty/bullet/BulletDynamics/ConstraintSolver/btGearConstraint.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/thirdparty/bullet/BulletDynamics/ConstraintSolver/btGearConstraint.cpp b/thirdparty/bullet/BulletDynamics/ConstraintSolver/btGearConstraint.cpp
index bcd457b673..7535c52c05 100644
--- a/thirdparty/bullet/BulletDynamics/ConstraintSolver/btGearConstraint.cpp
+++ b/thirdparty/bullet/BulletDynamics/ConstraintSolver/btGearConstraint.cpp
@@ -17,38 +17,36 @@ subject to the following restrictions:
#include "btGearConstraint.h"
-btGearConstraint::btGearConstraint(btRigidBody& rbA, btRigidBody& rbB, const btVector3& axisInA,const btVector3& axisInB, btScalar ratio)
-:btTypedConstraint(GEAR_CONSTRAINT_TYPE,rbA,rbB),
-m_axisInA(axisInA),
-m_axisInB(axisInB),
-m_ratio(ratio)
+btGearConstraint::btGearConstraint(btRigidBody& rbA, btRigidBody& rbB, const btVector3& axisInA, const btVector3& axisInB, btScalar ratio)
+ : btTypedConstraint(GEAR_CONSTRAINT_TYPE, rbA, rbB),
+ m_axisInA(axisInA),
+ m_axisInB(axisInB),
+ m_ratio(ratio)
{
}
-btGearConstraint::~btGearConstraint ()
+btGearConstraint::~btGearConstraint()
{
}
-void btGearConstraint::getInfo1 (btConstraintInfo1* info)
+void btGearConstraint::getInfo1(btConstraintInfo1* info)
{
info->m_numConstraintRows = 1;
info->nub = 1;
}
-void btGearConstraint::getInfo2 (btConstraintInfo2* info)
+void btGearConstraint::getInfo2(btConstraintInfo2* info)
{
btVector3 globalAxisA, globalAxisB;
- globalAxisA = m_rbA.getWorldTransform().getBasis()*this->m_axisInA;
- globalAxisB = m_rbB.getWorldTransform().getBasis()*this->m_axisInB;
+ globalAxisA = m_rbA.getWorldTransform().getBasis() * this->m_axisInA;
+ globalAxisB = m_rbB.getWorldTransform().getBasis() * this->m_axisInB;
info->m_J1angularAxis[0] = globalAxisA[0];
info->m_J1angularAxis[1] = globalAxisA[1];
info->m_J1angularAxis[2] = globalAxisA[2];
- info->m_J2angularAxis[0] = m_ratio*globalAxisB[0];
- info->m_J2angularAxis[1] = m_ratio*globalAxisB[1];
- info->m_J2angularAxis[2] = m_ratio*globalAxisB[2];
-
+ info->m_J2angularAxis[0] = m_ratio * globalAxisB[0];
+ info->m_J2angularAxis[1] = m_ratio * globalAxisB[1];
+ info->m_J2angularAxis[2] = m_ratio * globalAxisB[2];
}
-