Public Member Functions | Private Attributes | List of all members
vrender::Vector3 Class Reference

#include <Vector3.h>

Public Member Functions

double operator[] (int i) const
 
double & operator[] (int i)
 
Constructor(s) and destructor
 Vector3 ()
 
 ~Vector3 ()
 Default destructor. More...
 
 Vector3 (const Vector3 &)
 Copy constructor. More...
 
 Vector3 (const NVector3 &)
 Copy constructor from a normalized vector. More...
 
 Vector3 (double, double, double)
 Create a vector from real values. More...
 
Access methods
double x () const
 
double y () const
 
double z () const
 
void setX (double r)
 
void setY (double r)
 
void setZ (double r)
 
void setXYZ (double x, double y, double z)
 
Assignment
Vector3operator= (const Vector3 &u)
 
Vector3operator= (const NVector3 &u)
 Assignment with a normalized vector. More...
 
Metrics
double norm () const
 Norm. More...
 
double squareNorm () const
 Square norm (self dot product) More...
 
double infNorm () const
 Infinite norm. More...
 

Static Public Attributes

Constant
static const Vector3 inf
 

Private Attributes

double _xyz [3]
 The 3 vector components. More...
 

Friends

Comparisons
bool operator== (const Vector3 &, const Vector3 &)
 
bool operator!= (const Vector3 &, const Vector3 &)
 
Stream overrides

Should be used for most comparisons, for efficiency reasons.

std::ostream & operator<< (std::ostream &, const Vector3 &)
 

Algebraic operations

Vector3operator+= (const Vector3 &v)
 
Vector3operator-= (const Vector3 &v)
 
Vector3operator*= (double f)
 
Vector3operator/= (double f)
 
Vector3operator-= (const NVector3 &)
 Self substraction with a normalized vector. More...
 
Vector3operator+= (const NVector3 &)
 Self addition with a normalized vector. More...
 
Vector3 operator+ (const Vector3 &u) const
 
Vector3 operator- (const Vector3 &u) const
 
double operator* (const Vector3 &u) const
 
Vector3 operator^ (const Vector3 &v) const
 
Vector3 operator/ (double v)
 
Vector3 operator* (double v)
 
Vector3 operator- (const Vector3 &u)
 
Vector3 operator* (double, const Vector3 &)
 
static Vector3 mini (const Vector3 &, const Vector3 &)
 
static Vector3 maxi (const Vector3 &, const Vector3 &)
 

Detailed Description

Definition at line 58 of file Vector3.h.

Constructor & Destructor Documentation

Vector3::Vector3 ( )

Definition at line 60 of file Vector3.cpp.

Vector3::~Vector3 ( )

Default destructor.

Definition at line 69 of file Vector3.cpp.

Vector3::Vector3 ( const Vector3 u)

Copy constructor.

Definition at line 75 of file Vector3.cpp.

Vector3::Vector3 ( const NVector3 u)

Copy constructor from a normalized vector.

Definition at line 82 of file Vector3.cpp.

Vector3::Vector3 ( double  x,
double  y,
double  z 
)

Create a vector from real values.

Definition at line 89 of file Vector3.cpp.

Member Function Documentation

double Vector3::infNorm ( ) const

Infinite norm.

Definition at line 147 of file Vector3.cpp.

Vector3 Vector3::maxi ( const Vector3 v1,
const Vector3 v2 
)
static

Definition at line 166 of file Vector3.cpp.

Vector3 Vector3::mini ( const Vector3 v1,
const Vector3 v2 
)
static

Definition at line 161 of file Vector3.cpp.

double Vector3::norm ( ) const

Norm.

Definition at line 133 of file Vector3.cpp.

double vrender::Vector3::operator* ( const Vector3 u) const
inline

Definition at line 143 of file Vector3.h.

Vector3 vrender::Vector3::operator* ( double  v)
inline

Definition at line 156 of file Vector3.h.

Vector3& vrender::Vector3::operator*= ( double  f)
inline

Definition at line 123 of file Vector3.h.

Vector3 vrender::Vector3::operator+ ( const Vector3 u) const
inline

Definition at line 134 of file Vector3.h.

Vector3& vrender::Vector3::operator+= ( const Vector3 v)
inline

Definition at line 107 of file Vector3.h.

Vector3 & Vector3::operator+= ( const NVector3 u)

Self addition with a normalized vector.

Definition at line 105 of file Vector3.cpp.

Vector3 vrender::Vector3::operator- ( const Vector3 u) const
inline

Definition at line 138 of file Vector3.h.

Vector3& vrender::Vector3::operator-= ( const Vector3 v)
inline

Definition at line 115 of file Vector3.h.

Vector3 & Vector3::operator-= ( const NVector3 u)

Self substraction with a normalized vector.

Definition at line 115 of file Vector3.cpp.

Vector3 vrender::Vector3::operator/ ( double  v)
inline

Definition at line 155 of file Vector3.h.

Vector3& vrender::Vector3::operator/= ( double  f)
inline

Definition at line 124 of file Vector3.h.

Vector3& vrender::Vector3::operator= ( const Vector3 u)
inline

Definition at line 93 of file Vector3.h.

Vector3 & Vector3::operator= ( const NVector3 u)

Assignment with a normalized vector.

Definition at line 95 of file Vector3.cpp.

double vrender::Vector3::operator[] ( int  i) const
inline

Definition at line 174 of file Vector3.h.

double& vrender::Vector3::operator[] ( int  i)
inline

Definition at line 182 of file Vector3.h.

Vector3 vrender::Vector3::operator^ ( const Vector3 v) const
inline

Definition at line 148 of file Vector3.h.

void vrender::Vector3::setX ( double  r)
inline

Definition at line 84 of file Vector3.h.

void vrender::Vector3::setXYZ ( double  x,
double  y,
double  z 
)
inline

Definition at line 87 of file Vector3.h.

void vrender::Vector3::setY ( double  r)
inline

Definition at line 85 of file Vector3.h.

void vrender::Vector3::setZ ( double  r)
inline

Definition at line 86 of file Vector3.h.

double Vector3::squareNorm ( ) const

Square norm (self dot product)

Definition at line 140 of file Vector3.cpp.

double vrender::Vector3::x ( ) const
inline

Definition at line 81 of file Vector3.h.

double vrender::Vector3::y ( ) const
inline

Definition at line 82 of file Vector3.h.

double vrender::Vector3::z ( ) const
inline

Definition at line 83 of file Vector3.h.

Friends And Related Function Documentation

bool operator!= ( const Vector3 ,
const Vector3  
)
friend
Vector3 operator* ( double  ,
const Vector3  
)
friend
Vector3 operator- ( const Vector3 u)
friend

Definition at line 132 of file Vector3.h.

std::ostream& operator<< ( std::ostream &  ,
const Vector3  
)
friend
bool operator== ( const Vector3 ,
const Vector3  
)
friend

Member Data Documentation

double vrender::Vector3::_xyz[3]
private

The 3 vector components.

Definition at line 191 of file Vector3.h.

const Vector3 Vector3::inf
static

Definition at line 64 of file Vector3.h.


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


octovis
Author(s): Kai M. Wurm , Armin Hornung
autogenerated on Wed Jun 5 2019 19:26:39