#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 | |
Vector3 & | operator= (const Vector3 &u) |
Vector3 & | operator= (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 | |
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. More... | |
Vector3 & | operator+= (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 &) |
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.
double Vector3::infNorm | ( | ) | const |
Infinite norm.
Definition at line 147 of file Vector3.cpp.
Definition at line 166 of file Vector3.cpp.
Definition at line 161 of file Vector3.cpp.
double Vector3::norm | ( | ) | const |
Norm.
Definition at line 133 of file Vector3.cpp.
|
inline |
Self addition with a normalized vector.
Definition at line 105 of file Vector3.cpp.
Self substraction with a normalized vector.
Definition at line 115 of file Vector3.cpp.
Assignment with a normalized vector.
Definition at line 95 of file Vector3.cpp.
|
inline |
double Vector3::squareNorm | ( | ) | const |
Square norm (self dot product)
Definition at line 140 of file Vector3.cpp.
|
friend |
|
private |