FemLocalization.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_PHYSICS_FEMLOCALIZATION_H
#define SURGSIM_PHYSICS_FEMLOCALIZATION_H
#include "SurgSim/DataStructures/IndexedLocalCoordinate.h"
#include "SurgSim/Physics/Localization.h"
namespace SurgSim
{
namespace Physics
{
class FemLocalization : public Localization
{
public:
FemLocalization(std::shared_ptr<Representation> representation,
const SurgSim::DataStructures::IndexedLocalCoordinate& localPosition);
virtual ~FemLocalization();
void setLocalPosition(const SurgSim::DataStructures::IndexedLocalCoordinate& localPosition);
const SurgSim::DataStructures::IndexedLocalCoordinate& getLocalPosition() const;
private:
SurgSim::Math::Vector3d doCalculatePosition(double time) const override;
SurgSim::Math::Vector3d doCalculateVelocity(double time) const override;
SurgSim::DataStructures::IndexedLocalCoordinate m_position;
};
} // namespace Physics
} // namespace SurgSim
#endif // SURGSIM_PHYSICS_FEMLOCALIZATION_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::DataStructures::IndexedLocalCoordinate
A generic (size_t index, Vector coordinate) pair.
Definition: IndexedLocalCoordinate.h:29
SurgSim::Physics::FemLocalization::doCalculatePosition
SurgSim::Math::Vector3d doCalculatePosition(double time) const override
Calculates the global position of this localization.
Definition: FemLocalization.cpp:61
Localization.h
SurgSim::Physics::FemLocalization
Implementation of Localization for Fem3DRepresentation.
Definition: FemLocalization.h:35
SurgSim::Physics::FemLocalization::FemLocalization
FemLocalization(std::shared_ptr< Representation > representation, const SurgSim::DataStructures::IndexedLocalCoordinate &localPosition)
Constructor.
Definition: FemLocalization.cpp:29
SurgSim::Physics::FemLocalization::getLocalPosition
const SurgSim::DataStructures::IndexedLocalCoordinate & getLocalPosition() const
Gets the local position.
Definition: FemLocalization.cpp:56
SurgSim::Physics::FemLocalization::doCalculateVelocity
SurgSim::Math::Vector3d doCalculateVelocity(double time) const override
Calculates the global velocity of this localization.
Definition: FemLocalization.cpp:91
IndexedLocalCoordinate.h
SurgSim::Physics::FemLocalization::setLocalPosition
void setLocalPosition(const SurgSim::DataStructures::IndexedLocalCoordinate &localPosition)
Sets the local position.
Definition: FemLocalization.cpp:42
SurgSim::Physics::FemLocalization::~FemLocalization
virtual ~FemLocalization()
Destructor.
Definition: FemLocalization.cpp:38
SurgSim::Physics::FemLocalization::m_position
SurgSim::DataStructures::IndexedLocalCoordinate m_position
Barycentric position in local coordinates.
Definition: FemLocalization.h:61
SurgSim::Physics::Localization
This class localize a point on a representation (representation specific)
Definition: Localization.h:39
SurgSim::Math::Vector3d
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57