Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

ContactSolver Class Reference

#include <ContactSolver.h>

List of all members.

Public Member Functions

Public Attributes

Private Member Functions

Private Attributes


Constructor & Destructor Documentation

ContactSolver::ContactSolver GlobalContactInfoVector contacts  ) 
 

Definition at line 4 of file ContactSolver.cpp.

References contactDForces, contactForces, contactIndexC, contactIndexTemp, contactMatrix, contactMatrixTemp, contacts, contactSets, contactVector, contactVectorTemp, contactVelocities, nContacts, nContactsMax, tempMatrix, tempVector1, tempVector2, and zeros.

ContactSolver::~ContactSolver  )  [virtual]
 

Definition at line 26 of file ContactSolver.cpp.

References contactMatrix, contactMatrixTemp, and tempMatrix.


Member Function Documentation

void ContactSolver::computeContacts  ) 
 

Computes the contact forces, using the Baraff algorithm.

Definition at line 273 of file ContactSolver.cpp.

References computeContactsPreda(), driveToZero(), initForcesVelocities(), and nContacts.

Referenced by Simulator::advanceTime(), and Simulator::computeContacts().

void ContactSolver::computeContactsPreda  ) 
 

Computes the contact forces with a Gauss-Seidel like method (re)discovered by Preda.

Definition at line 308 of file ContactSolver.cpp.

References contactForces, contactMatrix, contactVector, initForcesVelocities(), and real.

Referenced by computeContacts().

bool ContactSolver::driveToZero int  d  )  [private]
 

Definition at line 151 of file ContactSolver.cpp.

References contactDForces, contactForces, contactIndexC, contactMatrix, contactMatrixTemp, contactSets, contactVectorTemp, contactVelocities, maxStep(), nContacts, real, SystemSolver::svDecompose(), SystemSolver::svSubstitute(), tempMatrix, tempVector1, tempVector2, and zeros.

Referenced by computeContacts().

void ContactSolver::init  ) 
 

Resize the data members to allow a greater number of contacts, if needed; set to zero contactMatrix, contactVector, contactForces.

Definition at line 50 of file ContactSolver.cpp.

References contactDForces, contactForces, contactIndexC, contactIndexTemp, contactMatrix, contactMatrixTemp, contacts, ContactSet, contactSets, contactVector, contactVectorTemp, contactVelocities, nContacts, nContactsMax, real, tempMatrix, tempVector1, tempVector2, and zeros.

Referenced by Simulator::indexContacts().

void ContactSolver::initForcesVelocities  )  [private]
 

Definition at line 262 of file ContactSolver.cpp.

References contactForces, contactVector, contactVelocities, and zeros.

Referenced by computeContacts(), and computeContactsPreda().

real ContactSolver::maxStep int  d,
int *  sIndex
[private]
 

Definition at line 107 of file ContactSolver.cpp.

References contactDForces, contactForces, contactSets, contactVectorTemp, contactVelocities, and real.

Referenced by driveToZero().

void ContactSolver::uploadForces  ) 
 

Uploads the computed forces into simulator contacts.

Definition at line 344 of file ContactSolver.cpp.

References contactForces, and contacts.

Referenced by Simulator::advanceTime().


Member Data Documentation

real* ContactSolver::contactDForces [private]
 

The delta f vector of the Baraff algorithm

Definition at line 67 of file ContactSolver.h.

Referenced by ContactSolver(), driveToZero(), init(), and maxStep().

real* ContactSolver::contactForces [private]
 

The f vector of the Baraff algorithm.

Definition at line 61 of file ContactSolver.h.

Referenced by computeContactsPreda(), ContactSolver(), driveToZero(), init(), initForcesVelocities(), maxStep(), and uploadForces().

int* ContactSolver::contactIndexC [private]
 

A index vector used in the Baraff algorithm to point to C contacts.

Definition at line 76 of file ContactSolver.h.

Referenced by ContactSolver(), driveToZero(), and init().

int* ContactSolver::contactIndexTemp [private]
 

A temporary index vector used in the Baraff algorithm for system solving.

Definition at line 82 of file ContactSolver.h.

Referenced by ContactSolver(), and init().

real** ContactSolver::contactMatrix
 

The A matrix of the Baraff algorithm.

Definition at line 33 of file ContactSolver.h.

Referenced by computeContactsPreda(), ContactSolver(), driveToZero(), PhysicalObject::fillContactMatrix(), ArticulatedAgentBase::fillContactMatrix(), ArticulatedAgentQuasistatic::forwardAccelerations(), init(), and ~ContactSolver().

real** ContactSolver::contactMatrixTemp [private]
 

A temporary matrix used in the Baraff algorithm for holding the A_CC.

Definition at line 58 of file ContactSolver.h.

Referenced by ContactSolver(), driveToZero(), init(), and ~ContactSolver().

GlobalContactInfoVector* ContactSolver::contacts [private]
 

A pointer to the contacts list.

Definition at line 49 of file ContactSolver.h.

Referenced by ContactSolver(), init(), and uploadForces().

ContactSet* ContactSolver::contactSets [private]
 

A vector which holds the set to which a contact belongs (C or NC) in the Baraff algorithm

Definition at line 73 of file ContactSolver.h.

Referenced by ContactSolver(), driveToZero(), init(), and maxStep().

real* ContactSolver::contactVector
 

The b vector of the Baraff algorithm.

Definition at line 36 of file ContactSolver.h.

Referenced by computeContactsPreda(), ContactSolver(), PhysicalObject::fillContactMatrix(), ArticulatedAgentBase::fillContactMatrix(), ArticulatedAgentQuasistatic::forwardAccelerations(), init(), and initForcesVelocities().

real* ContactSolver::contactVectorTemp [private]
 

A temporary vector used in the Baraff algorithm.

Definition at line 64 of file ContactSolver.h.

Referenced by ContactSolver(), driveToZero(), init(), and maxStep().

real* ContactSolver::contactVelocities [private]
 

The a vector of the Baraff algorithm.

Definition at line 70 of file ContactSolver.h.

Referenced by ContactSolver(), driveToZero(), init(), initForcesVelocities(), and maxStep().

int ContactSolver::nContacts [private]
 

The current number of contacts.

Definition at line 52 of file ContactSolver.h.

Referenced by computeContacts(), ContactSolver(), driveToZero(), and init().

int ContactSolver::nContactsMax [private]
 

The maximum number of contacts that fit in the current contact data structures.

Definition at line 55 of file ContactSolver.h.

Referenced by ContactSolver(), and init().

real** ContactSolver::tempMatrix
 

Definition at line 41 of file ContactSolver.h.

Referenced by ContactSolver(), driveToZero(), init(), and ~ContactSolver().

real* ContactSolver::tempVector1
 

A temporary vector for system solving.

Definition at line 39 of file ContactSolver.h.

Referenced by ContactSolver(), driveToZero(), and init().

real* ContactSolver::tempVector2
 

Definition at line 40 of file ContactSolver.h.

Referenced by ContactSolver(), driveToZero(), and init().

int* ContactSolver::zeros [private]
 

Counts the number of s=0 cycles for each contact

Definition at line 85 of file ContactSolver.h.

Referenced by ContactSolver(), driveToZero(), init(), and initForcesVelocities().


The documentation for this class was generated from the following files:

Thyrix homepageUsers' guide

(C) Arxia 2004-2005