#include <Vector.h>
Inheritance diagram for Vector:

Public Member Functions | |
| Vector () | |
| Constructor - sets the value of all Elements to 0. | |
| Vector (float _x, float _y, float _z) | |
| Constructor - sets the value of the elements to the value of the assigned parameter. | |
| Vector (Vector *v) | |
| Constructor - sets the value of the elements to the value of the assigned vector. | |
| ~Vector () | |
| Destructor. | |
| Vector * | crossProduct (Vector *v2) |
| Calculates the Cross-Product with the assigned Vector and return the result as a new Vector-Object. | |
| float | dotProduct (Vector *v2) |
| Returns the Dot-Product with the assigned Vector. | |
| Vector * | add (Vector *v2) |
| Add the values of the assigned Vector and returns the result as a new Vector-Object. | |
| Vector * | sub (Vector *v2) |
| Substract the values of the assigned Vector and returns the result as a new Vector-Object. | |
| void | normalize () |
| Normalizes the Vector. | |
| float | GetLength () |
| Return the length of the Vector. | |
| Vector | operator- (Vector &v2) |
| Implements the '-' Operator for the Vector-Class. | |
| Vector | operator+ (Vector &v2) |
| Implements the '+' Operator for the Vector-Class. | |
| Vector * | multScalar (float scalar) |
| Multiplies the assigned parameter to the elements of the Vector. | |
| Vector | rotateX (float angle) |
| Calculates the new Vector, after a Rotation about the x-direction with the assigned paramter and returns the result as a new Vector-Object. | |
| Vector | rotateY (float angle) |
| Calculates the new Vector, after a Rotation about the Y-direction with the assigned paramter and returns the result as a new Vector-Object. | |
| Vector | rotateZ (float angle) |
| Calculates the new Vector, after a Rotation about the Z-direction with the assigned paramter and returns the result as a new Vector-Object. | |
| Vector | scale (float sx, float sy, float sz) |
| Scales the Vector in the X-, Y-, Z-Direction with the assigned parameter sx (for x-direction), sy (for y-direction) and sz (for z-direction) The Result will be returned as a new Vector-Object. | |
| Vector & | operator+= (Vector &v2) |
| Vector & | operator-= (Vector &v2) |
| Vector & | operator *= (float scalar) |
| Vector & | operator/= (float scalar) |
| float | magnitude (void) |
| Returns the mangitude of the Vector. | |
| void | set (float p_x, float p_y, float p_z) |
| Sets the values of the elements of the vector to the values of the assigned parameters. | |
| void | set (Vector *v) |
| Sets the values of the elements of the vector to the assigned Vector-parameter. | |
| float | getAngle () |
Public Attributes | |
| float | x |
| float | y |
| float | z |
Private Member Functions | |
| Vector | matrixMult (float m[3][3]) |
| Implements the multiplication between a 3x3-Matrix and the Vector. | |
| Vector::Vector | ( | ) |
Constructor - sets the value of all Elements to 0.
| Vector::Vector | ( | float | _x, | |
| float | _y, | |||
| float | _z | |||
| ) |
Constructor - sets the value of the elements to the value of the assigned parameter.
| Vector::Vector | ( | Vector * | v | ) |
Constructor - sets the value of the elements to the value of the assigned vector.
| Vector::~Vector | ( | ) |
Destructor.
| Vector Vector::matrixMult | ( | float | m[3][3] | ) | [private] |
Implements the multiplication between a 3x3-Matrix and the Vector.
Calculates the Cross-Product with the assigned Vector and return the result as a new Vector-Object.
Add the values of the assigned Vector and returns the result as a new Vector-Object.
Substract the values of the assigned Vector and returns the result as a new Vector-Object.
| void Vector::normalize | ( | ) |
Normalizes the Vector.
| float Vector::GetLength | ( | ) |
Return the length of the Vector.
| Vector * Vector::multScalar | ( | float | scalar | ) |
Multiplies the assigned parameter to the elements of the Vector.
| Vector Vector::rotateX | ( | float | angle | ) |
Calculates the new Vector, after a Rotation about the x-direction with the assigned paramter and returns the result as a new Vector-Object.
| Vector Vector::rotateY | ( | float | angle | ) |
Calculates the new Vector, after a Rotation about the Y-direction with the assigned paramter and returns the result as a new Vector-Object.
| Vector Vector::rotateZ | ( | float | angle | ) |
Calculates the new Vector, after a Rotation about the Z-direction with the assigned paramter and returns the result as a new Vector-Object.
| Vector Vector::scale | ( | float | sx, | |
| float | sy, | |||
| float | sz | |||
| ) |
Scales the Vector in the X-, Y-, Z-Direction with the assigned parameter sx (for x-direction), sy (for y-direction) and sz (for z-direction) The Result will be returned as a new Vector-Object.
| Vector& Vector::operator *= | ( | float | scalar | ) | [inline] |
| Vector& Vector::operator/= | ( | float | scalar | ) | [inline] |
| float Vector::magnitude | ( | void | ) |
Returns the mangitude of the Vector.
| void Vector::set | ( | float | p_x, | |
| float | p_y, | |||
| float | p_z | |||
| ) | [inline] |
Sets the values of the elements of the vector to the values of the assigned parameters.
| void Vector::set | ( | Vector * | v | ) |
Sets the values of the elements of the vector to the assigned Vector-parameter.
| float Vector::getAngle | ( | ) | [inline] |
| float Vector::x |
| float Vector::y |
| float Vector::z |
1.5.1-p1