41 residualSquare *= residualSquare;
43 return residualSquare;
129 btVector3 deltaV_rel = deltaVa - deltaVb;
170 residualSquare *= residualSquare;
223 btVector3 impulse = impulse_normal + impulse_tangent + impulse_tangent2;
263 if (multibodyLinkCol)
287 return residualSquare;
293 const btScalar tangentImpulseFactorInv,
300 btScalar impulse_changed = deltaV_rel_tangent * tangentImpulseFactorInv;
301 deltaImpulse_tangent = rhs_tangent -
m_cfm_friction * appliedImpulse - impulse_changed;
303 btScalar sum = appliedImpulse + deltaImpulse_tangent;
304 if (
sum > upper_limit)
306 deltaImpulse_tangent = upper_limit - appliedImpulse;
307 appliedImpulse = upper_limit;
309 else if (
sum < lower_limit)
311 deltaImpulse_tangent = lower_limit - appliedImpulse;
312 appliedImpulse = lower_limit;
316 appliedImpulse =
sum;
470 if (multibodyLinkCol)
479 for (
int k = 0; k < ndof; ++k)
481 vel += local_dv[k] * J_n[k];
487 for (
int k = 0; k < ndof; ++k)
489 vel += local_dv[k] * J_t1[k];
494 for (
int k = 0; k < ndof; ++k)
496 vel += local_dv[k] * J_t2[k];
542 bool useStrainLimiting)
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...
static T sum(const btAlignedObjectArray< T > &items)
btScalar btDot(const btVector3 &v1, const btVector3 &v2)
Return the dot product between two vectors.
int size() const
return the number of elements in the array
int getInternalType() const
reserved for Bullet internal usage
bool isStaticObject() const
const btTransform & getInterpolationWorldTransform() const
static btMultiBodyLinkCollider * upcast(btCollisionObject *colObj)
btMultiBody * m_multiBody
const btScalar * getDeltaVelocityVector() const
void applyDeltaVeeMultiDof2(const btScalar *delta_vee, btScalar multiplier)
virtual btMatrix3x3 getImpulseFactor(int n_node)
const btVector3 internalComputeNodeDeltaVelocity(const btTransform &ref_trans, int n_node) const
void internalApplyFullSpaceImpulse(const btVector3 &impulse, const btVector3 &rel_pos, int n_node, btScalar dt)
btTransform & getRigidTransform()
const btMatrix3x3 & getInvInertiaTensorWorld() const
btMultiBodyJacobianData jacobianData_t1
btMultiBodyJacobianData jacobianData_normal
btMultiBodyJacobianData jacobianData_t2
btVector3 can be used to represent 3D points and vectors.
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
btScalar dot(const btVector3 &v) const
Return the dot product.
btScalar norm() const
Return the norm (length) of the vector.
btVector3 normalized() const
Return a normalized version of this vector.
btAlignedObjectArray< btScalar > m_deltaVelocitiesUnitImpulse
btAlignedObjectArray< btScalar > m_jacobians
const btCollisionObject * m_colObj
The btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packe...
btVector3 & internalGetDeltaAngularVelocity()
btRigidBody * m_originalBody
btVector3 & internalGetDeltaLinearVelocity()
some internal methods, don't use them
void internalApplyImpulse(const btVector3 &linearComponent, const btVector3 &angularComponent, const btScalar impulseMagnitude)
const btVector3 & internalGetInvMass() const