23#ifndef BTMBP2PCONSTRAINT_BLOCK_ANGULAR_MOTION_TEST
24#define BTMBP2PCONSTRAINT_DIM 3
26#define BTMBP2PCONSTRAINT_DIM 6
108 for (
int i = 0; i < numDim; i++)
125#ifndef BTMBP2PCONSTRAINT_BLOCK_ANGULAR_MOTION_TEST
126 contactNormalOnB[i] = -1;
128 contactNormalOnB[i % 3] = -1;
155 btScalar posError = i < 3 ? (pivotAworld - pivotBworld).
dot(contactNormalOnB) : 0;
157#ifndef BTMBP2PCONSTRAINT_BLOCK_ANGULAR_MOTION_TEST
160 contactNormalOnB, pivotAworld, pivotBworld,
172 const btVector3& normalAng = i >= 3 ? contactNormalOnB : dummy;
173 const btVector3& normalLin = i < 3 ? contactNormalOnB : dummy;
@ MULTIBODY_CONSTRAINT_POINT_TO_POINT
#define BTMBP2PCONSTRAINT_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
The btIDebugDraw interface class allows hooking up a debug renderer to visually debug simulations.
virtual void drawTransform(const btTransform &transform, btScalar orthoLen)
btAlignedObjectArray< btScalar > m_data
btScalar * jacobianA(int row)
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)
btRigidBody * m_rigidBodyA
btMultiBodyPoint2Point(btMultiBody *body, int link, btRigidBody *bodyB, const btVector3 &pivotInA, const btVector3 &pivotInB)
virtual ~btMultiBodyPoint2Point()
virtual void finalizeMultiDof()
virtual int getIslandIdB() const
virtual void debugDraw(class btIDebugDraw *drawer)
virtual void createConstraintRows(btMultiBodyConstraintArray &constraintRows, btMultiBodyJacobianData &data, const btContactSolverInfo &infoGlobal)
btRigidBody * m_rigidBodyB
virtual int getIslandIdA() 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.
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)
btAlignedObjectArray< btScalar > scratch_r
btAlignedObjectArray< btMatrix3x3 > scratch_m
btAlignedObjectArray< btVector3 > scratch_v
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