#include <Vector3.h>
Public Member Functions | |
double | operator[] (int i) const |
double & | operator[] (int i) |
Constructor(s) and destructor | |
Vector3 () | |
~Vector3 () | |
Default destructor. | |
Vector3 (const Vector3 &) | |
Copy constructor. | |
Vector3 (const NVector3 &) | |
Copy constructor from a normalized vector. | |
Vector3 (double, double, double) | |
Create a vector from real values. | |
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 | |
Vector3 & | operator= (const Vector3 &u) |
Vector3 & | operator= (const NVector3 &u) |
Assignment with a normalized vector. | |
Metrics | |
double | norm () const |
Norm. | |
double | squareNorm () const |
Square norm (self dot product) | |
double | infNorm () const |
Infinite norm. | |
Static Public Attributes | |
Constant | |
static const Vector3 | inf |
Private Attributes | |
double | _xyz [3] |
The 3 vector components. | |
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 | |
Vector3 & | operator+= (const Vector3 &v) |
Vector3 & | operator-= (const Vector3 &v) |
Vector3 & | operator*= (double f) |
Vector3 & | operator/= (double f) |
Vector3 & | operator-= (const NVector3 &) |
Self substraction with a normalized vector. | |
Vector3 & | operator+= (const NVector3 &) |
Self addition with a normalized vector. | |
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 &) |
Vector3::Vector3 | ( | ) |
Definition at line 59 of file Vector3.cpp.
Default destructor.
Definition at line 68 of file Vector3.cpp.
Vector3::Vector3 | ( | const Vector3 & | u | ) |
Copy constructor.
Definition at line 74 of file Vector3.cpp.
Vector3::Vector3 | ( | const NVector3 & | u | ) |
Copy constructor from a normalized vector.
Definition at line 81 of file Vector3.cpp.
Vector3::Vector3 | ( | double | x, |
double | y, | ||
double | z | ||
) |
Create a vector from real values.
Definition at line 88 of file Vector3.cpp.
double Vector3::infNorm | ( | ) | const |
Infinite norm.
Definition at line 146 of file Vector3.cpp.
Vector3 Vector3::maxi | ( | const Vector3 & | v1, |
const Vector3 & | v2 | ||
) | [static] |
Definition at line 165 of file Vector3.cpp.
Vector3 Vector3::mini | ( | const Vector3 & | v1, |
const Vector3 & | v2 | ||
) | [static] |
Definition at line 160 of file Vector3.cpp.
double Vector3::norm | ( | ) | const |
Norm.
Definition at line 132 of file Vector3.cpp.
double vrender::Vector3::operator* | ( | const Vector3 & | u | ) | const [inline] |
Vector3& vrender::Vector3::operator*= | ( | double | f | ) | [inline] |
Self addition with a normalized vector.
Definition at line 104 of file Vector3.cpp.
Self substraction with a normalized vector.
Definition at line 114 of file Vector3.cpp.
Vector3& vrender::Vector3::operator/= | ( | double | f | ) | [inline] |
Assignment with a normalized vector.
Definition at line 94 of file Vector3.cpp.
double vrender::Vector3::operator[] | ( | int | i | ) | const [inline] |
void vrender::Vector3::setX | ( | double | r | ) | [inline] |
void vrender::Vector3::setXYZ | ( | double | x, |
double | y, | ||
double | z | ||
) | [inline] |
void vrender::Vector3::setY | ( | double | r | ) | [inline] |
void vrender::Vector3::setZ | ( | double | r | ) | [inline] |
double Vector3::squareNorm | ( | ) | const |
Square norm (self dot product)
Definition at line 139 of file Vector3.cpp.
double vrender::Vector3::x | ( | ) | const [inline] |
double vrender::Vector3::y | ( | ) | const [inline] |
double vrender::Vector3::z | ( | ) | const [inline] |
std::ostream& operator<< | ( | std::ostream & | , |
const Vector3 & | |||
) | [friend] |
double vrender::Vector3::_xyz[3] [private] |
const Vector3 Vector3::inf [static] |