|
Base class for all physics constraints. Contains data specific to the constraint and a pair of implementations. More...
#include <SurgSim/Physics/Constraint.h>
Public Member Functions | |
| Constraint (std::shared_ptr< ConstraintData > data, std::shared_ptr< ConstraintImplementation > implementation0, std::shared_ptr< Localization > localization0, std::shared_ptr< ConstraintImplementation > implementation1, std::shared_ptr< Localization > localization1) | |
| Sets all the values for this constraints, does validation on the parameters and will throw it something is wrong with the constraint. More... | |
| virtual | ~Constraint () |
| Destructor. More... | |
| void | setInformation (std::shared_ptr< ConstraintData > data, std::shared_ptr< ConstraintImplementation > implementation0, std::shared_ptr< Localization > localization0, std::shared_ptr< ConstraintImplementation > implementation1, std::shared_ptr< Localization > localization1) |
| Sets all the values for this constraints, does validation on the parameters and will throw it something is wrong with the constraint. More... | |
| const std::pair< std::shared_ptr< ConstraintImplementation >, std::shared_ptr< ConstraintImplementation > > & | getImplementations () const |
| Gets both sides implementation as a pair. More... | |
| const std::pair< std::shared_ptr< Localization >, std::shared_ptr< Localization > > & | getLocalizations () const |
| Gets both sides Localization as a pair. More... | |
| std::shared_ptr< ConstraintData > | getData () const |
| Gets the data associated to this constraint. More... | |
| size_t | getNumDof () const |
| Gets the number of degree of freedom for this constraint. More... | |
| SurgSim::Math::MlcpConstraintType | getType () |
| Gets the ConstraintType for this constraint. More... | |
| void | build (double dt, MlcpPhysicsProblem *mlcpPhysicsProblem, size_t indexOfRepresentation0, size_t indexOfRepresentation1, size_t indexOfConstraint) |
| Builds subset of an Mlcp physics problem associated to this constraint. More... | |
| bool | isActive () |
Private Member Functions | |
| virtual void | doBuild (double dt, const ConstraintData &data, MlcpPhysicsProblem *mlcpPhysicsProblem, size_t indexOfRepresentation0, size_t indexOfRepresentation1, size_t indexOfConstraint) |
| Builds subset of an Mlcp physics problem associated to this constraint user-defined call for extra treatment. More... | |
Private Attributes | |
| std::shared_ptr< ConstraintData > | m_data |
| Specific data associated to this constraint. More... | |
| std::pair< std::shared_ptr< ConstraintImplementation >, std::shared_ptr< ConstraintImplementation > > | m_implementations |
| Pair of implementations defining the 2 sides of the constraint. More... | |
| std::pair< std::shared_ptr< Localization >, std::shared_ptr< Localization > > | m_localizations |
| size_t | m_numDof |
| The degrees of freedom that this constraint has. More... | |
| SurgSim::Math::MlcpConstraintType | m_constraintType |
| The type of this constraint. More... | |
Base class for all physics constraints. Contains data specific to the constraint and a pair of implementations.
| SurgSim::Physics::Constraint::Constraint | ( | std::shared_ptr< ConstraintData > | data, |
| std::shared_ptr< ConstraintImplementation > | implementation0, | ||
| std::shared_ptr< Localization > | localization0, | ||
| std::shared_ptr< ConstraintImplementation > | implementation1, | ||
| std::shared_ptr< Localization > | localization1 | ||
| ) |
Sets all the values for this constraints, does validation on the parameters and will throw it something is wrong with the constraint.
| data | The data for this constraint. |
| implementation0,implementation1 | Both sides implementation of the constraint. |
| localization0,localization1 | Both localizations of the representations involved in this constraint. |
|
virtual |
Destructor.
| void SurgSim::Physics::Constraint::build | ( | double | dt, |
| MlcpPhysicsProblem * | mlcpPhysicsProblem, | ||
| size_t | indexOfRepresentation0, | ||
| size_t | indexOfRepresentation1, | ||
| size_t | indexOfConstraint | ||
| ) |
Builds subset of an Mlcp physics problem associated to this constraint.
| dt | The time step. | |
| [in,out] | mlcpPhysicsProblem | The Mlcp physics problem to be filled up. |
| indexOfRepresentation0 | The index of the 1st representation in the Mlcp. | |
| indexOfRepresentation1 | The index of the 2nd representation in the Mlcp. | |
| indexOfConstraint | The index of this constraint in the Mlcp. |
|
privatevirtual |
Builds subset of an Mlcp physics problem associated to this constraint user-defined call for extra treatment.
| dt | The time step | |
| data | The data specific to this constraint | |
| [in,out] | mlcpPhysicsProblem | The Mlcp physics problem to be filled up |
| indexOfRepresentation0 | The index of the 1st representation in the Mlcp | |
| indexOfRepresentation1 | The index of the 2nd representation in the Mlcp | |
| indexOfConstraint | The index of this constraint in the Mlcp |
| std::shared_ptr< ConstraintData > SurgSim::Physics::Constraint::getData | ( | ) | const |
Gets the data associated to this constraint.
| const std::pair< std::shared_ptr< ConstraintImplementation >, std::shared_ptr< ConstraintImplementation > > & SurgSim::Physics::Constraint::getImplementations | ( | ) | const |
Gets both sides implementation as a pair.
| const std::pair< std::shared_ptr< Localization >, std::shared_ptr< Localization > > & SurgSim::Physics::Constraint::getLocalizations | ( | ) | const |
Gets both sides Localization as a pair.
| size_t SurgSim::Physics::Constraint::getNumDof | ( | ) | const |
Gets the number of degree of freedom for this constraint.
| SurgSim::Math::MlcpConstraintType SurgSim::Physics::Constraint::getType | ( | ) |
Gets the ConstraintType for this constraint.
| bool SurgSim::Physics::Constraint::isActive | ( | ) |
| void SurgSim::Physics::Constraint::setInformation | ( | std::shared_ptr< ConstraintData > | data, |
| std::shared_ptr< ConstraintImplementation > | implementation0, | ||
| std::shared_ptr< Localization > | localization0, | ||
| std::shared_ptr< ConstraintImplementation > | implementation1, | ||
| std::shared_ptr< Localization > | localization1 | ||
| ) |
Sets all the values for this constraints, does validation on the parameters and will throw it something is wrong with the constraint.
| data | The data for this constraint. |
| implementation0,implementation1 | Both sides implementation of the constraint. |
| localization0,localization1 | Both localizations of the representations involved in this constraint. |
|
private |
The type of this constraint.
|
private |
Specific data associated to this constraint.
|
private |
Pair of implementations defining the 2 sides of the constraint.
|
private |
|
private |
The degrees of freedom that this constraint has.
1.8.11