|
Public Member Functions |
|
| Vector3 () |
| | Initialize to 0,0,0.
|
|
| Vector3 (const Vector3 &v) |
| | Initialize to the values of another vector.
|
|
| Vector3 (float x, float y, float z) |
| | Initialize to x,y,z.
|
|
void | Set (float x, float y, float z) |
| | Set to x,y,z.
|
|
Vector3 & | operator= (const Vector3 &v) |
| | Assign to the values of another vector.
|
|
Vector3 & | operator+= (const Vector3 &v) |
| | Add to this vector, the values of another vector.
|
|
Vector3 & | operator-= (const Vector3 &v) |
| | Subtract from this vector the values of another vector.
|
|
Vector3 & | operator *= (float f) |
| | Multiply and store the values of this vector by a scalar.
|
|
Vector3 & | operator/= (float f) |
| | Divide and store the values of this vector by a scalar.
|
|
Vector3 | operator+ (const Vector3 &v) |
| | Return the values of this vector plus another.
|
|
Vector3 | operator- (const Vector3 &v) |
| | Return the values of this vector minus another.
|
|
Vector3 | operator * (float f) |
| | Return the values of this vector times a scalar.
|
|
Vector3 | operator/ (float f) |
| | Return the values of this vector divided by a scalar.
|
|
float | Magnitude () |
| | Return the magnitude of this vector.
|
|
Vector3 & | Normalize () |
| | Make this a unit-vector in the same direction.
|
Static Public Member Functions |
|
static Vector3 | Cross (const Vector3 &v1, const Vector3 &v2) |
| | Cross Product: returns the vector perpendicular to both v1 and v2.
|
|
static float | Dot (const Vector3 &v1, const Vector3 &v2) |
| | Dot Product = | v1 || v2 | cos(a), cosine of the angle between two unit-vectors.
|
Public Attributes |
|
float | x |
|
float | y |
|
float | z |
Mathematical structure used to hold 3D points and vectors.