#include <Vector.h>
Inheritance diagram for Vector::
Public Methods | |
Vector (const float x=0.0, const float y=0.0, const float z=0.0, const float w=1.0) | |
Constructor. More... | |
float | x () const |
Getter for the x value. | |
float | y () const |
Getter for the y value. | |
float | z () const |
Getter for the z velue. | |
float | w () const |
Getter for the vector's space. | |
float & | x () |
Reference to the x value. | |
float & | y () |
Reference to the y value. | |
float & | z () |
Reference to the z value. | |
float & | w () |
Reference to the vector's space. | |
float | magnitude () const |
Returns the magnitude of the vector. | |
void | normalize () |
Normalizes the vector (brings to the 1 space). | |
void | set (float nx, float ny, float nz) |
Set all values. | |
std::string | toString () |
Returns a string showing the vector's values. | |
Friends | |
Vector | operator+ (const Vector &v1, const Vector &v2) |
Addition. | |
Vector | operator- (const Vector &v1, const Vector &v2) |
Subtraction. | |
float | dot (const Vector &v1, const Vector &v2) |
Dot product. | |
Vector | cross (const Vector &v1, const Vector &v2) |
Cross product. |
|
Constructor.
|