OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Data Fields
Vec2 Class Reference

#include <vec2.hh>

Public Member Functions

 Vec2 ()
 Vec2 (Real px, Real py)
 Vec2 (const Vec2 &v)
 Vec2 (const Vec3 &v)
 Vec2 (const Vec4 &v)
 Vec2 (const float v[2])
 Vec2 (const double v[2])
Real GetX () const
Real GetY () const
void SetX (Real d)
void SetY (Real d)
bool operator== (const Vec2 &rhs) const
Realoperator[] (std::size_t indx)
const Realoperator[] (std::size_t indx) const
RealAt (size_t indx)
const RealAt (size_t indx) 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

Data Fields

Real x
Real y

Detailed Description

Definition at line 42 of file vec2.hh.


Constructor & Destructor Documentation

Vec2 ( )
inline

Default initialization, all components are set to zero.

Definition at line 50 of file vec2.hh.

Vec2 ( Real  px,
Real  py 
)
inline

Initialization with x, y and z component.

Definition at line 53 of file vec2.hh.

Vec2 ( const Vec2 v)
inline

copy ctor

Definition at line 56 of file vec2.hh.

Vec2 ( const Vec3 v)
inlineexplicit

explicit initialization with 3D vector

Definition at line 189 of file vec2.hh.

Vec2 ( const Vec4 v)
inlineexplicit

explicit initialization with a 4D homogeneous vector

Definition at line 192 of file vec2.hh.

Vec2 ( const float  v[2])
inlineexplicit

explicit initialization with an array of doubles

Definition at line 65 of file vec2.hh.

Vec2 ( const double  v[2])
inlineexplicit

explicit initialization with an array of floats

Definition at line 69 of file vec2.hh.


Member Function Documentation

Real& At ( size_t  indx)
inline

Definition at line 98 of file vec2.hh.

const Real& At ( size_t  indx) const
inline

Definition at line 105 of file vec2.hh.

Real* Data ( )
inline

Definition at line 164 of file vec2.hh.

const Real* Data ( ) const
inline

Definition at line 165 of file vec2.hh.

Real GetX ( ) const
inline

Definition at line 72 of file vec2.hh.

Real GetY ( ) const
inline

Definition at line 73 of file vec2.hh.

Vec2& operator*= ( Real  d)
inline

multipliable

Definition at line 148 of file vec2.hh.

Vec2& operator+= ( const Vec2 rhs)
inline

addable op

Definition at line 113 of file vec2.hh.

Vec2& operator+= ( Real  d)
inline

Definition at line 120 of file vec2.hh.

Vec2 operator- ( ) const
inline

negateable

Definition at line 142 of file vec2.hh.

Vec2& operator-= ( const Vec2 rhs)
inline

subtractable op

Definition at line 128 of file vec2.hh.

Vec2& operator-= ( Real  d)
inline

Definition at line 135 of file vec2.hh.

Vec2& operator/= ( Real  d)
inline

dividable

Definition at line 156 of file vec2.hh.

bool operator== ( const Vec2 rhs) const
inline

comparable

Definition at line 79 of file vec2.hh.

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

element access

Definition at line 85 of file vec2.hh.

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

const element access

Definition at line 92 of file vec2.hh.

void SetX ( Real  d)
inline

Definition at line 75 of file vec2.hh.

void SetY ( Real  d)
inline

Definition at line 76 of file vec2.hh.


Field Documentation

Real x

Definition at line 167 of file vec2.hh.

Real y

Definition at line 168 of file vec2.hh.


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