24#define BTMBFIXEDCONSTRAINT_DIM 6
106 for (
int i = 0; i < numDim; i++)
164 constraintNormalLin[i] = 1;
165 posError = (pivotAworld - pivotBworld).
dot(constraintNormalLin);
167 constraintNormalLin, pivotAworld, pivotBworld,
174 constraintNormalAng = frameAworld.
getColumn(i % 3);
175 posError = angleDiff[i % 3];
177 constraintNormalLin, pivotAworld, pivotBworld,
@ MULTIBODY_CONSTRAINT_FIXED
#define BTMBFIXEDCONSTRAINT_DIM
This file was written by Erwin Coumans.
btScalar dot(const btQuaternion &q1, const btQuaternion &q2)
Calculate the dot product between two quaternions.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
void resize(int newsize, const T &fillData=T())
T & expandNonInitializing()
int getCompanionId() const
static bool matrixToEulerXYZ(const btMatrix3x3 &mat, btVector3 &xyz)
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
virtual void drawTransform(const btTransform &transform, btScalar orthoLen)
The btMatrix3x3 class implements a 3x3 rotation matrix, to perform linear algebra in combination with...
btMatrix3x3 inverse() const
Return the inverse of the matrix.
btMatrix3x3 transpose() const
Return the transpose of the matrix.
btVector3 getColumn(int i) const
Get a column of the matrix as a vector.
btAlignedObjectArray< btScalar > m_data
btScalar m_maxAppliedImpulse
btScalar fillMultiBodyConstraint(btMultiBodySolverConstraint &solverConstraint, btMultiBodyJacobianData &data, btScalar *jacOrgA, btScalar *jacOrgB, const btVector3 &constraintNormalAng, const btVector3 &constraintNormalLin, const btVector3 &posAworld, const btVector3 &posBworld, btScalar posError, const btContactSolverInfo &infoGlobal, btScalar lowerLimit, btScalar upperLimit, bool angConstraint=false, btScalar relaxation=1.f, bool isFriction=false, btScalar desiredVelocity=0, btScalar cfmSlip=0, btScalar damping=1.0)
virtual int getIslandIdB() const
virtual void finalizeMultiDof()
virtual void debugDraw(class btIDebugDraw *drawer)
btMultiBodyFixedConstraint(btMultiBody *body, int link, btRigidBody *bodyB, const btVector3 &pivotInA, const btVector3 &pivotInB, const btMatrix3x3 &frameInA, const btMatrix3x3 &frameInB)
virtual ~btMultiBodyFixedConstraint()
virtual void createConstraintRows(btMultiBodyConstraintArray &constraintRows, btMultiBodyJacobianData &data, const btContactSolverInfo &infoGlobal)
btRigidBody * m_rigidBodyA
btRigidBody * m_rigidBodyB
virtual int getIslandIdA() const
btMatrix3x3 localFrameToWorld(int i, const btMatrix3x3 &local_frame) const
const btMultibodyLink & getLink(int index) const
const btMultiBodyLinkCollider * getBaseCollider() const
btVector3 localPosToWorld(int i, const btVector3 &local_pos) const
The btRigidBody is the main class for rigid body objects.
btQuaternion getOrientation() const
const btTransform & getCenterOfMassTransform() const
btVector3 can be used to represent 3D points and vectors.
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
1D constraint along a normal axis between bodyA and bodyB. It can be combined to solve contact and fr...
btMultiBodyConstraint * m_orgConstraint
btVector3 m_relpos1CrossNormal
btVector3 m_contactNormal2
btVector3 m_contactNormal1
btVector3 m_angularComponentA
btVector3 m_relpos2CrossNormal
btVector3 m_angularComponentB
class btMultiBodyLinkCollider * m_collider