Gazebo

Vector2 Class Template Reference
[Server]

#include <Vector2.hh>

List of all members.


Detailed Description

template<typename T>
class gazebo::Vector2< T >

Generic x,y vector

Public Member Functions

 Vector2 ()
 Vector2 (const T &x, const T &y)
 Vector2 (const Vector2< T > &pt)
virtual ~Vector2 ()
Distance (const Vector2< T > &pt) const
void Normalize ()
void Set (T x, T y)
Vector2< T > GetCrossProd (const Vector2< T > &pt) const
const Vector2< T > & operator= (const Vector2< T > &pt)
const Vector2< T > & operator= (T value)
 Equal operator.
Vector2< T > operator+ (const Vector2< T > &pt) const
const Vector2< T > & operator+= (const Vector2< T > &pt)
Vector2< T > operator- (const Vector2< T > &pt) const
const Vector2< T > & operator-= (const Vector2< T > &pt)
const Vector2< T > operator/ (const Vector2< T > &pt) const
const Vector2< T > & operator/= (const Vector2< T > &pt)
const Vector2< T > operator/ (T v) const
const Vector2< T > & operator/= (T v)
const Vector2< T > operator * (const Vector2< T > &pt) const
const Vector2< T > & operator *= (const Vector2< T > &pt)
const Vector2< T > operator * (T v) const
const Vector2< T > & operator *= (T v)
bool operator== (const Vector2< T > &pt) const
bool operator!= (const Vector2< T > &pt) const
bool IsFinite () const
operator[] (unsigned int index) const

Public Attributes

x
y

Friends

std::ostream & operator<< (std::ostream &out, const gazebo::Vector2< T > &pt)

Constructor & Destructor Documentation

Vector2 (  )  [inline]

Constructor

Vector2 ( const T &  x,
const T &  y 
) [inline]

Constructor

Vector2 ( const Vector2< T > &  pt  )  [inline]

Constructor

~Vector2 (  )  [inline, virtual]

Destructor


Member Function Documentation

T Distance ( const Vector2< T > &  pt  )  const [inline]

Calc distance to the given point

void Normalize (  )  [inline]

Normalize the vector length

void Set ( x,
y 
) [inline]

Set the contents of the vector

Vector2<T> GetCrossProd ( const Vector2< T > &  pt  )  const

Return the cross product of this vector and pt

const Vector2< T > & operator= ( const Vector2< T > &  pt  )  [inline]

Equal operator

const Vector2< T > & operator= ( value  )  [inline]

Equal operator.

Equal operator

Vector2< T > operator+ ( const Vector2< T > &  pt  )  const [inline]

Addition operator

const Vector2< T > & operator+= ( const Vector2< T > &  pt  )  [inline]

Addition operator

Vector2< T > operator- ( const Vector2< T > &  pt  )  const [inline]

Subtraction operators

const Vector2< T > & operator-= ( const Vector2< T > &  pt  )  [inline]

Subtraction operators

const Vector2< T > operator/ ( const Vector2< T > &  pt  )  const [inline]

Division operators

const Vector2< T > & operator/= ( const Vector2< T > &  pt  )  [inline]

Division operators

const Vector2< T > operator/ ( v  )  const [inline]

Division operators

const Vector2< T > & operator/= ( v  )  [inline]

Division operators

const Vector2< T > operator * ( const Vector2< T > &  pt  )  const [inline]

Multiplication operators

const Vector2< T > & operator *= ( const Vector2< T > &  pt  )  [inline]

Multiplication operators

const Vector2< T > operator * ( v  )  const [inline]

Multiplication operators

const Vector2< T > & operator *= ( v  )  [inline]

Multiplication operators

bool operator== ( const Vector2< T > &  pt  )  const [inline]

Equality operators

bool operator!= ( const Vector2< T > &  pt  )  const [inline]

Equality operators

bool IsFinite (  )  const [inline]

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

T operator[] ( unsigned int  index  )  const [inline]

[] operator


Friends And Related Function Documentation

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

Ostream operator

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


Member Data Documentation

T x

x data

T y

y data


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

Last updated Aug 04 2007