Public Member Functions | Private Member Functions | Private Attributes | List of all members
SurgSim::Physics::Fem3DRepresentationLocalization Class Reference

Implementation of Localization for Fem3DRepresentation. More...

#include <SurgSim/Physics/Fem3DRepresentationLocalization.h>

Inheritance diagram for SurgSim::Physics::Fem3DRepresentationLocalization:
SurgSim::Physics::Localization

Public Member Functions

 Fem3DRepresentationLocalization (std::shared_ptr< Representation > representation, const SurgSim::DataStructures::IndexedLocalCoordinate &localPosition)
 Constructor. More...
 
virtual ~Fem3DRepresentationLocalization ()
 Destructor. More...
 
void setLocalPosition (const SurgSim::DataStructures::IndexedLocalCoordinate &localPosition)
 Sets the local position. More...
 
const SurgSim::DataStructures::IndexedLocalCoordinategetLocalPosition () const
 Gets the local position. More...
 
virtual 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< RepresentationgetRepresentation () const
 Gets the representation. More...
 
SurgSim::Math::Vector3d calculatePosition (double time=1.0)
 Calculates the global position of this localization. More...
 

Private Member Functions

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

Private Attributes

SurgSim::DataStructures::IndexedLocalCoordinate m_position
 Barycentric position in local coordinates. More...
 

Detailed Description

Implementation of Localization for Fem3DRepresentation.

Fem3DRepresentationLocalization tracks the global coordinates of an IndexedLocalCoordinate associated with an Fem3DRepresentation. It is used, for example, as a helper class for filling out the MlcpPhysicsProblem in Fem3DRepresentationContact::doBuild, which constrains the motion of Fem3DRepresentation at a frictionless contact.

Constructor & Destructor Documentation

SurgSim::Physics::Fem3DRepresentationLocalization::Fem3DRepresentationLocalization ( std::shared_ptr< Representation representation,
const SurgSim::DataStructures::IndexedLocalCoordinate localPosition 
)

Constructor.

Parameters
representationThe representation to assign to this localization.
localPositionThe local position to set the localization at.
SurgSim::Physics::Fem3DRepresentationLocalization::~Fem3DRepresentationLocalization ( )
virtual

Destructor.

Member Function Documentation

SurgSim::Math::Vector3d SurgSim::Physics::Fem3DRepresentationLocalization::doCalculatePosition ( double  time)
privatevirtual

Calculates the global position of this localization.

Parameters
timeThe 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 be useful when dealing with CCD.

Implements SurgSim::Physics::Localization.

const SurgSim::DataStructures::IndexedLocalCoordinate & SurgSim::Physics::Fem3DRepresentationLocalization::getLocalPosition ( ) const

Gets the local position.

Returns
The local position set for this localization.
bool SurgSim::Physics::Fem3DRepresentationLocalization::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.

void SurgSim::Physics::Fem3DRepresentationLocalization::setLocalPosition ( const SurgSim::DataStructures::IndexedLocalCoordinate localPosition)

Sets the local position.

Parameters
localPositionThe local position to set the localization at.

Member Data Documentation

SurgSim::DataStructures::IndexedLocalCoordinate SurgSim::Physics::Fem3DRepresentationLocalization::m_position
private

Barycentric position in local coordinates.


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