Vector Class Reference
[System]
Four-component vector with dot and cross product capabilities.
More...
#include <Vector.hpp>
List of all members.
Public Member Functions |
| Vector () |
| Vector (float value) |
| Vector (float x, float y) |
| Vector (float x, float y, float z) |
| Vector (float x, float y, float z, float w) |
Vector & | operator= (const Vector &B) |
Vector & | operator+= (const Vector &B) |
Vector & | operator-= (const Vector &B) |
Vector & | operator*= (const Vector &B) |
Vector & | operator/= (const Vector &B) |
Vector & | operator+= (float b) |
Vector & | operator-= (float b) |
Vector & | operator*= (float b) |
Vector & | operator/= (float b) |
float & | operator[] (int i) |
float | operator[] (int i) const |
float | length () const |
float | get (int i) const |
void | set (float x, float y) |
void | set (float x, float y, float z) |
void | set (float x, float y, float z, float w) |
void | toArray (float array[4]) |
Public Attributes |
int | size |
float | x |
float | y |
float | z |
float | w |
Friends |
bool | operator== (const Vector &A, const Vector &B) |
Vector | operator+ (const Vector &A, const Vector &B) |
Vector | operator- (const Vector &A, const Vector &B) |
Vector | operator* (const Vector &A, const Vector &B) |
Vector | operator/ (const Vector &A, const Vector &B) |
Vector | operator+ (const Vector &A, float b) |
Vector | operator- (const Vector &A, float b) |
Vector | operator* (const Vector &A, float b) |
Vector | operator/ (const Vector &A, float b) |
ostream & | operator<< (ostream &out, const Vector &A) |
Vector | cross (const Vector &A, const Vector &B) |
float | dot (const Vector &A, const Vector &B) |
Vector | min (const Vector &A, const Vector &B) |
Vector | max (const Vector &A, const Vector &B) |
Vector | normalize (Vector vector) |
Detailed Description
Four-component vector with dot and cross product capabilities.
Constructor & Destructor Documentation
Four-component vector initialized to all zeroes (except w=1.0).
Four-component vector initialized to one value.
Vector |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z | |
|
) |
| | |
Vector |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z, |
|
|
float |
w | |
|
) |
| | |
Member Function Documentation
float get |
( |
int |
i |
) |
const |
- Returns:
- length of the vector.
float operator[] |
( |
int |
i |
) |
const |
float & operator[] |
( |
int |
i |
) |
|
Friends And Related Function Documentation
- Returns:
- vector perpendicular to the plane formed by two vectors.
- Returns:
- projection of one vector onto another.
- Returns:
- component-wise maximum of the two vectors
- Returns:
- component-wise minimum of the two vectors
- Returns:
- Unit length version of the vector.
The documentation for this class was generated from the following files: