opentl::math::Vector2 Class Reference

Special class for vectors with dimension of two. More...

Inherits opentl::math::Vector.

List of all members.

Public Member Functions

double abs () const
 calculates the length of this vector
void calcMaxsOfVectors (const Vector2 &v)
 stores the pairwise maximum of this and another vector
void calcMinsOfVectors (const Vector2 &v)
 stores the pairwise minimum of this and another vector
double calcStdDeviation () const
 caclulates the standard deviation of this vector
std::size_t dimension () const
 get the dimension of this vector (2)
double dotProduct (const Vector *v2) const
 caclulates the dot product of this vector and another
CvPoint getCvPoint ()
 Convert this Vector to a CvPoint.
void normalize ()
 normailize this vector
Vector3 toVector3 ()
 convert to a three dimension vector
 Vector2 (double x, double y)
 Constructor taking vector data.
 Vector2 (const Matrix &m)
 Constructor based on an existing matrix.
 Vector2 (const Vector2 &m)
 Constructor based on an existing Vector2.
 Vector2 ()
 Constructor.
virtual ~Vector2 ()
 Destructor.


Detailed Description

Special class for vectors with dimension of two.

Author:
Thomas Friedlhuber <friedlhu@in.tum.de>

Thorsten Roeder <roeder@in.tum.de>


Constructor & Destructor Documentation

opentl::math::Vector2::Vector2 (  ) 

Constructor.

opentl::math::Vector2::Vector2 ( const Vector2 m  ) 

Constructor based on an existing Vector2.

Parameters:
m existing matrix

opentl::math::Vector2::Vector2 ( const Matrix m  ) 

Constructor based on an existing matrix.

Parameters:
m existing matrix

opentl::math::Vector2::Vector2 ( double  x,
double  y 
) [inline]

Constructor taking vector data.

Parameters:
x vector data
y vector data

virtual opentl::math::Vector2::~Vector2 (  )  [virtual]

Destructor.


Member Function Documentation

double opentl::math::Vector2::abs (  )  const [inline]

calculates the length of this vector

Returns:
length

void opentl::math::Vector2::calcMaxsOfVectors ( const Vector2 v  )  [inline]

stores the pairwise maximum of this and another vector

void opentl::math::Vector2::calcMinsOfVectors ( const Vector2 v  )  [inline]

stores the pairwise minimum of this and another vector

double opentl::math::Vector2::calcStdDeviation (  )  const [inline]

caclulates the standard deviation of this vector

Returns:
standard deviation

std::size_t opentl::math::Vector2::dimension (  )  const [inline, virtual]

get the dimension of this vector (2)

Returns:
dimension (=2)

Reimplemented from opentl::math::Vector.

double opentl::math::Vector2::dotProduct ( const Vector v2  )  const [inline]

caclulates the dot product of this vector and another

Parameters:
v2 the 2nd vector to be used
Returns:
dot product

CvPoint opentl::math::Vector2::getCvPoint (  ) 

Convert this Vector to a CvPoint.

Returns:
the CvPoint equivalent

void opentl::math::Vector2::normalize (  )  [inline, virtual]

normailize this vector

Reimplemented from opentl::math::Vector.

Vector3 opentl::math::Vector2::toVector3 (  ) 

convert to a three dimension vector

Returns:
a Vector3


Generated on Fri Jul 31 17:38:39 2009 for OpenTL by  doxygen 1.5.8