17 #ifndef _GAZEBO_VECTOR2D_HH_
18 #define _GAZEBO_VECTOR2D_HH_
20 #include <ignition/math/Vector2.hh>
44 public:
Vector2d(
const double &_x,
const double &_y)
53 public:
Vector2d(
const ignition::math::Vector2d &_v)
62 public:
double Distance(
const Vector2d &_pt)
const;
65 public:
void Normalize();
70 public:
void Set(
double _x,
double _y);
75 public:
double Dot(
const Vector2d &_v)
const;
85 public:
Vector2d &operator=(
const ignition::math::Vector2d &_v);
90 public:
const Vector2d &operator =(
double _v);
127 public:
const Vector2d operator/(
double _v)
const;
132 public:
const Vector2d &operator/=(
double _v);
148 public:
const Vector2d operator*(
double _v)
const;
153 public:
const Vector2d &operator*=(
double _v);
159 public:
bool operator ==(
const Vector2d &_v)
const;
163 public:
bool operator!=(
const Vector2d &_v)
const;
167 public:
bool IsFinite()
const;
172 public:
double operator[](
unsigned int _index)
const;
176 public: ignition::math::Vector2d Ign()
const;
191 _out << _pt.
x <<
" " << _pt.
y;
203 _in.setf(std::ios_base::skipws);
204 _in >> _pt.
x >> _pt.
y;
friend std::ostream & operator<<(std::ostream &_out, const gazebo::math::Vector2d &_pt)
Stream extraction operator.
Definition: Vector2d.hh:188
Generic double x, y vector.
Definition: Vector2d.hh:36
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 y
y data
Definition: Vector2d.hh:182
double x
x data
Definition: Vector2d.hh:179
GAZEBO_VISIBLE void Set(common::Image &_img, const msgs::Image &_msg)
Convert a msgs::Image to a common::Image.
friend std::istream & operator>>(std::istream &_in, gazebo::math::Vector2d &_pt)
Stream extraction operator.
Definition: Vector2d.hh:199