#include <GeoBases.h>
Public Types | |
|
typedef MatrixN < elemCount > | MatrixType |
| associated matrix type | |
|
typedef MatrixN < elemCount+1 > | GreaterMatrixType |
| associated matrix type with one extra dimension | |
Public Member Functions | |
| uint | ElemCount () const |
| The number of elements in the vector. | |
| VectorN () | |
| ctor | |
| VectorN (const float *array) | |
| ctor | |
| VectorN (float c) | |
| ctor | |
| float & | operator[] (uint index) |
| access an element by index with [] | |
| const float & | operator[] (uint index) const |
| access an element by index with [] | |
| VectorN | operator * (const VectorN &o) const |
| per-element scale | |
| VectorN | operator * (const float &o) const |
| scale by a value | |
| VectorN | operator/ (const VectorN &o) const |
| per-element divide | |
| VectorN | operator/ (const float &o) const |
| divide elements by a value | |
| VectorN | operator+ (const VectorN &o) const |
| add | |
| VectorN | operator+ (const float &o) const |
| add | |
| VectorN | operator- (const VectorN &o) const |
| subtract | |
| VectorN | operator- (const float &o) const |
| subtract | |
| void | operator *= (const VectorN &o) |
| per-element scale | |
| void | operator *= (const float &o) |
| scale by a value | |
| void | operator/= (const VectorN &o) |
| per-element divide | |
| void | operator/= (const float &o) |
| divide elements by a value | |
| void | operator+= (const VectorN &o) |
| add | |
| void | operator+= (const float &o) |
| add | |
| void | operator-= (const VectorN &o) |
| subtract | |
| void | operator-= (const float &o) |
| subtract | |
| VectorN | operator- () const |
| negation | |
| float | LengthSquared () const |
| the vector length, squared | |
| float | Length () const |
| the vector length | |
| VectorN | Normal () const |
| get a normalized version of the vector | |
| void | Normalize () |
| normalize this vector | |
| float | Dot (const VectorN &o) const |
| dot product | |
| float | AngleBetween (const VectorN &o) const |
| angle between vectors | |
| void | Transform (const MatrixType &m) const |
| transform (multiply) this vector with a matrix | |
| operator std::string () const | |
| human readable string representation | |
Public Attributes | |
| float | elem [elemCount] |
| Elements of the vector. | |
Friends | |
| VectorN | operator * (const float &o, const VectorN &me) |
| scale by a value | |
| bool | operator== (const VectorN &v1, const VectorN &v2) |
| comparison | |
| bool | operator== (const VectorN &v, const float &c) |
| comparison | |
| bool | operator!= (const VectorN &v1, const VectorN &v2) |
| comparison | |
| bool | operator!= (const VectorN &v, const float &c) |
| comparison | |
1.5.3