17 #ifndef GAZEBO_MATH_VECTOR3_HH_
18 #define GAZEBO_MATH_VECTOR3_HH_
23 #include <ignition/math/Vector3.hh>
29 #pragma GCC diagnostic push
30 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
68 public:
Vector3(const
double &_x, const
double &_y, const
double &_z)
73 public:
Vector3(const ignition::math::Vector3d &_v)
74 GAZEBO_DEPRECATED(8.0);
81 public: virtual ~
Vector3() GAZEBO_DEPRECATED(8.0);
85 public:
double GetSum() const GAZEBO_DEPRECATED(8.0);
90 public:
double Distance(const
Vector3 &_pt) const GAZEBO_DEPRECATED(8.0);
97 public:
double Distance(
double _x,
double _y,
double _z) const
98 GAZEBO_DEPRECATED(8.0);
102 public:
double GetLength() const GAZEBO_DEPRECATED(8.0);
106 public:
double GetSquaredLength() const GAZEBO_DEPRECATED(8.0);
110 public:
Vector3 Normalize() GAZEBO_DEPRECATED(8.0);
114 public:
Vector3 Round() GAZEBO_DEPRECATED(8.0);
118 public:
Vector3 GetRounded() const GAZEBO_DEPRECATED(8.0);
124 public: inline
void Set(
double _x = 0,
double _y = 0 ,
double _z = 0)
125 GAZEBO_DEPRECATED(8.0)
155 GAZEBO_DEPRECATED(8.0);
161 public:
double GetDistToLine(const
Vector3 &_pt1, const
Vector3 &_pt2)
162 GAZEBO_DEPRECATED(8.0);
167 public:
void SetToMax(const
Vector3 &_v) GAZEBO_DEPRECATED(8.0);
172 public:
void SetToMin(const
Vector3 &_v) GAZEBO_DEPRECATED(8.0);
176 public:
double GetMax() const GAZEBO_DEPRECATED(8.0);
180 public:
double GetMin() const GAZEBO_DEPRECATED(8.0);
184 public: ignition::math::Vector3d Ign() const GAZEBO_DEPRECATED(8.0);
189 public:
Vector3 &operator=(const ignition::math::Vector3d &_v)
190 GAZEBO_DEPRECATED(8.0);
195 public:
Vector3 &operator =(const
Vector3 &_v) GAZEBO_DEPRECATED(8.0);
200 public:
Vector3 &operator =(
double _value) GAZEBO_DEPRECATED(8.0);
205 public:
Vector3 operator+(const
Vector3 &_v) const GAZEBO_DEPRECATED(8.0);
210 GAZEBO_DEPRECATED(8.0);
214 public: inline
Vector3 operator-() const GAZEBO_DEPRECATED(8.0)
216 return Vector3(-this->x, -this->y, -this->z);
225 return Vector3(this->x - _pt.x,
278 {
return Vector3(_v.x * _s, _v.y * _s, _v.z * _s); }
295 public:
bool operator ==(
const Vector3 &_pt)
const;
302 public:
bool operator!=(
const Vector3 &_v)
const;
310 if (!std::isfinite(this->x))
312 if (!std::isfinite(this->y))
314 if (!std::isfinite(this->z))
319 public:
double operator[](
unsigned int index)
const
349 _out << precision(_pt.x, 6) <<
" " << precision(_pt.y, 6) <<
" "
350 << precision(_pt.z, 6);
363 _in.setf(std::ios_base::skipws);
364 _in >> _pt.x >> _pt.y >> _pt.z;
372 #pragma GCC diagnostic pop
double x
X location.
Definition: Vector3.hh:333
double y
Y location.
Definition: Vector3.hh:336
static const Vector3 UnitY
math::Vector3(0, 1, 0)
Definition: Vector3.hh:56
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:44
friend std::ostream & operator<<(std::ostream &_out, const gazebo::math::Vector3 &_pt) GAZEBO_DEPRECATED(8.0)
Stream insertion operator.
Definition: Vector3.hh:345
static const double GAZEBO_DEPRECATED(8.0) MAX_D
Double maximum value. This value will be similar to 1.79769e+308.
Definition: Helpers.hh:140
double z
Z location.
Definition: Vector3.hh:339
static const Vector3 UnitZ
math::Vector3(0, 0, 1)
Definition: Vector3.hh:59
static const Vector3 One
math::Vector3(1, 1, 1)
Definition: Vector3.hh:50
GAZEBO_VISIBLE void Set(common::Image &_img, const msgs::Image &_msg)
Convert a msgs::Image to a common::Image.
friend Vector3 operator*(double _s, const Vector3 &_v) GAZEBO_DEPRECATED(8.0)
Multiplication operators.
Definition: Vector3.hh:275
friend std::istream & operator>>(std::istream &_in, gazebo::math::Vector3 &_pt) GAZEBO_DEPRECATED(8.0)
Stream extraction operator.
Definition: Vector3.hh:358
static const Vector3 UnitX
math::Vector3(1, 0, 0)
Definition: Vector3.hh:53
static const Vector3 Zero
math::Vector3(0, 0, 0)
Definition: Vector3.hh:47
Vector3 operator-(const Vector3 &_pt) const GAZEBO_DEPRECATED(8.0)
Subtraction operators.
Definition: Vector3.hh:222