26 m_contactManifold(*contactManifold)
36 m_contactManifold = *contactManifold;
72 btVector3 rel_pos1 = contactPositionWorld - body1->getWorldTransform().getOrigin();
73 btVector3 rel_pos2 = contactPositionWorld - colObj2->getWorldTransform().getOrigin();
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;
101 return normalImpulse;
132 btScalar jacDiagAB = jac.getDiagonal();
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;
virtual void getInfo2(btConstraintInfo2 *info)
virtual void buildJacobian()
internal method used by the constraint solver, don't use them directly
virtual void getInfo1(btConstraintInfo1 *info)
btFixedConstraint btRigidBody & rbB
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
SIMD_FORCE_INLINE btScalar btFabs(btScalar x)
btTypedConstraint(btTypedConstraintType type, btRigidBody &rbA)
@ CONTACT_CONSTRAINT_TYPE
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
const btVector3 & getAngularVelocity() const
btVector3 getVelocityInLocalPoint(const btVector3 &rel_pos) const
btScalar getInvMass() const
static const btRigidBody * upcast(const btCollisionObject *colObj)
void applyImpulse(const btVector3 &impulse, const btVector3 &rel_pos)
SIMD_FORCE_INLINE btScalar computeImpulseDenominator(const btVector3 &pos, const btVector3 &normal) const
const btTransform & getCenterOfMassTransform() const
const btVector3 & getLinearVelocity() const
const btVector3 & getCenterOfMassPosition() const
const btVector3 & getInvInertiaDiagLocal() const
SyclQueue void void size_t num_bytes void
IconTextureDrawCall normal
T distance(const T &a, const T &b)