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

This commit is contained in:
chappuis.daniel 2010-04-12 22:33:27 +00:00
parent 8b1ef8a5fc
commit ba60a97dd6
2 changed files with 19 additions and 0 deletions

View File

@ -162,6 +162,16 @@ void ConstraintSolver::freeMemory() {
delete[] bodyMapping;
}
// Compute the vector b
void ConstraintSolver::computeVectorB() {
// TODO : Implement this method ...
}
// Compute the matrix B_sp
void ConstraintSolver::computeMatrixB_sp() {
// TODO : Implement this method ...
}
// Solve the current LCP problem
void ConstraintSolver::solve(double dt) {
// Allocate memory for the matrices
@ -170,6 +180,12 @@ void ConstraintSolver::solve(double dt) {
// Fill-in all the matrices needed to solve the LCP problem
fillInMatrices();
// Compute the vector b
computeVectorB();
// Compute the matrix B
computeMatrixB_sp();
// Solve the LCP problem (computation of lambda)
lcpSolver.solve(A, b, lowLimits, highLimits, lambda);

View File

@ -59,9 +59,12 @@ class ConstraintSolver {
Matrix Minv_sp; // Sparse representation of the Matrix that contains information about mass and inertia of each body
Vector V; // Vector that contains linear and angular velocities of each body
Vector Fext; // Vector that contains external forces and torques of each body
void allocate(); // Allocate all the matrices needed to solve the LCP problem
void fillInMatrices(); // Fill in all the matrices needed to solve the LCP problem
void freeMemory(); // Free the memory that was allocated in the allocate() method
void computeVectorB(); // Compute the vector b
void computeMatrixB_sp(); // Compute the matrix B_sp
public:
ConstraintSolver(); // Constructor