33 #include <visp3/ustk_needle_modeling/usNeedleTipActuated.h>
35 #include <visp3/core/vpException.h>
36 #include <visp3/core/vpHomogeneousMatrix.h>
41 :
usNeedleTip(tip), _diameter(tip._diameter), _length(tip._length), _angle(tip._angle),
42 _steeringAngle(tip._steeringAngle)
80 if (angle >= 0 && angle <= M_PI / 2)
88 if (angle >= 0 && angle <= 90)
89 _angle = M_PI / 180 * angle;
96 while (angle <= -M_PI)
107 while (angle <= -180)
118 s <<
"usNeedleTipActuated\n";
134 if (c !=
"usNeedleTipActuated") {
135 vpException e(vpException::ioError,
"Stream does not contain usNeedleTipActuated data");
150 s.write(
"usNeedleTipActuated", 20);
153 s.write((
char *)&(tip.
_diameter),
sizeof(
double));
154 s.write((
char *)&(tip.
_length),
sizeof(
double));
155 s.write((
char *)&(tip.
_angle),
sizeof(
double));
166 if (strcmp(c,
"usNeedleTipActuated")) {
167 vpException e(vpException::ioError,
"Stream does not contain usNeedleTipActuated data");
172 s.read((
char *)&(tip.
_diameter),
sizeof(
double));
173 s.read((
char *)&(tip.
_length),
sizeof(
double));
174 s.read((
char *)&(tip.
_angle),
sizeof(
double));
179 void usNeedleTipActuated::updateTipPose()
virtual usNeedleTipActuated & operator=(const usNeedleTipActuated &needle)
void setTipAngleDeg(double angle)
double getDiameter() const
double getSteeringAngleRad() const
double getTipAngleDeg() const
usNeedleTipActuated()
Constructors, destructors.
void setDiameter(double diameter)
Parameters setters and getters.
double getTipAngleRad() const
void setTipAngleRad(double angle)
double getSteeringAngleDeg() const
virtual ~usNeedleTipActuated()
virtual usNeedleTipActuated * clone() const
void setSteeringAngleRad(double angle)
void setSteeringAngleDeg(double angle)
vpHomogeneousMatrix m_worldMbase
virtual usNeedleTip & operator=(const usNeedleTip &needle)
vpHomogeneousMatrix m_worldMtip