![]() |
This class localize a point on a representation (representation specific) More...
#include <SurgSim/Physics/Localization.h>
Public Member Functions | |
Localization () | |
Default constructor. More... | |
Localization (std::shared_ptr< Representation > representation) | |
Constructor. More... | |
virtual | ~Localization () |
Destructor. More... | |
void | setRepresentation (std::shared_ptr< Representation > representation) |
Sets the representation. More... | |
std::shared_ptr< Representation > | getRepresentation () const |
Gets the representation. More... | |
SurgSim::Math::Vector3d | calculatePosition (double time=1.0) const |
Calculates the global position of this localization. More... | |
SurgSim::Math::Vector3d | calculateVelocity (double time=1.0) const |
Calculates the global velocity of this localization. More... | |
virtual bool | isValidRepresentation (std::shared_ptr< Representation > representation) |
virtual Math::RigidTransform3d | getElementPose () |
Find a pose that the localization is represented with respect to. More... | |
virtual bool | moveClosestTo (const Math::Vector3d &point, bool *hasReachedEnd) |
Private Member Functions | |
virtual SurgSim::Math::Vector3d | doCalculatePosition (double time) const =0 |
Calculates the global position of this localization. More... | |
virtual SurgSim::Math::Vector3d | doCalculateVelocity (double time) const =0 |
Calculates the global velocity of this localization. More... | |
Private Attributes | |
std::shared_ptr< Representation > | m_representation |
The representation on which the localization is defined. More... | |
This class localize a point on a representation (representation specific)
SurgSim::Physics::Localization::Localization | ( | ) |
Default constructor.
|
explicit |
Constructor.
representation | The representation on which the localization is defined |
|
virtual |
Destructor.
Math::Vector3d SurgSim::Physics::Localization::calculatePosition | ( | double | time = 1.0 | ) | const |
Calculates the global position of this localization.
time | The time in [0..1] at which the position should be calculated |
SurgSim::Framework::AssertionFailure | if time is out-of-range [0..1] |
Math::Vector3d SurgSim::Physics::Localization::calculateVelocity | ( | double | time = 1.0 | ) | const |
Calculates the global velocity of this localization.
time | The time in [0..1] at which the velocity should be calculated |
SurgSim::Framework::AssertionFailure | if time is out-of-range [0..1] |
|
privatepure virtual |
Calculates the global position of this localization.
time | The time in [0..1] at which the position should be calculated |
Implemented in SurgSim::Physics::MassSpringLocalization, SurgSim::Physics::FemLocalization, and SurgSim::Physics::RigidLocalization.
|
privatepure virtual |
Calculates the global velocity of this localization.
time | The time in [0..1] at which the velocity should be calculated |
Implemented in SurgSim::Physics::MassSpringLocalization, SurgSim::Physics::FemLocalization, and SurgSim::Physics::RigidLocalization.
|
virtual |
Find a pose that the localization is represented with respect to.
In the case of a rigid representation, the pose of the representation is the pose returned. In case of a fem representation, the pose is calculated from the fem element which this localization is a part of.
Reimplemented in SurgSim::Physics::Fem2DLocalization.
std::shared_ptr< Representation > SurgSim::Physics::Localization::getRepresentation | ( | ) | const |
Gets the representation.
|
virtual |
|
virtual |
point | Move this localization closest to this point |
hasReachedEnd | [out] Flag to set, when the localization reaches the end of the representation. |
Reimplemented in SurgSim::Physics::Fem1DLocalization.
void SurgSim::Physics::Localization::setRepresentation | ( | std::shared_ptr< Representation > | representation | ) |
Sets the representation.
representation | The representation on which the localization is defined |
|
private |
The representation on which the localization is defined.