Vec2 Class Reference

#include <vec2.hh>


Public Member Functions

 Vec2 ()
 Vec2 (Real x, Real y)
 Vec2 (const Vec2 &v)
 Vec2 (const Vec3 &v)
 Vec2 (const Vec4 &v)
 Vec2 (const Real[2])
Vec2operator= (const Vec2 &v)
Realoperator[] (std::size_t indx)
const Realoperator[] (std::size_t indx) const
Real GetX () const
Real GetY () const
void SetX (Real v)
void SetY (Real v)
bool operator== (const Vec2 &rhs) const
Vec2operator+= (const Vec2 &rhs)
Vec2operator+= (Real d)
Vec2operator-= (const Vec2 &rhs)
Vec2operator-= (Real d)
Vec2 operator- () const
Vec2operator*= (Real d)
Vec2operator/= (Real d)
RealData ()
const RealData () const


Detailed Description

Definition at line 39 of file vec2.hh.


Constructor & Destructor Documentation

Vec2 (  ) 

Default initialization, all components are set to zero.

Vec2 ( Real  x,
Real  y 
)

Initialization with x, y and z component.

Vec2 ( const Vec2 v  ) 

copy ctor

Vec2 ( const Vec3 v  )  [explicit]

explicit initialization with 3D vector

Vec2 ( const Vec4 v  )  [explicit]

explicit initialization with a 4D homogeneous vector

Vec2 ( const   Real[2]  )  [explicit]

explicit initialization with an array of doubles


Member Function Documentation

const Real* Data (  )  const [inline]

Definition at line 98 of file vec2.hh.

Real* Data (  )  [inline]

Definition at line 97 of file vec2.hh.

Real GetX (  )  const

element access

Real GetY (  )  const

Vec2& operator*= ( Real  d  ) 

multipliable

Vec2& operator+= ( Real  d  ) 

Vec2& operator+= ( const Vec2 rhs  ) 

addable op

Vec2 operator- (  )  const

negateable

Vec2& operator-= ( Real  d  ) 

Vec2& operator-= ( const Vec2 rhs  ) 

subtractable op

Vec2& operator/= ( Real  d  ) 

dividable

Vec2& operator= ( const Vec2 v  ) 

assignement op

bool operator== ( const Vec2 rhs  )  const

comparable

const Real& operator[] ( std::size_t  indx  )  const

const element access

Real& operator[] ( std::size_t  indx  ) 

element access

void SetX ( Real  v  ) 

void SetY ( Real  v  ) 


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

Generated on Fri Jul 2 14:23:06 2010 for OpenStructure by  doxygen 1.5.8