All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | Friends | List of all members
gazebo::math::Vector4 Class Reference

double Generic x, y, z, w vector More...

#include <Vector4.hh>

Public Member Functions

 Vector4 ()
 Constructor.
 
 Vector4 (const double &_x, const double &_y, const double &_z, const double &_w)
 Constructor with component values.
 
 Vector4 (const Vector4 &_v)
 Copy constructor.
 
virtual ~Vector4 ()
 Destructor.
 
double Distance (const Vector4 &_pt) const
 Calc distance to the given point.
 
double GetLength () const
 Returns the length (magnitude) of the vector.
 
double GetSquaredLength () const
 Return the square of the length (magnitude) of the vector.
 
bool IsFinite () const
 See if a point is finite (e.g., not nan)
 
void Normalize ()
 Normalize the vector length.
 
bool operator!= (const Vector4 &_pt) const
 Not equal to operator.
 
const Vector4 operator* (const Vector4 &_pt) const
 Multiplication operator.
 
const Vector4 operator* (const Matrix4 &_m) const
 Matrix multiplication operator.
 
const Vector4 operator* (double _v) const
 Multiplication operators.
 
const Vector4operator*= (const Vector4 &_pt)
 Multiplication assignment operator.
 
const Vector4operator*= (double _v)
 Multiplication assignment operator.
 
Vector4 operator+ (const Vector4 &_v) const
 Addition operator.
 
const Vector4operator+= (const Vector4 &_v)
 Addition operator.
 
Vector4 operator- (const Vector4 &_v) const
 Subtraction operator.
 
const Vector4operator-= (const Vector4 &_v)
 Subtraction assigment operators.
 
const Vector4 operator/ (const Vector4 &_v) const
 Division assignment operator.
 
const Vector4 operator/ (double _v) const
 Division assignment operator.
 
const Vector4operator/= (const Vector4 &_v)
 Division assignment operator.
 
const Vector4operator/= (double _v)
 Division operator.
 
Vector4operator= (const Vector4 &_v)
 Assignment operator.
 
Vector4operator= (double _value)
 Assignment operator.
 
bool operator== (const Vector4 &_pt) const
 Equal to operator.
 
double operator[] (unsigned int _index) const
 Array subscript operator.
 
void Set (double _x=0, double _y=0, double _z=0, double _w=0)
 Set the contents of the vector.
 

Public Attributes

double w
 W value.
 
double x
 X value.
 
double y
 Y value.
 
double z
 Z value.
 

Friends

std::ostream & operator<< (std::ostream &_out, const gazebo::math::Vector4 &_pt)
 Stream insertion operator.
 
std::istream & operator>> (std::istream &_in, gazebo::math::Vector4 &_pt)
 Stream extraction operator.
 

Detailed Description

double Generic x, y, z, w vector

Constructor & Destructor Documentation

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.

Parameters
[in]_xvalue along x axis
[in]_yvalue along y axis
[in]_zvalue along z axis
[in]_wvalue along w axis
gazebo::math::Vector4::Vector4 ( const Vector4 _v)

Copy constructor.

Parameters
[in]_vvector
virtual gazebo::math::Vector4::~Vector4 ( )
virtual

Destructor.

Member Function Documentation

double gazebo::math::Vector4::Distance ( const Vector4 _pt) const

Calc distance to the given point.

Parameters
[in]_ptthe point
Returns
the distance
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.

Returns
the length
bool gazebo::math::Vector4::IsFinite ( ) const

See if a point is finite (e.g., not nan)

Returns
true if finite, false otherwise
void gazebo::math::Vector4::Normalize ( )

Normalize the vector length.

bool gazebo::math::Vector4::operator!= ( const Vector4 _pt) const

Not equal to operator.

Parameters
[in]_ptthe other vector
Returns
true if each component is equal withing a default tolerence (1e-6), false otherwise
const Vector4 gazebo::math::Vector4::operator* ( const Vector4 _pt) const

Multiplication operator.

Remarks
Performs element wise multiplication, which has limited use.
Parameters
[in]_ptanother vector
Returns
result vector
const Vector4 gazebo::math::Vector4::operator* ( const Matrix4 _m) const

Matrix multiplication operator.

Parameters
[in]_mmatrix
Returns
the vector multiplied by _m
const Vector4 gazebo::math::Vector4::operator* ( double  _v) const

Multiplication operators.

Parameters
[in]_vscaling factor
Returns
a scaled vector
const Vector4& gazebo::math::Vector4::operator*= ( const Vector4 _pt)

Multiplication assignment operator.

Remarks
Performs element wise multiplication, which has limited use.
Parameters
[in]_pta vector
Returns
this
const Vector4& gazebo::math::Vector4::operator*= ( double  _v)

Multiplication assignment operator.

Parameters
[in]_vscaling factor
Returns
this
Vector4 gazebo::math::Vector4::operator+ ( const Vector4 _v) const

Addition operator.

Parameters
[in]_vthe vector to add
Returns
a sum vector
const Vector4& gazebo::math::Vector4::operator+= ( const Vector4 _v)

Addition operator.

Parameters
[in]_vthe vector to add
Returns
this vector
Vector4 gazebo::math::Vector4::operator- ( const Vector4 _v) const

Subtraction operator.

Parameters
[in]_vthe vector to substract
Returns
a vector
const Vector4& gazebo::math::Vector4::operator-= ( const Vector4 _v)

Subtraction assigment operators.

Parameters
[in]_vthe vector to substract
Returns
this vector
const Vector4 gazebo::math::Vector4::operator/ ( const Vector4 _v) const

Division assignment operator.

Remarks
Performs element wise division, which has limited use.
Parameters
[in]_vthe vector to perform element wise division with
Returns
a result vector
const Vector4 gazebo::math::Vector4::operator/ ( double  _v) const

Division assignment operator.

Remarks
Performs element wise division, which has limited use.
Parameters
[in]_ptanother vector
Returns
a result vector
const Vector4& gazebo::math::Vector4::operator/= ( const Vector4 _v)

Division assignment operator.

Remarks
Performs element wise division, which has limited use.
Parameters
[in]_vthe vector to perform element wise division with
Returns
this
const Vector4& gazebo::math::Vector4::operator/= ( double  _v)

Division operator.

Parameters
[in]_vscaling factor
Returns
a vector
Vector4& gazebo::math::Vector4::operator= ( const Vector4 _v)

Assignment operator.

Parameters
[in]_vthe vector
Returns
a reference to this vector
Vector4& gazebo::math::Vector4::operator= ( double  _value)

Assignment operator.

Parameters
[in]_value
bool gazebo::math::Vector4::operator== ( const Vector4 _pt) const

Equal to operator.

Parameters
[in]_ptthe other vector
Returns
true if each component is equal withing a default tolerence (1e-6), false otherwise
double gazebo::math::Vector4::operator[] ( unsigned int  _index) const

Array subscript operator.

Parameters
[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.

Parameters
[in]_xvalue along x axis
[in]_yvalue along y axis
[in]_zvalue along z axis
[in]_wvalue along w axis

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  _out,
const gazebo::math::Vector4 _pt 
)
friend

Stream insertion operator.

Parameters
[in]_outoutput stream
[in]_ptVector4 to output
Returns
The stream
std::istream& operator>> ( std::istream &  _in,
gazebo::math::Vector4 _pt 
)
friend

Stream extraction operator.

Parameters
[in]_ininput stream
[in]_ptVector4 to read values into
Returns
the stream

Member Data Documentation

double gazebo::math::Vector4::w

W value.

double gazebo::math::Vector4::x

X value.

double gazebo::math::Vector4::y

Y value.

double gazebo::math::Vector4::z

Z value.


The documentation for this class was generated from the following file: