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

#include <SurgSim/Physics/PhysicsManagerState.h>

Public Member Functions

 PhysicsManagerState ()
 Constructor. More...
 
 ~PhysicsManagerState ()
 Destructor. More...
 
void setRepresentations (const std::vector< std::shared_ptr< Representation >> &val)
 Sets the physics representations for the state, these are the basis for all the computations. More...
 
const std::vector< std::shared_ptr< Representation > > & getRepresentations ()
 Gets the physics representations. More...
 
void setActiveRepresentations (const std::vector< std::shared_ptr< Representation >> &activeRepresentations)
 Set the list of representations into the active representations list. More...
 
const std::vector< std::shared_ptr< Representation > > & getActiveRepresentations () const
 Gets the active physics representations. More...
 
void setCollisionRepresentations (const std::vector< std::shared_ptr< SurgSim::Collision::Representation >> &val)
 Sets the collision representations for the state. More...
 
const std::vector< std::shared_ptr< SurgSim::Collision::Representation > > & getCollisionRepresentations ()
 Gets the collision representations. More...
 
void setActiveCollisionRepresentations (const std::vector< std::shared_ptr< SurgSim::Collision::Representation >> &val)
 Sets the active collision representations for the state. More...
 
const std::vector< std::shared_ptr< SurgSim::Collision::Representation > > & getActiveCollisionRepresentations ()
 Gets the list of active collision representations. More...
 
void setParticleRepresentations (const std::vector< std::shared_ptr< SurgSim::Particles::Representation >> &val)
 Sets the particle representations for the state. More...
 
const std::vector< std::shared_ptr< SurgSim::Particles::Representation > > & getParticleRepresentations ()
 Gets the particle representations. More...
 
void setActiveParticleRepresentations (const std::vector< std::shared_ptr< SurgSim::Particles::Representation >> &val)
 Sets the active particle representations for the state. More...
 
const std::vector< std::shared_ptr< SurgSim::Particles::Representation > > & getActiveParticleRepresentations ()
 Gets the list of active particle representations. More...
 
void setConstraintComponents (const std::vector< std::shared_ptr< ConstraintComponent >> &val)
 Sets the list of constraint components. More...
 
const std::vector< std::shared_ptr< ConstraintComponent > > & getConstraintComponents ()
 Gets the constraint components. More...
 
const std::unordered_map< std::shared_ptr< SurgSim::Collision::Representation >, std::shared_ptr< SurgSim::Physics::Representation > > & getCollisionToPhysicsMap () const
 
void setCollisionPairs (const std::vector< std::shared_ptr< SurgSim::Collision::CollisionPair >> &val)
 Sets collision pairs that should be considered, while this is not being verified the collision pairs should only be from the list of representations that are in this state. More...
 
const std::vector< std::shared_ptr< SurgSim::Collision::CollisionPair > > & getCollisionPairs ()
 Gets collision pairs. More...
 
void setContactFilters (const std::vector< std::shared_ptr< SurgSim::Collision::ContactFilter >> &val)
 Set the list of contact filters. More...
 
std::vector< std::shared_ptr< SurgSim::Collision::ContactFilter > > getContactFilters () const
 
void setConstraintGroup (ConstraintGroupType type, const std::vector< std::shared_ptr< Constraint >> &constraints)
 Sets the group of constraints to a given value, the grouping indicates what type of constraint we are dealing with. More...
 
const std::vector< std::shared_ptr< Constraint > > & getConstraintGroup (int type) const
 Gets constraint group. More...
 
void setActiveConstraints (const std::vector< std::shared_ptr< Constraint >> &activeConstraints)
 Filter the map of constraints into the active constraints list. More...
 
const std::vector< std::shared_ptr< Constraint > > & getActiveConstraints () const
 
MlcpPhysicsProblemgetMlcpProblem ()
 Gets the Mlcp problem. More...
 
const MlcpPhysicsProblemgetMlcpProblem () const
 Gets the Mlcp problem. More...
 
MlcpPhysicsSolutiongetMlcpSolution ()
 Gets the Mlcp solution. More...
 
const MlcpPhysicsSolutiongetMlcpSolution () const
 Gets the Mlcp solution. More...
 
const MlcpMapping< Representation > & getRepresentationsMapping () const
 Gets the representations mapping. More...
 
void setRepresentationsMapping (const MlcpMapping< Representation > &representationsMapping)
 Set the representations mapping. More...
 
const MlcpMapping< Constraint > & getConstraintsMapping () const
 Gets the constraints mapping. More...
 
void setConstraintsMapping (const MlcpMapping< Constraint > &constraintsMapping)
 Set the constraints mapping. More...
 
void setTimeOfImpact (double timeOfImpact)
 Set the time of impact. More...
 
double getTimeOfImpact ()
 
bool shouldAbortGroup () const
 
void setAbortGroup (bool val)
 Set whether to abort the current grouped computation. More...
 

Private Attributes

MlcpPhysicsProblem m_mlcpPhysicsProblem
 Mlcp problem for this Physics Manager State. More...
 
MlcpPhysicsSolution m_mlcpPhysicsSolution
 Mlcp solution for this Physics Manager State. More...
 
bool m_abortGroup
 Flag for the abort group case. More...
 
double m_timeOfImpact
 last time of impact for a CCD calculation More...
 
std::vector< std::shared_ptr< Representation > > m_representations
 
std::vector< std::shared_ptr< Representation > > m_activeRepresentations
 The list of active representations. More...
 
std::vector< std::shared_ptr< SurgSim::Collision::Representation > > m_collisionRepresentations
 List of all the collision representations known to the state. More...
 
std::vector< std::shared_ptr< SurgSim::Collision::Representation > > m_activeCollisionRepresentations
 List of all the active collision representations known to the state. More...
 
std::vector< std::shared_ptr< Collision::ContactFilter > > m_contactFilters
 List of all the collision filters known to the state. More...
 
std::vector< std::shared_ptr< SurgSim::Particles::Representation > > m_particleRepresentations
 List of all the particle representations known to the state. More...
 
std::vector< std::shared_ptr< SurgSim::Particles::Representation > > m_activeParticleRepresentations
 List of all the active particle representations known to the state. More...
 
std::vector< std::shared_ptr< ConstraintComponent > > m_constraintComponents
 List of the constraint components. More...
 
std::unordered_map< std::shared_ptr< SurgSim::Collision::Representation >, std::shared_ptr< SurgSim::Physics::Representation > > m_collisionsToPhysicsMap
 Mapping of collision representations to their respective physics representation. More...
 
std::vector< std::shared_ptr< SurgSim::Collision::CollisionPair > > m_collisionPairs
 The local list of collision pairs. More...
 
std::unordered_map< int, std::vector< std::shared_ptr< Constraint > > > m_constraints
 The local map of constraints. More...
 
std::vector< std::shared_ptr< Constraint > > m_activeConstraints
 The list of active constraints. More...
 
MlcpMapping< Representationm_representationsIndexMapping
 Representation mapping. More...
 
MlcpMapping< Constraintm_constraintsIndexMapping
 Constraints mapping. More...
 

Constructor & Destructor Documentation

§ PhysicsManagerState()

SurgSim::Physics::PhysicsManagerState::PhysicsManagerState ( )

Constructor.

§ ~PhysicsManagerState()

SurgSim::Physics::PhysicsManagerState::~PhysicsManagerState ( )

Destructor.

Member Function Documentation

§ getActiveCollisionRepresentations()

const std::vector< std::shared_ptr< SurgSim::Collision::Representation > > & SurgSim::Physics::PhysicsManagerState::getActiveCollisionRepresentations ( )

Gets the list of active collision representations.

Returns
The active collision representations that are known to the state.

§ getActiveConstraints()

const std::vector< std::shared_ptr< Constraint > > & SurgSim::Physics::PhysicsManagerState::getActiveConstraints ( ) const
Returns
The list of all active constraints.

§ getActiveParticleRepresentations()

const std::vector< std::shared_ptr< Particles::Representation > > & SurgSim::Physics::PhysicsManagerState::getActiveParticleRepresentations ( )

Gets the list of active particle representations.

Returns
The active particle representations that are known to the state.

§ getActiveRepresentations()

const std::vector< std::shared_ptr< Representation > > & SurgSim::Physics::PhysicsManagerState::getActiveRepresentations ( ) const

Gets the active physics representations.

Returns
The active physics representations that are known to the state.

§ getCollisionPairs()

const std::vector< std::shared_ptr< SurgSim::Collision::CollisionPair > > & SurgSim::Physics::PhysicsManagerState::getCollisionPairs ( )

Gets collision pairs.

Returns
The collision pairs.

§ getCollisionRepresentations()

const std::vector< std::shared_ptr< SurgSim::Collision::Representation > > & SurgSim::Physics::PhysicsManagerState::getCollisionRepresentations ( )

Gets the collision representations.

Returns
The collision representations that are known to the state.

§ getCollisionToPhysicsMap()

const std::unordered_map< std::shared_ptr< SurgSim::Collision::Representation >, std::shared_ptr< SurgSim::Physics::Representation > > & SurgSim::Physics::PhysicsManagerState::getCollisionToPhysicsMap ( ) const
Returns
A map that associates collision representations with physics representations where map[physicsRep->getCollisionRepresentation] = physicsRep

§ getConstraintComponents()

const std::vector< std::shared_ptr< ConstraintComponent > > & SurgSim::Physics::PhysicsManagerState::getConstraintComponents ( )

Gets the constraint components.

Returns
The constraint components known to the state

§ getConstraintGroup()

const std::vector< std::shared_ptr< Constraint > > & SurgSim::Physics::PhysicsManagerState::getConstraintGroup ( int  type) const

Gets constraint group.

Parameters
typeThe type.
Returns
The constraint group.

§ getConstraintsMapping()

const MlcpMapping< Constraint > & SurgSim::Physics::PhysicsManagerState::getConstraintsMapping ( ) const

Gets the constraints mapping.

Returns
The constraints mapping (mapping between the constraints and the mlcp) Each constraint has an index in the mlcp. This mapping is about this index.

§ getContactFilters()

std::vector< std::shared_ptr< SurgSim::Collision::ContactFilter > > SurgSim::Physics::PhysicsManagerState::getContactFilters ( ) const
Returns
the list of contact filters

§ getMlcpProblem() [1/2]

MlcpPhysicsProblem & SurgSim::Physics::PhysicsManagerState::getMlcpProblem ( )

Gets the Mlcp problem.

Returns
The Mlcp problem for this physics manager state (read/write access).

§ getMlcpProblem() [2/2]

const MlcpPhysicsProblem & SurgSim::Physics::PhysicsManagerState::getMlcpProblem ( ) const

Gets the Mlcp problem.

Returns
The Mlcp problem for this physics manager state (const).

§ getMlcpSolution() [1/2]

MlcpPhysicsSolution & SurgSim::Physics::PhysicsManagerState::getMlcpSolution ( )

Gets the Mlcp solution.

Returns
The Mlcp solution for this physics manager state (read/write access).

§ getMlcpSolution() [2/2]

const MlcpPhysicsSolution & SurgSim::Physics::PhysicsManagerState::getMlcpSolution ( ) const

Gets the Mlcp solution.

Returns
The Mlcp solution for this physics manager state (const).

§ getParticleRepresentations()

const std::vector< std::shared_ptr< Particles::Representation > > & SurgSim::Physics::PhysicsManagerState::getParticleRepresentations ( )

Gets the particle representations.

Returns
The particle representations that are known to the state.

§ getRepresentations()

const std::vector< std::shared_ptr< Representation > > & SurgSim::Physics::PhysicsManagerState::getRepresentations ( )

Gets the physics representations.

Returns
The physics representations that are known to the state.

§ getRepresentationsMapping()

const MlcpMapping< Representation > & SurgSim::Physics::PhysicsManagerState::getRepresentationsMapping ( ) const

Gets the representations mapping.

Returns
The representations mapping (mapping between the representation and the mlcp) Each representation has an index in the mlcp. This mapping is about this index.

§ getTimeOfImpact()

double SurgSim::Physics::PhysicsManagerState::getTimeOfImpact ( )
Returns
the last time of impact when a CCD calculation ran

§ setAbortGroup()

void SurgSim::Physics::PhysicsManagerState::setAbortGroup ( bool  val)

Set whether to abort the current grouped computation.

Parameters
valset to true to signal to an above computation to abort

§ setActiveCollisionRepresentations()

void SurgSim::Physics::PhysicsManagerState::setActiveCollisionRepresentations ( const std::vector< std::shared_ptr< SurgSim::Collision::Representation >> &  val)

Sets the active collision representations for the state.

Parameters
valcollection of all active collision representations.

§ setActiveConstraints()

void SurgSim::Physics::PhysicsManagerState::setActiveConstraints ( const std::vector< std::shared_ptr< Constraint >> &  activeConstraints)

Filter the map of constraints into the active constraints list.

Parameters
activeConstraintsThe list of active constraints.

§ setActiveParticleRepresentations()

void SurgSim::Physics::PhysicsManagerState::setActiveParticleRepresentations ( const std::vector< std::shared_ptr< SurgSim::Particles::Representation >> &  val)

Sets the active particle representations for the state.

Parameters
valcollection of all active particle representations.

§ setActiveRepresentations()

void SurgSim::Physics::PhysicsManagerState::setActiveRepresentations ( const std::vector< std::shared_ptr< Representation >> &  activeRepresentations)

Set the list of representations into the active representations list.

Parameters
activeRepresentationsThe active physics representations that are known to the state.

§ setCollisionPairs()

void SurgSim::Physics::PhysicsManagerState::setCollisionPairs ( const std::vector< std::shared_ptr< SurgSim::Collision::CollisionPair >> &  val)

Sets collision pairs that should be considered, while this is not being verified the collision pairs should only be from the list of representations that are in this state.

Parameters
valThe list of collision pairs.

§ setCollisionRepresentations()

void SurgSim::Physics::PhysicsManagerState::setCollisionRepresentations ( const std::vector< std::shared_ptr< SurgSim::Collision::Representation >> &  val)

Sets the collision representations for the state.

Parameters
valcollection of all collision representations.

§ setConstraintComponents()

void SurgSim::Physics::PhysicsManagerState::setConstraintComponents ( const std::vector< std::shared_ptr< ConstraintComponent >> &  val)

Sets the list of constraint components.

Parameters
valcollection of all constraint components

§ setConstraintGroup()

void SurgSim::Physics::PhysicsManagerState::setConstraintGroup ( ConstraintGroupType  type,
const std::vector< std::shared_ptr< Constraint >> &  constraints 
)

Sets the group of constraints to a given value, the grouping indicates what type of constraint we are dealing with.

Parameters
typeThe type of constraint grouping e.g. Contact Constraints.
constraintsThe constraints.

§ setConstraintsMapping()

void SurgSim::Physics::PhysicsManagerState::setConstraintsMapping ( const MlcpMapping< Constraint > &  constraintsMapping)

Set the constraints mapping.

Parameters
constraintsMappingThe constraints mapping (mapping between the constraints and the mlcp)

§ setContactFilters()

void SurgSim::Physics::PhysicsManagerState::setContactFilters ( const std::vector< std::shared_ptr< SurgSim::Collision::ContactFilter >> &  val)

Set the list of contact filters.

Parameters
valthe list of contact filters

§ setParticleRepresentations()

void SurgSim::Physics::PhysicsManagerState::setParticleRepresentations ( const std::vector< std::shared_ptr< SurgSim::Particles::Representation >> &  val)

Sets the particle representations for the state.

Parameters
valcollection of all particle representations.

§ setRepresentations()

void SurgSim::Physics::PhysicsManagerState::setRepresentations ( const std::vector< std::shared_ptr< Representation >> &  val)

Sets the physics representations for the state, these are the basis for all the computations.

Parameters
valThe list of representations.

§ setRepresentationsMapping()

void SurgSim::Physics::PhysicsManagerState::setRepresentationsMapping ( const MlcpMapping< Representation > &  representationsMapping)

Set the representations mapping.

Parameters
representationsMappingThe representations mapping (mapping between the representation and the mlcp)

§ setTimeOfImpact()

void SurgSim::Physics::PhysicsManagerState::setTimeOfImpact ( double  timeOfImpact)

Set the time of impact.

Parameters
timeOfImpactthe time of impact for CCD

§ shouldAbortGroup()

bool SurgSim::Physics::PhysicsManagerState::shouldAbortGroup ( ) const
Returns
whether to abort a grouped computation by the calling group

Member Data Documentation

§ m_abortGroup

bool SurgSim::Physics::PhysicsManagerState::m_abortGroup
private

Flag for the abort group case.

§ m_activeCollisionRepresentations

std::vector<std::shared_ptr<SurgSim::Collision::Representation> > SurgSim::Physics::PhysicsManagerState::m_activeCollisionRepresentations
private

List of all the active collision representations known to the state.

§ m_activeConstraints

std::vector<std::shared_ptr<Constraint> > SurgSim::Physics::PhysicsManagerState::m_activeConstraints
private

The list of active constraints.

§ m_activeParticleRepresentations

std::vector<std::shared_ptr<SurgSim::Particles::Representation> > SurgSim::Physics::PhysicsManagerState::m_activeParticleRepresentations
private

List of all the active particle representations known to the state.

§ m_activeRepresentations

std::vector<std::shared_ptr<Representation> > SurgSim::Physics::PhysicsManagerState::m_activeRepresentations
private

The list of active representations.

§ m_collisionPairs

std::vector<std::shared_ptr<SurgSim::Collision::CollisionPair> > SurgSim::Physics::PhysicsManagerState::m_collisionPairs
private

The local list of collision pairs.

§ m_collisionRepresentations

std::vector<std::shared_ptr<SurgSim::Collision::Representation> > SurgSim::Physics::PhysicsManagerState::m_collisionRepresentations
private

List of all the collision representations known to the state.

§ m_collisionsToPhysicsMap

std::unordered_map<std::shared_ptr<SurgSim::Collision::Representation>, std::shared_ptr<SurgSim::Physics::Representation> > SurgSim::Physics::PhysicsManagerState::m_collisionsToPhysicsMap
private

Mapping of collision representations to their respective physics representation.

§ m_constraintComponents

std::vector<std::shared_ptr<ConstraintComponent> > SurgSim::Physics::PhysicsManagerState::m_constraintComponents
private

List of the constraint components.

§ m_constraints

std::unordered_map<int, std::vector<std::shared_ptr<Constraint> > > SurgSim::Physics::PhysicsManagerState::m_constraints
private

The local map of constraints.

§ m_constraintsIndexMapping

MlcpMapping<Constraint> SurgSim::Physics::PhysicsManagerState::m_constraintsIndexMapping
private

Constraints mapping.

§ m_contactFilters

std::vector<std::shared_ptr<Collision::ContactFilter> > SurgSim::Physics::PhysicsManagerState::m_contactFilters
private

List of all the collision filters known to the state.

§ m_mlcpPhysicsProblem

MlcpPhysicsProblem SurgSim::Physics::PhysicsManagerState::m_mlcpPhysicsProblem
private

Mlcp problem for this Physics Manager State.

§ m_mlcpPhysicsSolution

MlcpPhysicsSolution SurgSim::Physics::PhysicsManagerState::m_mlcpPhysicsSolution
private

Mlcp solution for this Physics Manager State.

§ m_particleRepresentations

std::vector<std::shared_ptr<SurgSim::Particles::Representation> > SurgSim::Physics::PhysicsManagerState::m_particleRepresentations
private

List of all the particle representations known to the state.

§ m_representations

std::vector<std::shared_ptr<Representation> > SurgSim::Physics::PhysicsManagerState::m_representations
private

Local state data structures, please note that the physics state may get copied, these data structures should copy their contents on copy. With the caveat that objects contained within those structures might not get copied themselves. The local list of representations

§ m_representationsIndexMapping

MlcpMapping<Representation> SurgSim::Physics::PhysicsManagerState::m_representationsIndexMapping
private

Representation mapping.

§ m_timeOfImpact

double SurgSim::Physics::PhysicsManagerState::m_timeOfImpact
private

last time of impact for a CCD calculation


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