Vector2 Class Reference
Public Member Functions | |
double | operator[] (int i) const |
double & | operator[] (int i) |
Constructor(s) and destructor | |
Vector2 () | |
Default constructor. More... | |
~Vector2 () | |
Default destructor. More... | |
Vector2 (const Vector2 &) | |
Copy constructor. More... | |
Vector2 (const Vector3 &u) | |
Vector2 (double, double) | |
Create a vector from real values. More... | |
Access methods | |
double | x () const |
double | y () const |
void | setX (double r) |
void | setY (double r) |
void | setXY (double x, double y) |
Assignment | |
Vector2 & | operator= (const Vector2 &u) |
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 Vector2 | inf |
Friends | |
Comparisons | |
bool | operator== (const Vector2 &, const Vector2 &) |
bool | operator!= (const Vector2 &, const Vector2 &) |
Stream overrides | |
Should be used for most comparisons, for efficiency reasons. | |
std::ostream & | operator<< (std::ostream &, const Vector2 &) |
Out stream override: prints the 3 vector components. More... | |
Algebraic operations | |
Vector2 & | operator+= (const Vector2 &v) |
Vector2 & | operator-= (const Vector2 &v) |
Vector2 & | operator*= (double f) |
Vector2 & | operator/= (double f) |
Vector2 | operator+ (const Vector2 &u) const |
Vector2 | operator- (const Vector2 &u) const |
double | operator* (const Vector2 &u) const |
double | operator^ (const Vector2 &v) const |
Vector2 | operator/ (double v) |
Vector2 | operator* (double v) |
Vector2 | operator- (const Vector2 &) |
Vector2 | operator* (double, const Vector2 &) |
Left multiplication by a real value. More... | |
static Vector2 | mini (const Vector2 &, const Vector2 &) |
static Vector2 | maxi (const Vector2 &, const Vector2 &) |
Detailed Description
Constructor & Destructor Documentation
Vector2 | ( | ) |
Default constructor.
Definition at line 59 of file Vector2.cpp.
~Vector2 | ( | ) |
Default destructor.
Definition at line 67 of file Vector2.cpp.
Copy constructor.
Definition at line 73 of file Vector2.cpp.
Vector2 | ( | double | x, |
double | y | ||
) |
Create a vector from real values.
Definition at line 80 of file Vector2.cpp.
Member Function Documentation
double infNorm | ( | ) | const |
double norm | ( | ) | const |
Norm.
Definition at line 109 of file Vector2.cpp.
double squareNorm | ( | ) | const |
Square norm (self dot product)
Definition at line 116 of file Vector2.cpp.
Friends And Related Function Documentation
Left multiplication by a real value.
Definition at line 101 of file Vector2.cpp.
|
friend |
Out stream override: prints the 3 vector components.
Definition at line 131 of file Vector2.cpp.
The documentation for this class was generated from the following files:
- worldsim/3rdParts/qglviewer/VRender/Vector2.h
- worldsim/3rdParts/qglviewer/VRender/Vector2.cpp