opensurgsim
Fem3DCorotationalTetrahedronRepresentation.h
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013-2017, 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_FEM3DCOROTATIONALTETRAHEDRONREPRESENTATION_H
17 #define SURGSIM_PHYSICS_FEM3DCOROTATIONALTETRAHEDRONREPRESENTATION_H
18 
19 #include <memory>
20 #include <string>
21 
22 #include "SurgSim/Math/Matrix.h"
25 #include "SurgSim/Physics/Fem3DRepresentation.h"
26 
27 namespace SurgSim
28 {
29 
30 namespace Physics
31 {
32 SURGSIM_STATIC_REGISTRATION(Fem3DCorotationalTetrahedronRepresentation);
33 
39 {
40 public:
43  explicit Fem3DCorotationalTetrahedronRepresentation(const std::string& name);
44 
47 
49 
50  void setFemElementType(const std::string& type) override;
51 
52 protected:
53  SurgSim::Math::Matrix getNodeTransformation(const SurgSim::Math::OdeState& state, size_t nodeId) const override;
54 
56 };
57 
58 } // namespace Physics
59 
60 } // namespace SurgSim
61 
62 #endif // SURGSIM_PHYSICS_FEM3DCOROTATIONALTETRAHEDRONREPRESENTATION_H
Definitions of quaternion types.
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Finite Element Model 3D is a fem built with 3D FemElement.
Definition: Fem3DRepresentation.h:54
virtual ~Fem3DCorotationalTetrahedronRepresentation()
Destructor.
Definition: Fem3DCorotationalTetrahedronRepresentation.cpp:72
void calculateComplianceWarpingTransformation(const SurgSim::Math::OdeState &state) override
Calculates and stores the compliance warping transformation matrix.
Definition: Fem3DCorotationalTetrahedronRepresentation.cpp:112
SurgSim::Math::Matrix getNodeTransformation(const SurgSim::Math::OdeState &state, size_t nodeId) const override
Retrieves a specific node transformation (useful for compliance warping)
Definition: Fem3DCorotationalTetrahedronRepresentation.cpp:85
The state of an ode of 2nd order of the form with boundary conditions.
Definition: OdeState.h:38
Definitions of 2x2 and 3x3 rigid (isometric) transforms.
Definitions of small fixed-size square matrix types.
Co-rotational Tetrahedron Finite Element Model 3D is a fem built with co-rotational tetrahedron 3D Fe...
Definition: Fem3DCorotationalTetrahedronRepresentation.h:38
Fem3DCorotationalTetrahedronRepresentation(const std::string &name)
Constructor.
Definition: Fem3DCorotationalTetrahedronRepresentation.cpp:41
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dynamic size matrix.
Definition: Matrix.h:65
void setFemElementType(const std::string &type) override
Sets the FemElement type pulled from the object factory.
Definition: Fem3DCorotationalTetrahedronRepresentation.cpp:76