![]() |
Generate a constraint for every contact that was calculated. More...
#include <SurgSim/Physics/ContactConstraintGeneration.h>
Public Member Functions | |
ContactConstraintGeneration (bool doCopyState=false) | |
Constructor. More... | |
SURGSIM_CLASSNAME (SurgSim::Physics::ContactConstraintGeneration) | |
~ContactConstraintGeneration () | |
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... | |
virtual std::string | getClassName () const =0 |
The class name for this class. More... | |
Framework::Timer & | getTimer () |
Provides access to the update timer. More... | |
Private Member Functions | |
std::shared_ptr< PhysicsManagerState > | doUpdate (const double &dt, const std::shared_ptr< PhysicsManagerState > &state) override |
Overridden function from Computation, the actual work is done here. More... | |
std::shared_ptr< SurgSim::DataStructures::Location > | makeLocation (std::shared_ptr< SurgSim::Physics::Representation > physicsRepresentation, std::shared_ptr< SurgSim::Collision::Representation > collisionRepresentation, const SurgSim::DataStructures::Location &location) |
Generate a location from a Collision Representation. More... | |
Private Attributes | |
std::shared_ptr< SurgSim::Framework::Logger > | m_logger |
The logger for this class. More... | |
Additional Inherited Members |
Generate a constraint for every contact that was calculated.
The general algorithm is such, for each pair of Collision Representations that has Contacts For each contact:
|
explicit |
Constructor.
doCopyState | Specify if the output state in Computation::Update() is a copy or not of the input state |
SurgSim::Physics::ContactConstraintGeneration::~ContactConstraintGeneration | ( | ) |
Destructor.
|
overrideprivatevirtual |
Overridden function from Computation, the actual work is done here.
dt | The time passed from the last update in seconds. |
state | The physics state. |
Implements SurgSim::Physics::Computation.
|
private |
Generate a location from a Collision Representation.
physicsRepresentation | The physics representation. |
collisionRepresentation | The collision representation. |
location | The location generated by the contact calculation. |
SurgSim::Physics::ContactConstraintGeneration::SURGSIM_CLASSNAME | ( | SurgSim::Physics::ContactConstraintGeneration | ) |
|
private |
The logger for this class.