![]() |
Computation to determine the contacts between a list of CollisionPairs. More...
#include <SurgSim/Physics/DcdCollision.h>
Public Member Functions | |
DcdCollision (bool doCopyState=false) | |
Constructor. More... | |
virtual | ~DcdCollision () |
Destructor. More... | |
![]() | |
Computation (bool doCopyState) | |
Constructor. More... | |
virtual | ~Computation () |
Destructor. More... | |
std::shared_ptr< PhysicsManagerState > | update (double dt, const std::shared_ptr< PhysicsManagerState > &state) |
Public Interface execute this objects computations, dt is the time from the last update call in seconds. More... | |
void | setDoCopyState (bool val) |
Sets up whether the computation will copy the state of PhysicsManagerState before executing. More... | |
bool | isCopyingState () |
Query if this object is copying the PhysicsManagerState. More... | |
Protected Member Functions | |
virtual std::shared_ptr< PhysicsManagerState > | doUpdate (const double &dt, const std::shared_ptr< PhysicsManagerState > &state) override |
Executes the update operation, overridden from Computation. More... | |
Private Member Functions | |
void | populateCalculationTable () |
Initializes the table of ContactCalculation objects. More... | |
void | updatePairs (std::shared_ptr< PhysicsManagerState > state) |
Updates the collision pairs. More... | |
void | setDcdContactInTable (std::shared_ptr< SurgSim::Collision::ContactCalculation > dcdContact) |
Function to populate the m_contactCalculations table for each DcdContact class. More... | |
Private Attributes | |
std::shared_ptr< SurgSim::Collision::ContactCalculation > | m_contactCalculations [SurgSim::Math::SHAPE_TYPE_COUNT][SurgSim::Math::SHAPE_TYPE_COUNT] |
Table containing contact calculation, the indices indicate the type of the first pair object and the second pair object in order. More... | |
Computation to determine the contacts between a list of CollisionPairs.
This Computation class takes a list of representations, it will generate a list of collision pairs from this list on every frame, for each CollisionPair, it uses a two dimensional table of function objects (ContactCalculation) to determine how to calculate a contact between the two members of each pair, if no specific function exists a default function will be used. will update the collision pairs accordingly.
|
explicit |
Constructor.
doCopyState | Specify if the output state in Computation::Update() is a copy or not of the input state |
|
virtual |
Destructor.
|
overrideprotectedvirtual |
Executes the update operation, overridden from Computation.
dt | The time passed. |
state | The PhysicsManagerState from previous computation. |
Implements SurgSim::Physics::Computation.
|
private |
Initializes the table of ContactCalculation objects.
|
private |
Function to populate the m_contactCalculations table for each DcdContact class.
|
private |
Updates the collision pairs.
|
private |
Table containing contact calculation, the indices indicate the type of the first pair object and the second pair object in order.