FemLocalization.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_PHYSICS_FEMLOCALIZATION_H
17 #define SURGSIM_PHYSICS_FEMLOCALIZATION_H
18 
21 
22 namespace SurgSim
23 {
24 
25 namespace Physics
26 {
27 
36 {
37 public:
41  FemLocalization(std::shared_ptr<Representation> representation,
43 
45  virtual ~FemLocalization();
46 
50 
54 
55 private:
56  SurgSim::Math::Vector3d doCalculatePosition(double time) const override;
57 
58  SurgSim::Math::Vector3d doCalculateVelocity(double time) const override;
59 
62 };
63 
64 } // namespace Physics
65 
66 } // namespace SurgSim
67 
68 #endif // SURGSIM_PHYSICS_FEMLOCALIZATION_H
Definition: CompoundShapeToGraphics.cpp:29
A generic (size_t index, Vector coordinate) pair.
Definition: IndexedLocalCoordinate.h:29
SurgSim::Math::Vector3d doCalculatePosition(double time) const override
Calculates the global position of this localization.
Definition: FemLocalization.cpp:61
Implementation of Localization for Fem3DRepresentation.
Definition: FemLocalization.h:35
FemLocalization(std::shared_ptr< Representation > representation, const SurgSim::DataStructures::IndexedLocalCoordinate &localPosition)
Constructor.
Definition: FemLocalization.cpp:29
const SurgSim::DataStructures::IndexedLocalCoordinate & getLocalPosition() const
Gets the local position.
Definition: FemLocalization.cpp:56
SurgSim::Math::Vector3d doCalculateVelocity(double time) const override
Calculates the global velocity of this localization.
Definition: FemLocalization.cpp:91
void setLocalPosition(const SurgSim::DataStructures::IndexedLocalCoordinate &localPosition)
Sets the local position.
Definition: FemLocalization.cpp:42
virtual ~FemLocalization()
Destructor.
Definition: FemLocalization.cpp:38
SurgSim::DataStructures::IndexedLocalCoordinate m_position
Barycentric position in local coordinates.
Definition: FemLocalization.h:61
This class localize a point on a representation (representation specific)
Definition: Localization.h:39
Eigen::Matrix< double, 3, 1 > Vector3d
A 3D vector of doubles.
Definition: Vector.h:57