#include <Vector3.h>
Public Member Functions | |
Vector3 (void) | |
creates a zero instance of Vector3 | |
Vector3 (Real x, Real y, Real z) | |
creates an instance of Vector3 from x,y,z | |
Vector3 (const Vector4 &vector) | |
creates an instance from a Vector4 | |
Vector3 (const Vector3 &vector) | |
copy constructor | |
~Vector3 (void) | |
Vector3 instance destructor. | |
Real & | operator() (int comp) |
component reference accessor | |
Real | operator() (int comp) const |
component accessor | |
Vector3 & | operator= (const Vector3 &u) |
copy operator | |
Vector3 | unit (void) |
unit operator | |
Real | norm (void) |
norm operator | |
Real | sqrnorm (void) |
sqrnorm operator | |
Friends | |
class | Vector4 |
We will assume public access operators for general usage as these operators will *not* make any change to the data members. Expressions will be like A = A + B that will have an extra call to the copy constructor.
TODO : range check , optmizations ?