#include <CV2D.h>
Public Member Functions | |
CV2D (void) | |
CV2D (double rdX, double rdY) | |
CV2D (const CV2D &Vector) | |
~CV2D (void) | |
operator CV3D () const | |
const CV2D & | operator= (const CV2D &) |
bool | operator== (const CV2D &) const |
bool | operator!= (const CV2D &) const |
CV2D & | operator+= (const CV2D &) |
CV2D & | operator-= (const CV2D &) |
CV2D & | operator *= (double) |
CV2D & | operator/= (double) |
CV2D | operator+ (const CV2D &) const |
CV2D | operator- (const CV2D &) const |
CV2D | operator- (void) const |
double | operator * (const CV2D &) const |
CV2D | operator * (double) const |
CV2D | operator/ (double) const |
double & | operator[] (int i) |
double | operator[] (int i) const |
double | getMinComponent (void) const |
double | getAbsMinComponent (void) const |
double | getMaxComponent (void) const |
double | getAbsMaxComponent (void) const |
int | getMinComponentCoord (void) const |
int | getAbsMinComponentCoord (void) const |
int | getMaxComponentCoord (void) const |
int | getAbsMaxComponentCoord (void) const |
double | getX (void) const |
double | getY (void) const |
void | setX (double rdX) |
void | setY (double rdY) |
void | setCoord (double rdX, double rdY) |
double | getNorm (void) const |
void | normalize (void) |
CV2D | getNormalized (void) const |
void | print (void) const |
Static Public Attributes | |
static double | epsilon = DOUBLE_EPSILON |
Protected Attributes | |
double | m_ard [2] |
Friends | |
CV2D | operator * (double, const CV2D &) |
ostream & | operator<< (ostream &, const CV2D &) |
istream & | operator>> (istream &, CV2D &) |
CV2D::CV2D | ( | void | ) | [inline] |
Default constructor. The default value of the instantiated vector will be (0.0,0.0).
CV2D::CV2D | ( | double | rdX, | |
double | rdY | |||
) | [inline] |
Construct new vector. The value of the vector will be (rdX, rdY).
CV2D::CV2D | ( | const CV2D & | Vector | ) | [inline] |
Copyconstructor. Initializes the new vector with the vector passed in 'v'.
CV2D::~CV2D | ( | void | ) | [inline] |
Default destructor.
double CV2D::getAbsMaxComponent | ( | void | ) | const [inline] |
Returns the value of the maximal point component.
int CV2D::getAbsMaxComponentCoord | ( | void | ) | const |
Returns the coordinate index of the maximum point component (using fabs).
double CV2D::getAbsMinComponent | ( | void | ) | const [inline] |
Returns the value of the minimal point component.
int CV2D::getAbsMinComponentCoord | ( | void | ) | const |
Returns the coordinate index of the minial point component (using fabs).
double CV2D::getMaxComponent | ( | void | ) | const [inline] |
Returns the value of the maximal point component.
int CV2D::getMaxComponentCoord | ( | void | ) | const |
Returns the coordinate index of the maximum point component.
double CV2D::getMinComponent | ( | void | ) | const [inline] |
Returns the value of the minimal point component.
int CV2D::getMinComponentCoord | ( | void | ) | const |
Returns the coordinate index of the minial point component.
double CV2D::getNorm | ( | void | ) | const [inline] |
Returns the euclidian norm of the vector.
CV2D CV2D::getNormalized | ( | void | ) | const |
Returns the normalized vector.
double CV2D::getX | ( | void | ) | const [inline] |
Returns the x-coordinate of the vector.
double CV2D::getY | ( | void | ) | const [inline] |
Returns the y-coordinate of the vector.
void CV2D::normalize | ( | void | ) |
Normalizes the vector.
CV2D CV2D::operator * | ( | double | ) | const |
Multiplication of a vector with a scalar.
double CV2D::operator * | ( | const CV2D & | ) | const |
Scalar multiplication of two vectors. The result will be returned.
CV2D & CV2D::operator *= | ( | double | ) |
Multiplies a vector with a scalar.
CV2D::operator CV3D | ( | ) | const |
bool CV2D::operator!= | ( | const CV2D & | ) | const |
Compares to vectors. Same as above. Only the result is negated.
CV2D CV2D::operator- | ( | void | ) | const |
Negates the vector.
CV2D CV2D::operator/ | ( | double | ) | const |
Division of a vector with a scalar.
CV2D & CV2D::operator/= | ( | double | ) |
Multiplies a vector with a scalar.
bool CV2D::operator== | ( | const CV2D & | ) | const |
Compares to vectors. The result will be 'true' if the two vector are indentically in each coefficient. Otherwise 'false' will be returned.
double CV2D::operator[] | ( | int | i | ) | const [inline] |
Same as above but for constant vectors.
double& CV2D::operator[] | ( | int | i | ) | [inline] |
Returns the i-th coefficient or the vector. The index goes from 0 to 3, so 0 stands for the x-coordinate, 1 for the y-coordinate and so on.
void CV2D::print | ( | void | ) | const |
Prints a vector to the standard output.
void CV2D::setCoord | ( | double | rdX, | |
double | rdY | |||
) | [inline] |
Set the value of the vector. The value of the vector will be (rdX, rdY, rdZ, rdW).
void CV2D::setX | ( | double | rdX | ) | [inline] |
Sets the x-coordinate of the vector to 'x'.
void CV2D::setY | ( | double | rdY | ) | [inline] |
Sets the y-coordinate of the vector to 'y'.
Multiplication of a scalar with a vector.
ostream& operator<< | ( | ostream & | s, | |
const CV2D & | v | |||
) | [friend] |
Same as above. But more useful for streams.
istream& operator>> | ( | istream & | s, | |
CV2D & | v | |||
) | [friend] |
Reads a vector from the given stream.
double CV2D::epsilon = DOUBLE_EPSILON [static] |
documentation stuff
double CV2D::m_ard[2] [protected] |