16 #ifndef BT_MULTIBODY_CONSTRAINT_H 17 #define BT_MULTIBODY_CONSTRAINT_H 77 bool angConstraint =
false,
80 bool isFriction =
false,
btScalar desiredVelocity = 0,
btScalar cfmSlip = 0);
88 void updateJacobianSizes();
89 void allocateJacobiansMultiDof();
95 virtual void finalizeMultiDof() = 0;
97 virtual int getIslandIdA()
const = 0;
98 virtual int getIslandIdB()
const = 0;
130 m_data[dof] = appliedImpulse;
144 return m_data[m_posOffset + row];
149 m_data[m_posOffset + row] = pos;
154 return m_isUnilateral;
162 return &m_data[m_numRows + row * m_jacSizeBoth];
166 return &m_data[m_numRows + (row * m_jacSizeBoth)];
170 return &m_data[m_numRows + (row * m_jacSizeBoth) + m_jacSizeA];
174 return &m_data[m_numRows + (row * m_jacSizeBoth) + m_jacSizeA];
179 return m_maxAppliedImpulse;
183 m_maxAppliedImpulse = maxImp;
186 virtual void debugDraw(
class btIDebugDraw * drawer) = 0;
194 #endif //BT_MULTIBODY_CONSTRAINT_H const btScalar * jacobianA(int row) const
btScalar * jacobianB(int row)
btMultiBody * getMultiBodyA()
1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and fr...
btAlignedObjectArray< btScalar > scratch_r
btAlignedObjectArray< btScalar > m_deltaVelocities
btAlignedObjectArray< btSolverBody > * m_solverBodyPool
btScalar m_maxAppliedImpulse
btScalar getAppliedImpulse(int dof)
virtual void setPivotInB(const btVector3 &pivotInB)
virtual void setGearRatio(btScalar ratio)
void internalSetAppliedImpulse(int dof, btScalar appliedImpulse)
btScalar * jacobianA(int row)
btScalar getPosition(int row) const
virtual void setErp(btScalar erp)
btAlignedObjectArray< btMatrix3x3 > scratch_m
virtual void setRelativePositionTarget(btScalar relPosTarget)
btAlignedObjectArray< btScalar > m_deltaVelocitiesUnitImpulse
const btScalar * jacobianB(int row) const
virtual void setFrameInB(const btMatrix3x3 &frameInB)
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations...
virtual void setGearAuxLink(int gearAuxLink)
btAlignedObjectArray< btScalar > m_data
btAlignedObjectArray< btScalar > m_jacobians
btVector3 can be used to represent 3D points and vectors.
#define ATTRIBUTE_ALIGNED16(a)
btAlignedObjectArray< btVector3 > scratch_v
bool isUnilateral() const
void setPosition(int row, btScalar pos)
#define BT_DECLARE_ALIGNED_ALLOCATOR()
void setMaxAppliedImpulse(btScalar maxImp)
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btMultiBody * getMultiBodyB()
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btScalar getMaxAppliedImpulse() const