16 #ifndef SURGSIM_PHYSICS_LINEARSPRING_H 17 #define SURGSIM_PHYSICS_LINEARSPRING_H 19 #include "SurgSim/Physics/Spring.h" 29 class MassSpringModel;
43 explicit LinearSpring(
const std::shared_ptr<Math::OdeState> state,
size_t nodeId0,
size_t nodeId1,
double stiffness,
50 explicit LinearSpring(
const std::shared_ptr<MassSpringModel> massSpring,
size_t nodeId0,
size_t nodeId1,
51 double stiffness,
double damping);
58 void setStiffness(
double stiffness);
62 double getStiffness()
const;
67 void setDamping(
double damping);
71 double getDamping()
const;
76 void setRestLength(
double restLength);
80 double getRestLength()
const;
101 double scale = 1.0)
override;
126 bool operator ==(
const Spring& spring)
const;
132 bool operator !=(
const Spring& spring)
const;
161 #endif // SURGSIM_PHYSICS_LINEARSPRING_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Eigen::SparseMatrix< double > SparseMatrix
A sparse matrix.
Definition: SparseMatrix.h:32
The state of an ode of 2nd order of the form with boundary conditions.
Definition: OdeState.h:38
Base class for all springs It handles the node ids to which it is connected and requires all derived ...
Definition: Spring.h:42
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
A dynamic size column vector.
Definition: Vector.h:68
Linear spring connecting 2 nodes with a viscous term.
Definition: LinearSpring.h:32
Eigen::Matrix< double, 3, 3, Eigen::RowMajor > Matrix33d
A 3x3 matrix of doubles.
Definition: Matrix.h:51