git-svn-id: https://reactphysics3d.googlecode.com/svn/trunk@301 92aac97c-a6ce-11dd-a772-7fcde58d38e6

This commit is contained in:
chappuis.daniel 2010-03-29 21:46:50 +00:00
parent 5d4994ca00
commit 785e2701bd
2 changed files with 11 additions and 11 deletions

View File

@ -25,8 +25,8 @@ using namespace reactphysics3d;
// Constructor // Constructor
Constraint::Constraint(Body* const body1, Body* const body2, unsigned int nbAuxConstraints, bool active) Constraint::Constraint(Body* const body1, Body* const body2, unsigned int nbAuxConstraints, bool active)
:body1(body1), body2(body2), active(true), nbAuxConstraints(nbAuxConstraints), :body1(body1), body2(body2), active(active), nbAuxConstraints(nbAuxConstraints),
lowerBound(lowerBound), upperBound(upperBound), active(active) { lowerBound(lowerBound), upperBound(upperBound) {
} }

View File

@ -54,8 +54,8 @@ void Contact::evaluate() {
// Compute the friction vectors that span the tangential friction plane // Compute the friction vectors that span the tangential friction plane
computeFrictionVectors(); computeFrictionVectors();
Vector3D r1 = point - rigidBody1.getCurrentBodyState().getPosition(); Vector3D r1 = point - rigidBody1->getCurrentBodyState().getPosition();
Vector3D r2 = point - rigidBody2.getCurrentBodyState().getPosition(); Vector3D r2 = point - rigidBody2->getCurrentBodyState().getPosition();
Vector3D r1CrossN = r1.crossProduct(normal); Vector3D r1CrossN = r1.crossProduct(normal);
Vector3D r2CrossN = r2.crossProduct(normal); Vector3D r2CrossN = r2.crossProduct(normal);
@ -115,15 +115,15 @@ void Contact::evaluate() {
// Compute the auxiliary lower and upper bounds // Compute the auxiliary lower and upper bounds
// TODO : Now mC is only the mass of the first body but it is probably wrong // TODO : Now mC is only the mass of the first body but it is probably wrong
// TODO : Now g is 9.81 but we should use the true gravity value of the physics world. // TODO : Now g is 9.81 but we should use the true gravity value of the physics world.
double mu_mc_g = FRICTION_COEFFICIENT * rigidBody1.getMass().getValue() * 9.81; double mu_mc_g = FRICTION_COEFFICIENT * rigidBody1->getMass().getValue() * 9.81;
auxLowerBounds.setValue(0, 0, -mu_mc_g); auxLowerBounds.setValue(0, -mu_mc_g);
auxLowerBounds.setValue(1, 0, -mu_mc_g); auxLowerBounds.setValue(1, -mu_mc_g);
auxUpperBounds.setValue(0, 0, mu_mc_g); auxUpperBounds.setValue(0, mu_mc_g);
auxUpperBounds.setValue(1, 0, mu_mc_g); auxUpperBounds.setValue(1, mu_mc_g);
// Compute the error auxiliary values // Compute the error auxiliary values
auxErrorValues.setValue(0, 0, 0.0); auxErrorValues.setValue(0, 0.0);
auxErrorValues.setValue(1, 0, 0.0); auxErrorValues.setValue(1, 0.0);
;} ;}
// TODO : Delete this (Used to debug collision detection) // TODO : Delete this (Used to debug collision detection)