16 #ifndef SURGSIM_PHYSICS_PHYSICSMANAGERSTATE_H 17 #define SURGSIM_PHYSICS_PHYSICSMANAGERSTATE_H 21 #include <unordered_map> 37 class ConstraintComponent;
89 const std::unordered_map<std::shared_ptr<SurgSim::Collision::Representation>,
95 void setCollisionPairs(std::vector<std::shared_ptr<SurgSim::Collision::CollisionPair>> val);
99 const std::vector<std::shared_ptr<SurgSim::Collision::CollisionPair>>&
getCollisionPairs();
180 std::unordered_map<std::shared_ptr<SurgSim::Collision::Representation>,
190 std::unordered_map<int, std::vector<std::shared_ptr<Constraint>>>
m_constraints;
const std::vector< std::shared_ptr< Representation > > & getActiveRepresentations() const
Gets the active physics representations.
Definition: PhysicsManagerState.cpp:68
const std::vector< std::shared_ptr< Representation > > & getRepresentations()
Gets the physics representations.
Definition: PhysicsManagerState.cpp:57
Definition: DriveElementFromInputBehavior.cpp:27
std::vector< std::shared_ptr< SurgSim::Collision::Representation > > m_collisionRepresentations
List of all the collision representations know to the state.
Definition: PhysicsManagerState.h:174
void setRepresentationsMapping(const MlcpMapping< Representation > &representationsMapping)
Set the representations mapping.
Definition: PhysicsManagerState.cpp:192
A description of a physical mixed LCP system to be solved.
Definition: MlcpPhysicsProblem.h:43
const MlcpMapping< Representation > & getRepresentationsMapping() const
Gets the representations mapping.
Definition: PhysicsManagerState.cpp:187
ConstraintGroupType
Definition: PhysicsManagerState.h:39
std::vector< std::shared_ptr< Constraint > > m_activeConstraints
The list of active constraints.
Definition: PhysicsManagerState.h:193
void setCollisionRepresentations(const std::vector< std::shared_ptr< SurgSim::Collision::Representation >> &val)
Sets the collision representations for the state.
Definition: PhysicsManagerState.cpp:81
std::vector< std::shared_ptr< Representation > > m_activeRepresentations
The list of active representations.
Definition: PhysicsManagerState.h:171
std::vector< std::shared_ptr< SurgSim::Collision::CollisionPair > > m_excludedCollisionPairs
List of collision pairs to be excluded.
Definition: PhysicsManagerState.h:187
void setCollisionPairs(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 ...
Definition: PhysicsManagerState.cpp:117
const std::vector< std::shared_ptr< SurgSim::Collision::CollisionPair > > & getCollisionPairs()
Gets collision pairs.
Definition: PhysicsManagerState.cpp:122
void setActiveConstraints(const std::vector< std::shared_ptr< Constraint >> &activeConstraints)
Filter the map of constraints into the active constraints list.
Definition: PhysicsManagerState.cpp:156
MlcpMapping< Constraint > m_constraintsIndexMapping
Constraints mapping.
Definition: PhysicsManagerState.h:199
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.
Definition: PhysicsManagerState.cpp:39
const std::vector< std::shared_ptr< SurgSim::Collision::Representation > > & getCollisionRepresentations()
Gets the collision representations.
Definition: PhysicsManagerState.cpp:88
PhysicsManagerState()
Constructor.
Definition: PhysicsManagerState.cpp:29
const std::vector< std::shared_ptr< Constraint > > & getActiveConstraints() const
Definition: PhysicsManagerState.cpp:162
void setExcludedCollisionPairs(const std::vector< std::shared_ptr< SurgSim::Collision::CollisionPair >> &val)
Sets the exclusion pairs.
Definition: PhysicsManagerState.cpp:127
Definition: PhysicsManagerState.h:41
std::vector< std::shared_ptr< ConstraintComponent > > m_constraintComponents
List of the constraint components.
Definition: PhysicsManagerState.h:177
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...
Definition: PhysicsManagerState.cpp:139
const std::vector< std::shared_ptr< ConstraintComponent > > & getConstraintComponents()
Gets the constraint components.
Definition: PhysicsManagerState.cpp:112
const std::vector< std::shared_ptr< SurgSim::Collision::CollisionPair > > & getExcludedCollisionPairs() const
Gets the exclusion pairs.
Definition: PhysicsManagerState.cpp:134
std::vector< std::shared_ptr< Representation > > m_representations
Definition: PhysicsManagerState.h:168
Definition: PhysicsManagerState.h:42
const std::unordered_map< std::shared_ptr< SurgSim::Collision::Representation >, std::shared_ptr< SurgSim::Physics::Representation > > & getCollisionToPhysicsMap() const
Definition: PhysicsManagerState.cpp:76
std::vector< std::shared_ptr< SurgSim::Collision::CollisionPair > > m_collisionPairs
The local list of collision pairs.
Definition: PhysicsManagerState.h:184
MlcpPhysicsSolution & getMlcpSolution()
Gets the Mlcp solution.
Definition: PhysicsManagerState.cpp:177
MlcpPhysicsProblem & getMlcpProblem()
Gets the Mlcp problem.
Definition: PhysicsManagerState.cpp:167
The description of a solution to a physical MLCP problem.
Definition: MlcpPhysicsSolution.h:34
const std::vector< std::shared_ptr< Constraint > > & getConstraintGroup(int type) const
Gets constraint group.
Definition: PhysicsManagerState.cpp:146
void setActiveRepresentations(const std::vector< std::shared_ptr< Representation >> &activeRepresentations)
Set the list of representations into the active representations list.
Definition: PhysicsManagerState.cpp:62
void setConstraintsMapping(const MlcpMapping< Constraint > &constraintsMapping)
Set the constraints mapping.
Definition: PhysicsManagerState.cpp:202
Definition: PhysicsManagerState.h:46
Definition: MlcpMapping.h:27
Definition: PhysicsManagerState.h:43
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.
Definition: PhysicsManagerState.h:181
MlcpPhysicsSolution m_mlcpPhysicsSolution
Mlcp solution for this Physics Manager State.
Definition: PhysicsManagerState.h:206
std::unordered_map< int, std::vector< std::shared_ptr< Constraint > > > m_constraints
The local map of constraints.
Definition: PhysicsManagerState.h:190
void setConstraintComponents(const std::vector< std::shared_ptr< ConstraintComponent >> &val)
Sets the list of constraint components.
Definition: PhysicsManagerState.cpp:93
MlcpPhysicsProblem m_mlcpPhysicsProblem
Mlcp problem for this Physics Manager State.
Definition: PhysicsManagerState.h:203
const MlcpMapping< Constraint > & getConstraintsMapping() const
Gets the constraints mapping.
Definition: PhysicsManagerState.cpp:197
MlcpMapping< Representation > m_representationsIndexMapping
Representation mapping.
Definition: PhysicsManagerState.h:196
~PhysicsManagerState()
Destructor.
Definition: PhysicsManagerState.cpp:34