add b3FixedConstraint, with less memory footprint than b3Generic6DofConstraint, and easier to port to OpenCL.
remove the 'obsolete' part of b3Generic6DofConstraint and b3Point2PointConstraint
This commit is contained in:
@@ -25,8 +25,7 @@ subject to the following restrictions:
|
||||
|
||||
b3Point2PointConstraint::b3Point2PointConstraint(int rbA,int rbB, const b3Vector3& pivotInA,const b3Vector3& pivotInB)
|
||||
:b3TypedConstraint(B3_POINT2POINT_CONSTRAINT_TYPE,rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB),
|
||||
m_flags(0),
|
||||
m_useSolveConstraintObsolete(false)
|
||||
m_flags(0)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -49,15 +48,8 @@ void b3Point2PointConstraint::getInfo1 (b3ConstraintInfo1* info,const b3RigidBod
|
||||
|
||||
void b3Point2PointConstraint::getInfo1NonVirtual (b3ConstraintInfo1* info,const b3RigidBodyCL* bodies)
|
||||
{
|
||||
if (m_useSolveConstraintObsolete)
|
||||
{
|
||||
info->m_numConstraintRows = 0;
|
||||
info->nub = 0;
|
||||
} else
|
||||
{
|
||||
info->m_numConstraintRows = 3;
|
||||
info->nub = 3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +72,6 @@ void b3Point2PointConstraint::getInfo2 (b3ConstraintInfo2* info, const b3RigidBo
|
||||
|
||||
void b3Point2PointConstraint::getInfo2NonVirtual (b3ConstraintInfo2* info, const b3Transform& body0_trans, const b3Transform& body1_trans)
|
||||
{
|
||||
b3Assert(!m_useSolveConstraintObsolete);
|
||||
|
||||
//retrieve matrices
|
||||
|
||||
@@ -92,6 +83,8 @@ void b3Point2PointConstraint::getInfo2NonVirtual (b3ConstraintInfo2* info, const
|
||||
info->m_J1linearAxis[2*info->rowskip+2] = 1;
|
||||
|
||||
b3Vector3 a1 = body0_trans.getBasis()*getPivotInA();
|
||||
b3Vector3 a1a = b3QuatRotate(body0_trans.getRotation(),getPivotInA());
|
||||
|
||||
{
|
||||
b3Vector3* angular0 = (b3Vector3*)(info->m_J1angularAxis);
|
||||
b3Vector3* angular1 = (b3Vector3*)(info->m_J1angularAxis+info->rowskip);
|
||||
|
||||
Reference in New Issue
Block a user