double Generic x, y, z, w vector More...
#include <math/gzmath.hh>
Public Member Functions | |
| Vector4 () | |
| Constructor. More... | |
| Vector4 (const double &_x, const double &_y, const double &_z, const double &_w) | |
| Constructor with component values. More... | |
| Vector4 (const Vector4 &_v) | |
| Copy constructor. More... | |
| virtual | ~Vector4 () |
| Destructor. More... | |
| double | Distance (const Vector4 &_pt) const |
| Calc distance to the given point. More... | |
| double | GetLength () const |
| Returns the length (magnitude) of the vector. More... | |
| double | GetSquaredLength () const |
| Return the square of the length (magnitude) of the vector. 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 Vector4 &_pt) const |
| Not equal to operator. More... | |
| const Vector4 | operator* (const Vector4 &_pt) const |
| Multiplication operator. More... | |
| const Vector4 | operator* (const Matrix4 &_m) const |
| Matrix multiplication operator. More... | |
| const Vector4 | operator* (double _v) const |
| Multiplication operators. More... | |
| const Vector4 & | operator*= (const Vector4 &_pt) |
| Multiplication assignment operator. More... | |
| const Vector4 & | operator*= (double _v) |
| Multiplication assignment operator. More... | |
| Vector4 | operator+ (const Vector4 &_v) const |
| Addition operator. More... | |
| const Vector4 & | operator+= (const Vector4 &_v) |
| Addition operator. More... | |
| Vector4 | operator- (const Vector4 &_v) const |
| Subtraction operator. More... | |
| const Vector4 & | operator-= (const Vector4 &_v) |
| Subtraction assigment operators. More... | |
| const Vector4 | operator/ (const Vector4 &_v) const |
| Division assignment operator. More... | |
| const Vector4 | operator/ (double _v) const |
| Division assignment operator. More... | |
| const Vector4 & | operator/= (const Vector4 &_v) |
| Division assignment operator. More... | |
| const Vector4 & | operator/= (double _v) |
| Division operator. More... | |
| Vector4 & | operator= (const Vector4 &_v) |
| Assignment operator. More... | |
| Vector4 & | operator= (double _value) |
| Assignment operator. More... | |
| bool | operator== (const Vector4 &_pt) const |
| Equal to operator. More... | |
| double | operator[] (unsigned int _index) const |
| Array subscript operator. More... | |
| void | Set (double _x=0, double _y=0, double _z=0, double _w=0) |
| Set the contents of the vector. More... | |
Public Attributes | |
| double | w |
| W value. More... | |
| double | x |
| X value. More... | |
| double | y |
| Y value. More... | |
| double | z |
| Z value. More... | |
Friends | |
| std::ostream & | operator<< (std::ostream &_out, const gazebo::math::Vector4 &_pt) |
| Stream insertion operator. More... | |
| std::istream & | operator>> (std::istream &_in, gazebo::math::Vector4 &_pt) |
| Stream extraction operator. More... | |
double Generic x, y, z, w vector
| gazebo::math::Vector4::Vector4 | ( | ) |
Constructor.
| gazebo::math::Vector4::Vector4 | ( | const double & | _x, |
| const double & | _y, | ||
| const double & | _z, | ||
| const double & | _w | ||
| ) |
Constructor with component values.
| [in] | _x | value along x axis |
| [in] | _y | value along y axis |
| [in] | _z | value along z axis |
| [in] | _w | value along w axis |
| gazebo::math::Vector4::Vector4 | ( | const Vector4 & | _v | ) |
Copy constructor.
| [in] | _v | vector |
|
virtual |
Destructor.
| double gazebo::math::Vector4::Distance | ( | const Vector4 & | _pt | ) | const |
Calc distance to the given point.
| [in] | _pt | the point |
| double gazebo::math::Vector4::GetLength | ( | ) | const |
Returns the length (magnitude) of the vector.
| double gazebo::math::Vector4::GetSquaredLength | ( | ) | const |
Return the square of the length (magnitude) of the vector.
| bool gazebo::math::Vector4::IsFinite | ( | ) | const |
See if a point is finite (e.g., not nan)
| void gazebo::math::Vector4::Normalize | ( | ) |
Normalize the vector length.
| bool gazebo::math::Vector4::operator!= | ( | const Vector4 & | _pt | ) | const |
Not equal to operator.
| [in] | _pt | the other vector |
Multiplication operator.
| [in] | _pt | another vector |
Matrix multiplication operator.
| [in] | _m | matrix |
| const Vector4 gazebo::math::Vector4::operator* | ( | double | _v | ) | const |
Multiplication operators.
| [in] | _v | scaling factor |
Multiplication assignment operator.
| [in] | _pt | a vector |
| const Vector4& gazebo::math::Vector4::operator*= | ( | double | _v | ) |
Multiplication assignment operator.
| [in] | _v | scaling factor |
Addition operator.
| [in] | _v | the vector to add |
Addition operator.
| [in] | _v | the vector to add |
Subtraction operator.
| [in] | _v | the vector to substract |
Subtraction assigment operators.
| [in] | _v | the vector to substract |
Division assignment operator.
| [in] | _v | the vector to perform element wise division with |
| const Vector4 gazebo::math::Vector4::operator/ | ( | double | _v | ) | const |
Division assignment operator.
| [in] | _pt | another vector |
Division assignment operator.
| [in] | _v | the vector to perform element wise division with |
| const Vector4& gazebo::math::Vector4::operator/= | ( | double | _v | ) |
Division operator.
| [in] | _v | scaling factor |
Assignment operator.
| [in] | _v | the vector |
| Vector4& gazebo::math::Vector4::operator= | ( | double | _value | ) |
Assignment operator.
| [in] | _value |
| bool gazebo::math::Vector4::operator== | ( | const Vector4 & | _pt | ) | const |
Equal to operator.
| [in] | _pt | the other vector |
| double gazebo::math::Vector4::operator[] | ( | unsigned int | _index | ) | const |
Array subscript operator.
| [in] | _index |
| void gazebo::math::Vector4::Set | ( | double | _x = 0, |
| double | _y = 0, |
||
| double | _z = 0, |
||
| double | _w = 0 |
||
| ) |
Set the contents of the vector.
| [in] | _x | value along x axis |
| [in] | _y | value along y axis |
| [in] | _z | value along z axis |
| [in] | _w | value along w axis |
|
friend |
Stream insertion operator.
| [in] | _out | output stream |
| [in] | _pt | Vector4 to output |
|
friend |
Stream extraction operator.
| [in] | _in | input stream |
| [in] | _pt | Vector4 to read values into |
| double gazebo::math::Vector4::w |
W value.
Referenced by gazebo::physics::BulletTypes::ConvertVector4().
| double gazebo::math::Vector4::x |
X value.
Referenced by gazebo::physics::BulletTypes::ConvertVector4().
| double gazebo::math::Vector4::y |
Y value.
Referenced by gazebo::physics::BulletTypes::ConvertVector4().
| double gazebo::math::Vector4::z |
Z value.
Referenced by gazebo::physics::BulletTypes::ConvertVector4().