Vector2 Class Reference

Two dimensional Vector Class. More...

#include <matrix3.h>

List of all members.

Public Member Functions

double & operator() (int idx)
 Access Elements.
Vector2 operator* (double v)
 Vector multiplication with a scalar.
Vector2operator*= (double v)
 Vector multiplication with a Scalar and output into itself.
Vector2operator+= (const Vector2 &v)
 Vector Addition and output into itself.
Vector2operator+= (double v)
 Adding a Scalar to a Vector and output into itself.
Vector2operator= (double v)
 Set Vector with one scalar value.
double operator[] (int idx) const
 Access Elements.
double & operator[] (int idx)
 Access Elements.
 Vector2 ()
 Constructor.

Public Attributes

double x [2]
 Storage or the two dimensions.

Friends

std::ostream & operator<< (std::ostream &os, const Vector2 &v)
 Print out a vector.

Detailed Description

Two dimensional Vector Class.

Definition at line 40 of file matrix3.h.


Constructor & Destructor Documentation

Vector2::Vector2 (  )  [inline]

Constructor.

Definition at line 46 of file matrix3.h.


Member Function Documentation

double& Vector2::operator() ( int  idx  )  [inline]

Access Elements.

Parameters:
idx Index
Returns:
Value

Definition at line 70 of file matrix3.h.

Vector2 Vector2::operator* ( double  v  )  [inline]

Vector multiplication with a scalar.

Parameters:
v Scalar
Returns:
Result Vector

Definition at line 78 of file matrix3.h.

Vector2& Vector2::operator*= ( double  v  )  [inline]

Vector multiplication with a Scalar and output into itself.

Parameters:
v Scalar
Returns:
Result Vector

Definition at line 99 of file matrix3.h.

Vector2& Vector2::operator+= ( const Vector2 v  )  [inline]

Vector Addition and output into itself.

Parameters:
v Vector
Returns:
Result Vector

Definition at line 119 of file matrix3.h.

Vector2& Vector2::operator+= ( double  v  )  [inline]

Adding a Scalar to a Vector and output into itself.

Parameters:
v Scalar
Returns:
Result Vector

Definition at line 109 of file matrix3.h.

Vector2& Vector2::operator= ( double  v  )  [inline]

Set Vector with one scalar value.

Parameters:
v Scalar
Returns:
Result Vector

Definition at line 89 of file matrix3.h.

double Vector2::operator[] ( int  idx  )  const [inline]

Access Elements.

Parameters:
idx Index
Returns:
Value

Definition at line 62 of file matrix3.h.

double& Vector2::operator[] ( int  idx  )  [inline]

Access Elements.

Parameters:
idx Index
Returns:
Value

Definition at line 54 of file matrix3.h.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Vector2 v 
) [friend]

Print out a vector.

Parameters:
os Outputstream
v Vector
Returns:
print out

Definition at line 130 of file matrix3.h.


Member Data Documentation

double Vector2::x[2]

Storage or the two dimensions.

Definition at line 43 of file matrix3.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Friends Defines


active_realtime_segmentation
Author(s): Marten Bjorkman. Maintained by Jeannette Bohg
autogenerated on Fri Jan 11 09:51:13 2013