MassSpring1DRepresentation.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_BLOCKS_MASSSPRING1DREPRESENTATION_H
17 #define SURGSIM_BLOCKS_MASSSPRING1DREPRESENTATION_H
18 
19 #include <array>
20 #include <vector>
21 
23 
24 namespace SurgSim
25 {
26 
27 namespace Blocks
28 {
29 
30 // This class defines a simple MassSpring 1D structures
32 {
33 public:
36  explicit MassSpring1DRepresentation(const std::string& name) :
37  SurgSim::Physics::MassSpringRepresentation(name)
38  {
39  }
40 
49  void init1D(const std::vector<SurgSim::Math::Vector3d> nodes,
50  std::vector<size_t> nodeBoundaryConditions,
51  double totalMass,
52  double stiffnessStretching, double dampingStretching,
53  double stiffnessBending, double dampingBending);
54 
55 };
56 
57 }; // namespace Blocks
58 
59 }; // namespace SurgSim
60 
61 #endif // SURGSIM_BLOCKS_MASSSPRING1DREPRESENTATION_H
SurgSim::Blocks::MassSpring1DRepresentation
Definition: MassSpring1DRepresentation.h:32
SurgSim::Blocks::MassSpring1DRepresentation::MassSpring1DRepresentation
MassSpring1DRepresentation(const std::string &name)
Constructor.
Definition: MassSpring1DRepresentation.h:36
SurgSim::Physics::MassSpringRepresentation
MassSpring model is a deformable model (a set of masses connected by springs).
Definition: MassSpringRepresentation.h:39
SurgSim::Physics::MassSpringRepresentation::MassSpringRepresentation
MassSpringRepresentation(const std::string &name)
Constructor.
Definition: MassSpringRepresentation.cpp:35
SurgSim
Definition: CompoundShapeToGraphics.cpp:30
MassSpringRepresentation.h
SurgSim::Blocks::MassSpring1DRepresentation::init1D
void init1D(const std::vector< SurgSim::Math::Vector3d > nodes, std::vector< size_t > nodeBoundaryConditions, double totalMass, double stiffnessStretching, double dampingStretching, double stiffnessBending, double dampingBending)
Initializes a 1D model from a given list of nodes.
Definition: MassSpring1DRepresentation.cpp:31
string
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38