Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
26 m_contactManifold(*contactManifold)
70 const btVector3& normal = contactNormalOnB;
79 rel_vel = normal.
dot(vel);
82 btScalar restitution = combinedRestitution * -rel_vel;
85 btScalar velocityError = -(1.0f + restitution) * rel_vel;
89 btScalar jacDiagABInv = relaxation / (denom0 + denom1);
91 btScalar penetrationImpulse = positionalError * jacDiagABInv;
92 btScalar velocityImpulse = velocityError * jacDiagABInv;
94 btScalar normalImpulse = penetrationImpulse + velocityImpulse;
95 normalImpulse = 0.f > normalImpulse ? 0.f : normalImpulse;
99 body2->
applyImpulse(-normal * (normalImpulse), rel_pos2);
101 return normalImpulse;
135 btScalar rel_vel = jac.getRelativeVelocity(
141 rel_vel = normal.dot(vel);
146 #ifdef ONLY_USE_LINEAR_MASS
148 impulse = -contactDamping * rel_vel * massTerm;
150 btScalar velocityImpulse = -contactDamping * rel_vel * jacDiagABInv;
151 impulse = velocityImpulse;
TypedConstraint is the baseclass for Bullet constraints and vehicles.
btCollisionObject can be used to manage collision detection objects.
The btRigidBody is the main class for rigid body objects.
const btVector3 & getAngularVelocity() const
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
Jacobian entry is an abstraction that allows to describe constraints it can be used in combination wi...
btScalar dot(const btVector3 &v) const
Return the dot product.
const btTransform & getCenterOfMassTransform() const
btTransform & getWorldTransform()
const btVector3 & getInvInertiaDiagLocal() const
btScalar btFabs(btScalar x)
btMatrix3x3 transpose() const
Return the transpose of the matrix.
btScalar getInvMass() const
btScalar getDiagonal() const
btVector3 can be used to represent 3D points and vectors.
btPersistentManifold is a contact point cache, it stays persistent as long as objects are overlapping...
const btVector3 & getLinearVelocity() const
btVector3 getVelocityInLocalPoint(const btVector3 &rel_pos) const
const btVector3 & getCenterOfMassPosition() const
void applyImpulse(const btVector3 &impulse, const btVector3 &rel_pos)
btScalar computeImpulseDenominator(const btVector3 &pos, const btVector3 &normal) const
static const btRigidBody * upcast(const btCollisionObject *colObj)
to keep collision detection and dynamics separate we don't store a rigidbody pointer but a rigidbody ...
btScalar length2() const
Return the length of the vector squared.