Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SurgSim::Physics::PrepareCollisionPairs Class Reference

Computation to determine the contacts between a list of CollisionPairs. More...

#include <SurgSim/Physics/PrepareCollisionPairs.h>

Inheritance diagram for SurgSim::Physics::PrepareCollisionPairs:
SurgSim::Physics::Computation

Public Member Functions

 PrepareCollisionPairs (bool doCopyState=false)
 Constructor. More...
 
 SURGSIM_CLASSNAME (SurgSim::Physics::PrepareCollisionPairs)
 
virtual ~PrepareCollisionPairs ()
 Destructor. More...
 
- Public Member Functions inherited from SurgSim::Physics::Computation
 Computation (bool doCopyState)
 Constructor. More...
 
virtual ~Computation ()
 Destructor. More...
 
std::shared_ptr< PhysicsManagerStateupdate (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::TimergetTimer ()
 Provides access to the update timer. More...
 

Protected Member Functions

std::shared_ptr< PhysicsManagerStatedoUpdate (const double &dt, const std::shared_ptr< PhysicsManagerState > &state) override
 Override this function to implement the computations specific behavior. More...
 

Private Attributes

double m_timeSinceLog
 The time since the collision pairs were last logged. More...
 
std::shared_ptr< Framework::Loggerm_logger
 The logger. More...
 

Detailed Description

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.

Note
When a new ContactCalculation type gets implemented, the type needs to be registered with the table inside of ContactCalculation

Constructor & Destructor Documentation

§ PrepareCollisionPairs()

SurgSim::Physics::PrepareCollisionPairs::PrepareCollisionPairs ( bool  doCopyState = false)
explicit

Constructor.

Parameters
doCopyStateSpecify if the output state in Computation::Update() is a copy or not of the input state

§ ~PrepareCollisionPairs()

SurgSim::Physics::PrepareCollisionPairs::~PrepareCollisionPairs ( )
virtual

Destructor.

Member Function Documentation

§ doUpdate()

std::shared_ptr< PhysicsManagerState > SurgSim::Physics::PrepareCollisionPairs::doUpdate ( const double &  dt,
const std::shared_ptr< PhysicsManagerState > &  state 
)
overrideprotectedvirtual

Override this function to implement the computations specific behavior.

Implements SurgSim::Physics::Computation.

§ SURGSIM_CLASSNAME()

SurgSim::Physics::PrepareCollisionPairs::SURGSIM_CLASSNAME ( SurgSim::Physics::PrepareCollisionPairs  )

Member Data Documentation

§ m_logger

std::shared_ptr<Framework::Logger> SurgSim::Physics::PrepareCollisionPairs::m_logger
private

The logger.

§ m_timeSinceLog

double SurgSim::Physics::PrepareCollisionPairs::m_timeSinceLog
private

The time since the collision pairs were last logged.


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