Vector3 Class Reference
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 |
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 &) |
Detailed Description
Constructor & Destructor Documentation
~Vector3 | ( | ) |
Default destructor.
Definition at line 68 of file Vector3.cpp.
Copy constructor.
Definition at line 74 of file Vector3.cpp.
Copy constructor from a normalized vector.
Definition at line 81 of file Vector3.cpp.
Vector3 | ( | double | x, |
double | y, | ||
double | z | ||
) |
Create a vector from real values.
Definition at line 88 of file Vector3.cpp.
Member Function Documentation
double infNorm | ( | ) | const |
double norm | ( | ) | const |
Norm.
Definition at line 132 of file Vector3.cpp.
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.
Assignment with a normalized vector.
Definition at line 94 of file Vector3.cpp.
double squareNorm | ( | ) | const |
Square norm (self dot product)
Definition at line 139 of file Vector3.cpp.
The documentation for this class was generated from the following files:
- worldsim/3rdParts/qglviewer/VRender/Vector3.h
- worldsim/3rdParts/qglviewer/VRender/Vector3.cpp