Gazebo

Vector3 Class Reference
[Server]

#include <Vector3.hh>

List of all members.


Detailed Description

Generic x,y,z vector

Public Member Functions

 Vector3 ()
 Vector3 (const double &x, const double &y, const double &z)
 Vector3 (const Vector3 &pt)
virtual ~Vector3 ()
double Distance (const Vector3 &pt) const
double GetLength () const
double GetSquaredLength () const
void Normalize ()
void Set (double x=0, double y=0, double z=0)
Vector3 GetCrossProd (const Vector3 &pt) const
Vector3 GetPerpendicular () const
const Vector3operator= (const Vector3 &pt)
const Vector3operator= (double value)
Vector3 operator+ (const Vector3 &pt) const
const Vector3operator+= (const Vector3 &pt)
Vector3 operator- (const Vector3 &pt) const
const Vector3operator-= (const Vector3 &pt)
const Vector3 operator/ (const Vector3 &pt) const
const Vector3operator/= (const Vector3 &pt)
const Vector3 operator/ (double v) const
const Vector3operator/= (double v)
const Vector3 operator * (const Vector3 &pt) const
const Vector3operator *= (const Vector3 &pt)
const Vector3 operator * (double v) const
const Vector3operator *= (double v)
bool operator== (const Vector3 &pt) const
bool operator!= (const Vector3 &pt) const
bool IsFinite () const
double operator[] (unsigned int index) const

Public Attributes

double x
double y
double z

Friends

std::ostream & operator<< (std::ostream &out, const gazebo::Vector3 &pt)

Constructor & Destructor Documentation

Vector3 (  ) 

Constructor

Vector3 ( const double &  x,
const double &  y,
const double &  z 
)

Constructor

Vector3 ( const Vector3 pt  ) 

Constructor

virtual ~Vector3 (  )  [virtual]

Destructor


Member Function Documentation

double Distance ( const Vector3 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

void Normalize (  ) 

Normalize the vector length

void Set ( double  x = 0,
double  y = 0,
double  z = 0 
)

Set the contents of the vector

Vector3 GetCrossProd ( const Vector3 pt  )  const

Return the cross product of this vector and pt

Vector3 GetPerpendicular (  )  const

Return a vector that is perpendicular to this one.

const Vector3& operator= ( const Vector3 pt  ) 

Equal operator

const Vector3& operator= ( double  value  ) 

Equal operator

Vector3 operator+ ( const Vector3 pt  )  const

Addition operator

const Vector3& operator+= ( const Vector3 pt  ) 

Addition operator

Vector3 operator- ( const Vector3 pt  )  const

Subtraction operators

const Vector3& operator-= ( const Vector3 pt  ) 

Subtraction operators

const Vector3 operator/ ( const Vector3 pt  )  const

Division operators

const Vector3& operator/= ( const Vector3 pt  ) 

Division operators

const Vector3 operator/ ( double  v  )  const

Division operators

const Vector3& operator/= ( double  v  ) 

Division operators

const Vector3 operator * ( const Vector3 pt  )  const

Multiplication operators

const Vector3& operator *= ( const Vector3 pt  ) 

Multiplication operators

const Vector3 operator * ( double  v  )  const

Multiplication operators

const Vector3& operator *= ( double  v  ) 

Multiplication operators

bool operator== ( const Vector3 pt  )  const

Equality operators

bool operator!= ( const Vector3 pt  )  const

Equality operators

bool IsFinite (  )  const

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

double operator[] ( unsigned int  index  )  const

[] operator


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const gazebo::Vector3 pt 
) [friend]

Ostream operator

Parameters:
out Ostream
pt Vector3 to output
Returns:
The Ostream


Member Data Documentation

double x

X location

double y

Y location

double z

Z location


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

Last updated Aug 04 2007