33 #include <visp3/ustk_needle_modeling/usVirtualSpring.h>
38 m_IsActive(true), m_IsRemovable(true), m_AllowPositionUpdate(true), m_AllowDirectionUpdate(true),
39 m_AllowStiffnessUpdate(true)
46 m_stiffness(spring.m_stiffness),
48 m_IsActive(spring.m_IsActive), m_IsRemovable(spring.m_IsRemovable),
49 m_AllowPositionUpdate(spring.m_AllowPositionUpdate), m_AllowDirectionUpdate(spring.m_AllowDirectionUpdate),
50 m_AllowStiffnessUpdate(spring.m_AllowStiffnessUpdate)
57 m_IsActive(true), m_IsRemovable(true), m_AllowPositionUpdate(true), m_AllowDirectionUpdate(true),
58 m_AllowStiffnessUpdate(true)
117 s <<
"usVirtualSpring\n";
135 if (c !=
"usVirtualSpring") {
136 vpException e(vpException::ioError,
137 "operator>>=(std::istream&, usVirtualSpring&): Stream does not contain usVirtualSpring data");
156 s.write(
"usVirtualSpring", 16);
158 s.write((
char *)&(spg.
m_stiffness),
sizeof(
double));
159 s.write((
char *)&(spg.
m_IsActive),
sizeof(
bool));
172 if (strcmp(c,
"usVirtualSpring")) {
173 vpException e(vpException::ioError,
174 "operator>>=(std::istream&, usVirtualSpring&): Stream does not contain usVirtualSpring data");
179 s.read((
char *)&(spg.
m_stiffness),
sizeof(
double));
180 s.read((
char *)&(spg.
m_IsActive),
sizeof(
bool));
const usOrientedPlane3D & operator=(const usOrientedPlane3D &plane)
void AllowDirectionUpdate(bool flag)
const usVirtualSpring & operator=(const usVirtualSpring &spring)
virtual ~usVirtualSpring()
double getStiffness() const
bool m_AllowPositionUpdate
void AllowStiffnessUpdate(bool flag)
void addStiffness(double dK)
bool m_AllowDirectionUpdate
bool IsStiffnessUpdateAllowed() const
usVirtualSpring()
Constructors, destructor.
bool m_AllowStiffnessUpdate
void AllowPositionUpdate(bool flag)
void AllowRemoval(bool flag)
bool IsPositionUpdateAllowed() const
void setStiffness(double K)
Parameters setters and getters.
bool IsDirectionUpdateAllowed() const