Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
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
btAlignedObjectArray< btVector3 > scratch_v
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btScalar getMaxAppliedImpulse() const
btAlignedObjectArray< btScalar > m_jacobians
void setMaxAppliedImpulse(btScalar maxImp)
const btScalar * jacobianA(int row) const
void internalSetAppliedImpulse(int dof, btScalar appliedImpulse)
btMultiBody * getMultiBodyB()
void setPosition(int row, btScalar pos)
virtual void setFrameInB(const btMatrix3x3 &frameInB)
1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and fr...
virtual void setPivotInB(const btVector3 &pivotInB)
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
virtual void setRelativePositionTarget(btScalar relPosTarget)
bool isUnilateral() const
btScalar m_maxAppliedImpulse
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btAlignedObjectArray< btScalar > scratch_r
btScalar getPosition(int row) const
#define BT_DECLARE_ALIGNED_ALLOCATOR()
btVector3 can be used to represent 3D points and vectors.
virtual void setGearRatio(btScalar ratio)
const btScalar * jacobianB(int row) const
#define ATTRIBUTE_ALIGNED16(a)
btScalar * jacobianA(int row)
btAlignedObjectArray< btScalar > m_deltaVelocities
btScalar getAppliedImpulse(int dof)
btAlignedObjectArray< btSolverBody > * m_solverBodyPool
btAlignedObjectArray< btScalar > m_data
virtual void setErp(btScalar erp)
btMultiBody * getMultiBodyA()
btScalar * jacobianB(int row)
btAlignedObjectArray< btMatrix3x3 > scratch_m
btAlignedObjectArray< btScalar > m_deltaVelocitiesUnitImpulse
virtual void setGearAuxLink(int gearAuxLink)