OpenStructure
Public Member Functions | Data Fields
Vec4 Class Reference

#include <vec4.hh>

Public Member Functions

 Vec4 ()
 Vec4 (Real px, Real py, Real pz, Real pw)
 Vec4 (const Vec4 &v)
 Vec4 (const Vec2 &v)
 Vec4 (const Vec3 &v)
 Vec4 (const float v[4])
 Vec4 (const double v[4])
Vec4operator= (const Vec4 &v)
bool operator== (const Vec4 &rhs) const
Realoperator[] (std::size_t indx)
const Realoperator[] (std::size_t indx) const
Real GetX () const
Real GetY () const
Real GetZ () const
Real GetW () const
void SetX (Real v)
void SetY (Real v)
void SetZ (Real v)
void SetW (Real v)
Vec4operator+= (const Vec4 &rhs)
Vec4operator+= (Real d)
Vec4operator-= (const Vec4 &rhs)
Vec4operator-= (Real d)
Vec4 operator- () const
Vec4operator*= (Real d)
Vec4operator/= (Real d)
RealData ()
const RealData () const

Data Fields

Real x
Real y
Real z
Real w

Detailed Description

Definition at line 40 of file vec4.hh.


Constructor & Destructor Documentation

Vec4 ( )
inline

Default initialization, all components are set to zero.

Definition at line 48 of file vec4.hh.

Vec4 ( Real  px,
Real  py,
Real  pz,
Real  pw 
)
inline

Initialization with x, y and z component.

Definition at line 51 of file vec4.hh.

Vec4 ( const Vec4 v)
inline

copy ctor

Definition at line 54 of file vec4.hh.

Vec4 ( const Vec2 v)
inline

(implicit) initialization with 2D vector

Definition at line 203 of file vec4.hh.

Vec4 ( const Vec3 v)
inline

(implicit) initialization with 3D vector

Definition at line 206 of file vec4.hh.

Vec4 ( const float  v[4])
inlineexplicit

explicit initialization with an array of floats

Definition at line 63 of file vec4.hh.

Vec4 ( const double  v[4])
inlineexplicit

explicit initialization with an array of doubles

Definition at line 66 of file vec4.hh.


Member Function Documentation

Real* Data ( )
inline

Definition at line 175 of file vec4.hh.

const Real* Data ( ) const
inline

Definition at line 176 of file vec4.hh.

Real GetW ( ) const
inline

Definition at line 104 of file vec4.hh.

Real GetX ( ) const
inline

element access

Definition at line 101 of file vec4.hh.

Real GetY ( ) const
inline

Definition at line 102 of file vec4.hh.

Real GetZ ( ) const
inline

Definition at line 103 of file vec4.hh.

Vec4& operator*= ( Real  d)
inline

multipliable

Definition at line 155 of file vec4.hh.

Vec4& operator+= ( const Vec4 rhs)
inline

addable op

Definition at line 112 of file vec4.hh.

Vec4& operator+= ( Real  d)
inline

Definition at line 121 of file vec4.hh.

Vec4 operator- ( ) const
inline

negateable

Definition at line 149 of file vec4.hh.

Vec4& operator-= ( const Vec4 rhs)
inline

subtractable op

Definition at line 131 of file vec4.hh.

Vec4& operator-= ( Real  d)
inline

Definition at line 140 of file vec4.hh.

Vec4& operator/= ( Real  d)
inline

dividable

Definition at line 165 of file vec4.hh.

Vec4& operator= ( const Vec4 v)
inline

assignement op

Definition at line 68 of file vec4.hh.

bool operator== ( const Vec4 rhs) const
inline

comparable

Definition at line 78 of file vec4.hh.

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

element access

Definition at line 84 of file vec4.hh.

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

const element access

Definition at line 93 of file vec4.hh.

void SetW ( Real  v)
inline

Definition at line 109 of file vec4.hh.

void SetX ( Real  v)
inline

Definition at line 106 of file vec4.hh.

void SetY ( Real  v)
inline

Definition at line 107 of file vec4.hh.

void SetZ ( Real  v)
inline

Definition at line 108 of file vec4.hh.


Field Documentation

Real w

Definition at line 181 of file vec4.hh.

Real x

Definition at line 178 of file vec4.hh.

Real y

Definition at line 179 of file vec4.hh.

Real z

Definition at line 180 of file vec4.hh.


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