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)
97 public:
double Distance(
double _x,
double _y,
double _z) const
124 public: inline
void Set(
double _x = 0,
double _y = 0 ,
double _z = 0)
161 public:
double GetDistToLine(const
Vector3 &_pt1, const
Vector3 &_pt2)
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
Forward declarations for the common classes.
Definition: Animation.hh:33
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
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
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
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
Definition: Animation.hh:24
Vector3 operator-(const Vector3 &_pt) const GAZEBO_DEPRECATED(8.0)
Subtraction operators.
Definition: Vector3.hh:222