SurgSim::Physics::RigidLocalization Class Reference

This class implements the localization on a RigidRepresentationBase, as a local position. More...

`#include <SurgSim/Physics/RigidLocalization.h>`

Inheritance diagram for SurgSim::Physics::RigidLocalization:

## Public Member Functions

| RigidLocalization ()
| Default constructor. More...
| RigidLocalization (std::shared_ptr< Representation > representation)
| Constructor. More...
virtual | ~RigidLocalization ()
| Destructor. More...
void | setLocalPosition (const SurgSim::Math::Vector3d &p)
| Sets the local position. More...
const SurgSim::Math::Vector3d & | getLocalPosition () const
| Gets the local position. More...
bool | isValidRepresentation (std::shared_ptr< Representation > representation) override
| Query if 'representation' is valid representation. More...
Public Member Functions inherited from SurgSim::Physics::Localization
| 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 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

SurgSim::Math::Vector3d | doCalculatePosition (double time) const
| Calculates the global position of this localization. More...
SurgSim::Math::Vector3d | doCalculateVelocity (double time) const
| Calculates the global velocity of this localization. More...

## Private Attributes

SurgSim::Math::Vector3d | m_position
| 3D position in local coordinates. More...

## Detailed Description

This class implements the localization on a RigidRepresentationBase, as a local position.

## Constructor & Destructor Documentation

## RigidLocalization() [1/2]

SurgSim::Physics::RigidLocalization::RigidLocalization | ( |  | ) |

Default constructor.

## RigidLocalization() [2/2]

SurgSim::Physics::RigidLocalization::RigidLocalization | ( | std::shared_ptr< Representation > | representation | ) |

explicit

Constructor.

Parameters

  representation | The representation to assign to this localization.

## ~RigidLocalization()

SurgSim::Physics::RigidLocalization::~RigidLocalization | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## doCalculatePosition()

SurgSim::Math::Vector3d SurgSim::Physics::RigidLocalization::doCalculatePosition | ( | double | time | ) | const

private virtual

Calculates the global position of this localization.

Parameters

  time | The time in [0..1] at which the position should be calculated.

Returns
  The global position of the localization at the requested time.

Note
  time can useful when dealing with CCD.

Implements SurgSim::Physics::Localization.

## doCalculateVelocity()

SurgSim::Math::Vector3d SurgSim::Physics::RigidLocalization::doCalculateVelocity | ( | double | time | ) | const

private virtual

Calculates the global velocity of this localization.

Parameters

  time | The time in [0..1] at which the velocity should be calculated

Returns
  The global velocity of the localization at the requested time

Note
  time can useful when dealing with CCD

Implements SurgSim::Physics::Localization.

## getLocalPosition()

const SurgSim::Math::Vector3d & SurgSim::Physics::RigidLocalization::getLocalPosition | ( |  | ) | const

Gets the local position.

Returns
  The local position set for this localization.

## isValidRepresentation()

bool SurgSim::Physics::RigidLocalization::isValidRepresentation | ( | std::shared_ptr< Representation > | representation | ) |

override virtual

Query if 'representation' is valid representation.

Parameters

  representation | The representation.

Returns
  true if valid representation, false if not.

Reimplemented from SurgSim::Physics::Localization.

## setLocalPosition()

void SurgSim::Physics::RigidLocalization::setLocalPosition | ( | const SurgSim::Math::Vector3d & | p | ) |

Sets the local position.

Parameters

  p | The local position to set the localization at.

## Member Data Documentation

## m_position

SurgSim::Math::Vector3d SurgSim::Physics::RigidLocalization::m_position

private

3D position in local coordinates.

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

- SurgSim/Physics/RigidLocalization.h
- SurgSim/Physics/RigidLocalization.cpp