Generic double x, y vector. More...
#include <Vector2d.hh>
Public Member Functions | |
Vector2d () GAZEBO_DEPRECATED(8.0) | |
Constructor. More... | |
Vector2d (const double &_x, const double &_y) GAZEBO_DEPRECATED(8.0) | |
Constructor. More... | |
Vector2d (const Vector2d &_v) GAZEBO_DEPRECATED(8.0) | |
Copy constructor. More... | |
Vector2d (const ignition::math::Vector2d &_v) GAZEBO_DEPRECATED(8.0) | |
Copy constructor for ignition math. More... | |
virtual | ~Vector2d () |
Destructor. More... | |
double | Distance (const Vector2d &_pt) const |
Calc distance to the given point. More... | |
double | Dot (const Vector2d &_v) const |
Return the dot product of this vector and _v. More... | |
ignition::math::Vector2d | Ign () const |
Convert this vector to an ignition::math::Vector2d. More... | |
bool | IsFinite () const |
See if a point is finite (e.g., not nan) More... | |
void | Normalize () |
Normalize the vector length. More... | |
bool | operator!= (const Vector2d &_v) const |
Not equal to operator. More... | |
const Vector2d | operator* (const Vector2d &_v) const |
Multiplication operators. More... | |
const Vector2d | operator* (double _v) const |
Multiplication operators. More... | |
const Vector2d & | operator*= (const Vector2d &_v) |
Multiplication assignment operator. More... | |
const Vector2d & | operator*= (double _v) |
Multiplication assignment operator. More... | |
Vector2d | operator+ (const Vector2d &_v) const |
Addition operator. More... | |
const Vector2d & | operator+= (const Vector2d &_v) |
Addition assignment operator. More... | |
Vector2d | operator- (const Vector2d &_v) const |
Subtraction operator. More... | |
const Vector2d & | operator-= (const Vector2d &_v) |
Subtraction assignment operator. More... | |
const Vector2d | operator/ (const Vector2d &_v) const |
Division operator. More... | |
const Vector2d | operator/ (double _v) const |
Division operator. More... | |
const Vector2d & | operator/= (const Vector2d &_v) |
Division operator. More... | |
const Vector2d & | operator/= (double _v) |
Division operator. More... | |
Vector2d & | operator= (const Vector2d &_v) |
Assignment operator. More... | |
Vector2d & | operator= (const ignition::math::Vector2d &_v) |
Assignment operator for ignition math. More... | |
const Vector2d & | operator= (double _v) |
Assignment operator. More... | |
bool | operator== (const Vector2d &_v) const |
Equal to operator. More... | |
double | operator[] (unsigned int _index) const |
Array subscript operator. More... | |
void | Set (double _x, double _y) |
Set the contents of the vector. More... | |
Public Attributes | |
double | x |
x data More... | |
double | y |
y data More... | |
Friends | |
std::ostream & | operator<< (std::ostream &_out, const gazebo::math::Vector2d &_pt) |
Stream extraction operator. More... | |
std::istream & | operator>> (std::istream &_in, gazebo::math::Vector2d &_pt) |
Stream extraction operator. More... | |
Generic double x, y vector.
Vector2d | ( | ) |
Constructor.
Vector2d | ( | const double & | _x, |
const double & | _y | ||
) |
Constructor.
[in] | _x | value along x |
[in] | _y | value along y |
Vector2d | ( | const ignition::math::Vector2d & | _v | ) |
Copy constructor for ignition math.
[in] | _v | the value |
|
virtual |
Destructor.
double Distance | ( | const Vector2d & | _pt | ) | const |
Calc distance to the given point.
[in] | _pt | The point to measure to |
double Dot | ( | const Vector2d & | _v | ) | const |
Return the dot product of this vector and _v.
[in] | _v | the vector |
ignition::math::Vector2d Ign | ( | ) | const |
Convert this vector to an ignition::math::Vector2d.
bool IsFinite | ( | ) | const |
See if a point is finite (e.g., not nan)
void Normalize | ( | ) |
Normalize the vector length.
bool operator!= | ( | const Vector2d & | _v | ) | const |
Not equal to operator.
Multiplication operators.
[in] | _v | the vector |
const Vector2d operator* | ( | double | _v | ) | const |
Multiplication operators.
[in] | _v | the scaling factor |
Multiplication assignment operator.
[in] | _v | the vector |
const Vector2d& operator*= | ( | double | _v | ) |
Multiplication assignment operator.
[in] | _v | the scaling factor |
Addition operator.
[in] | _v | vector to add |
Addition assignment operator.
[in] | _v | the vector to add |
Subtraction operator.
[in] | _v | the vector to substract |
Subtraction assignment operator.
[in] | _v | the vector to substract |
Division operator.
[in] | _v | a vector |
const Vector2d operator/ | ( | double | _v | ) | const |
Division operator.
[in] | _v | the value |
Division operator.
[in] | _v | a vector |
const Vector2d& operator/= | ( | double | _v | ) |
Division operator.
[in] | _v | the divisor |
Assignment operator.
[in] | _v | a value for x and y element |
Vector2d& operator= | ( | const ignition::math::Vector2d & | _v | ) |
Assignment operator for ignition math.
[in] | _v | a value for x and y element |
const Vector2d& operator= | ( | double | _v | ) |
Assignment operator.
[in] | _v | the value for x and y element |
bool operator== | ( | const Vector2d & | _v | ) | const |
Equal to operator.
[in] | _v | the vector to compare to |
double operator[] | ( | unsigned int | _index | ) | const |
Array subscript operator.
[in] | _index | the index |
void Set | ( | double | _x, |
double | _y | ||
) |
Set the contents of the vector.
[in] | _x | value along x |
[in] | _y | value along y |
|
friend |
Stream extraction operator.
[in] | _out | output stream |
[in] | _pt | Vector2d to output |
|
friend |
Stream extraction operator.
[in] | _in | input stream |
[in] | _pt | Vector3 to read values into |
double x |
x data
double y |
y data