Public Member Functions | Private Member Functions | Private Attributes | Friends
vrender::NVector3 Class Reference

#include <NVector3.h>

List of all members.

Public Member Functions

double norm () const
 NVector3 ()
 Default constructor (the default normalized vector is (1,0,0))
 NVector3 (const NVector3 &u)
 Copy constructor.
 NVector3 (double x, double y, double z, bool normalization=true)
 NVector3 (const Vector3 &u, bool normalization=true)
NVector3operator= (const NVector3 &u)
 Assignment.
double operator[] (int i) const
void setXYZ (double x, double y, double z, bool normalization=true)
 Writing X,Y and Z coordinates.
double squareNorm () const
double x () const
double y () const
double z () const

Private Member Functions

void normalize ()

Private Attributes

double _n [3]
 normalized vector

Friends

double operator* (const NVector3 &u, const Vector3 &v)
double operator* (const Vector3 &u, const NVector3 &v)
NVector3 operator- (const NVector3 &u)
std::ostream & operator<< (std::ostream &out, const NVector3 &u)
 Out stream override: prints the 3 normalized vector components.

Detailed Description

Definition at line 55 of file NVector3.h.


Constructor & Destructor Documentation

Default constructor (the default normalized vector is (1,0,0))

Definition at line 134 of file NVector3.cpp.

NVector3::NVector3 ( const NVector3 u)

Copy constructor.

Definition at line 143 of file NVector3.cpp.

vrender::NVector3::NVector3 ( double  x,
double  y,
double  z,
bool  normalization = true 
) [inline]

Definition at line 60 of file NVector3.h.

NVector3::NVector3 ( const Vector3 u,
bool  normalization = true 
)

Definition at line 50 of file NVector3.cpp.


Member Function Documentation

double vrender::NVector3::norm ( ) const [inline]

Definition at line 99 of file NVector3.h.

void NVector3::normalize ( ) [private]

Normalization Private method to do normalization (using Norm() method of the Vector class) when it is necessary (construction of a normalized vector for exemple).

Definition at line 183 of file NVector3.cpp.

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

Assignment.

Definition at line 161 of file NVector3.cpp.

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

Definition at line 103 of file NVector3.h.

void NVector3::setXYZ ( double  x,
double  y,
double  z,
bool  normalization = true 
)

Writing X,Y and Z coordinates.

Definition at line 151 of file NVector3.cpp.

double vrender::NVector3::squareNorm ( ) const [inline]

Definition at line 100 of file NVector3.h.

double vrender::NVector3::x ( ) const [inline]

Definition at line 67 of file NVector3.h.

double vrender::NVector3::y ( ) const [inline]

Definition at line 68 of file NVector3.h.

double vrender::NVector3::z ( ) const [inline]

Definition at line 69 of file NVector3.h.


Friends And Related Function Documentation

double operator* ( const NVector3 u,
const Vector3 v 
) [friend]
double operator* ( const Vector3 u,
const NVector3 v 
) [friend]
NVector3 operator- ( const NVector3 u) [friend]

Definition at line 82 of file NVector3.h.

std::ostream& operator<< ( std::ostream &  out,
const NVector3 u 
) [friend]

Out stream override: prints the 3 normalized vector components.

Definition at line 173 of file NVector3.cpp.


Member Data Documentation

double vrender::NVector3::_n[3] [private]

normalized vector

Definition at line 114 of file NVector3.h.


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


octovis
Author(s): Kai M. Wurm , Armin Hornung
autogenerated on Thu Aug 27 2015 14:13:27