opensurgsim
Public Member Functions | List of all members
SurgSim::Physics::Fem2DLocalization Class Reference

Implementation of Localization for Fem2DRepresentation. More...

#include <Fem2DLocalization.h>

Inheritance diagram for SurgSim::Physics::Fem2DLocalization:
SurgSim::Physics::FemLocalization SurgSim::Physics::Localization

Public Member Functions

 Fem2DLocalization (std::shared_ptr< Representation > representation, const SurgSim::DataStructures::IndexedLocalCoordinate &localCoordinate)
 Constructor. More...
 
virtual ~Fem2DLocalization ()
 Destructor.
 
bool isValidRepresentation (std::shared_ptr< Representation > representation) override
 Query if 'representation' is valid representation. More...
 
Math::RigidTransform3d getElementPose () override
 Find a pose that the localization is represented with respect to. More...
 
std::shared_ptr< LocalizationdoCopy () const override
 
- Public Member Functions inherited from SurgSim::Physics::FemLocalization
 FemLocalization (std::shared_ptr< Representation > representation, const SurgSim::DataStructures::IndexedLocalCoordinate &localPosition)
 Constructor. More...
 
virtual ~FemLocalization ()
 Destructor.
 
void setLocalPosition (const SurgSim::DataStructures::IndexedLocalCoordinate &localPosition)
 Sets the local position. More...
 
const SurgSim::DataStructures::IndexedLocalCoordinategetLocalPosition () const
 Gets the local position. More...
 
- Public Member Functions inherited from SurgSim::Physics::Localization
 Localization ()
 Default constructor.
 
 Localization (std::shared_ptr< Representation > representation)
 Constructor. More...
 
virtual ~Localization ()
 Destructor.
 
void setRepresentation (std::shared_ptr< Representation > representation)
 Sets the representation. More...
 
std::shared_ptr< RepresentationgetRepresentation () 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 moveClosestTo (const Math::Vector3d &point, bool *hasReachedEnd)
 
std::shared_ptr< Localizationcopy () const
 

Detailed Description

Implementation of Localization for Fem2DRepresentation.

Fem2DLocalization tracks the global coordinates of an IndexedLocalCoordinate associated with an Fem2DRepresentation. The IndexedLocalCoordinate must be related to an FemElement (the index is an FemElement id and the local coordinates are the barycentric coordinates of the nodes in this FemElement).

Constructor & Destructor Documentation

§ Fem2DLocalization()

SurgSim::Physics::Fem2DLocalization::Fem2DLocalization ( std::shared_ptr< Representation representation,
const SurgSim::DataStructures::IndexedLocalCoordinate localCoordinate 
)

Constructor.

Parameters
representationThe representation to assign to this localization.
localCoordinateThe indexed local coordinate relative to the representation.

Member Function Documentation

§ doCopy()

std::shared_ptr< Localization > SurgSim::Physics::Fem2DLocalization::doCopy ( ) const
overridevirtual
Returns
A copy.

Implements SurgSim::Physics::Localization.

§ getElementPose()

Math::RigidTransform3d SurgSim::Physics::Fem2DLocalization::getElementPose ( )
overridevirtual

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.

Returns
The pose that the localization is represented with respect to.

Reimplemented from SurgSim::Physics::Localization.

§ isValidRepresentation()

bool SurgSim::Physics::Fem2DLocalization::isValidRepresentation ( std::shared_ptr< Representation representation)
overridevirtual

Query if 'representation' is valid representation.

Parameters
representationThe representation.
Returns
true if valid representation, false if not.

Reimplemented from SurgSim::Physics::Localization.


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