[krubik Index] [krubik Heirarchy]
General vector class More...
#include <vector.h>
This is the class Vector. It represents a general (mathematical) vector. The class is used by krubik but is also usefull for other programs.
Construct the zero-vector, with length 3.
Constructs a zero vector with specified length
Constructs a vector in R-3
x | The x coordinate of the vector |
y | The y coordinate of the vector |
z | The z coordinate of the vector |
Overloaded operator=
Overloaded operator=
The destrucor method for class Vector
Create is new vector with length 3 at values x, y, z
Get value of vector at specified index
Used for compatibility with old class Vector
Calculates the inner-produkt of the current vertor with the argument vector.
v | The vector with which to take the innerproduct |
Overloaded operator *
Normalizes the vector, that is multiplies the vector by the 1 over the norm of the vector.
Calculates the angle between 2 vectors.
Calculate the scalar multiple of the argument with this vector.
Overloaded operator *
Overloaded operator *=
Overloaded operator +, does the same as the function addVec
Overloaded operator +=
Overloaded operator -
Overloaded operator -=
Overloaded function.
Calculates the cross-product of two vectors. Note : the vector produkt is only defines for two vector's of length 3.
v | First vector to calculate cross-product |
w | Second vector |
| Kdoc |