#include <Vector.h>

Public Member Functions | |
| Vector () | |
| Standard constructor. | |
| Vector (const Vector &vector) | |
| Copy constructor. | |
| Vector (const GLfloat &x, const GLfloat &y, const GLfloat &z) | |
| Constructor for initialization by value without flag. | |
| Vector (const GLfloat &x, const GLfloat &y, const GLfloat &z, const bool &vertex) | |
| Constructor for initialization by value. | |
| const GLfloat | getX () const |
| Returns the x-coordinate. | |
| const GLfloat | getY () const |
| Returns the y-coordinate. | |
| const GLfloat | getZ () const |
| Returns the z-coordinate. | |
| const GLfloat * | getXYZ () const |
| Returns the coodinates as an array of size 3. | |
| const GLfloat * | getXYZW () const |
| Returns the coodinates as an array of size 4. | |
| const bool | isVertex () const |
| Returns true if it is a vertex, false otherwise. | |
| void | setX (const GLfloat &x) |
| Sets the x-coordinate. | |
| void | setY (const GLfloat &y) |
| Sets the y-coordinate. | |
| void | setZ (const GLfloat &z) |
| Sets the z-coordinate. | |
| void | setVertex (const bool &vertex) |
| Sets the vertex-flag. | |
| void | setVector (const Vector &vector) |
| Sets all coordinates by reference. | |
| void | setXYZFlag (const float &x, const float &y, const float &z, const bool &vertex) |
| Sets all coordinates. | |
| const GLfloat | getDistanceFromOrigin () const |
| Getter for euclidian norm. | |
| void | normalize () |
| Changes the vector to the length of one. | |
| Angle | convertToYaw () const |
| Converts vector to a corresponding yaw angle. | |
| virtual string | toString () const |
| Returns a textual representation. | |
| virtual string | className () const |
| Returns the class name of the object. | |
| virtual enum classId | classId () const |
| Returns the class id of the object. | |
| Vector | operatorX (const Vector &v2) |
| Calculates the cross product. | |
| Vector | operator+= (const Vector &v) |
| EVIL! Only use as last resort. | |
| Vector | operator-= (const Vector &v) |
| EVIL! Only use as last resort. | |
| Vector | operator*= (const GLfloat &a) |
| Vector | operator/= (const GLfloat &a) |
| Vector | operator= (const Vector &v) |
| bool | operator== (const Vector &v) |
| bool | operator!= (const Vector &v) |
Private Attributes | |
| GLfloat | x |
| The x-coordinate. | |
| GLfloat | y |
| The y-coordinate. | |
| GLfloat | z |
| The z-coordinate. | |
| bool | vertex |
| The flag for vertices: false if it is a vector, true if it is a vertex. | |
Friends | |
| Vector | operator+ (const Vector &v1, const Vector &v2) |
| EVIL! Only use as last resort. | |
| Vector | operator- (const Vector &v) |
| Vector | operator- (const Vector &v1, const Vector &v2) |
| EVIL! Only use as last resort. | |
| Vector | operator* (const Vector &v, const float &a) |
| Vector | operator* (const float &a, const Vector &v) |
| float | operator* (const Vector &v1, const Vector &v2) |
| Vector | operator/ (const Vector &v, const float &a) |
| Vector | operator/ (const float &a, const Vector &v) |
Provides basic mathematical vector functionality i.e. cross product, normalization.
| Vector::Vector | ( | ) |
Standard constructor.
Creates an zero vector (no dimension!)
| Vector::Vector | ( | const Vector & | vector | ) |
Copy constructor.
| vector | The vector which shall be duplicated |
| Vector::Vector | ( | const GLfloat & | x, | |
| const GLfloat & | y, | |||
| const GLfloat & | z | |||
| ) |
Constructor for initialization by value without flag.
Sets the vertex flag to false
| x | The x-component | |
| y | The y-component | |
| z | The z-component |
| Vector::Vector | ( | const GLfloat & | x, | |
| const GLfloat & | y, | |||
| const GLfloat & | z, | |||
| const bool & | vertex | |||
| ) |
Constructor for initialization by value.
| x | The x-component | |
| y | The y-component | |
| z | The z-component | |
| vertex | The vertex-Flag |
| const GLfloat Vector::getX | ( | ) | const |
Returns the x-coordinate.
| const GLfloat Vector::getY | ( | ) | const |
Returns the y-coordinate.
| const GLfloat Vector::getZ | ( | ) | const |
Returns the z-coordinate.
| const GLfloat * Vector::getXYZ | ( | ) | const |
Returns the coodinates as an array of size 3.
| const GLfloat * Vector::getXYZW | ( | ) | const |
Returns the coodinates as an array of size 4.
| const bool Vector::isVertex | ( | ) | const |
Returns true if it is a vertex, false otherwise.
Checks wether it is a vertex or a real vector. Returns true if it is a vertex, false otherwise
| void Vector::setX | ( | const GLfloat & | x | ) |
Sets the x-coordinate.
| x | The new x-coordinate |
| void Vector::setY | ( | const GLfloat & | y | ) |
Sets the y-coordinate.
| y | The new y-coordinate |
| void Vector::setZ | ( | const GLfloat & | z | ) |
Sets the z-coordinate.
| z | The new z-coordinate |
| void Vector::setVertex | ( | const bool & | vertex | ) |
Sets the vertex-flag.
| vertex | The new Vertex-flag |
| void Vector::setVector | ( | const Vector & | vector | ) |
| void Vector::setXYZFlag | ( | const float & | x, | |
| const float & | y, | |||
| const float & | z, | |||
| const bool & | vertex | |||
| ) |
| const GLfloat Vector::getDistanceFromOrigin | ( | ) | const |
Getter for euclidian norm.
| void Vector::normalize | ( | ) |
Changes the vector to the length of one.
Changes the vector to the length of one. For the zero vector this method will be ignored.
| Angle Vector::convertToYaw | ( | ) | const |
Converts vector to a corresponding yaw angle.
| string Vector::toString | ( | ) | const [virtual] |
Returns a textual representation.
Reimplemented from Object.
| string Vector::className | ( | ) | const [virtual] |
Returns the class name of the object.
Reimplemented from Object.
| enum classId Vector::classId | ( | ) | const [virtual] |
| Vector Vector::operator*= | ( | const GLfloat & | a | ) | [inline] |
| Vector Vector::operator/= | ( | const GLfloat & | a | ) | [inline] |
| bool Vector::operator== | ( | const Vector & | v | ) | [inline] |
| bool Vector::operator!= | ( | const Vector & | v | ) | [inline] |
GLfloat Vector::x [private] |
The x-coordinate.
GLfloat Vector::y [private] |
The y-coordinate.
GLfloat Vector::z [private] |
The z-coordinate.
bool Vector::vertex [private] |
The flag for vertices: false if it is a vector, true if it is a vertex.
1.5.6