Public Types | |
typedef T * | iterator |
typedef const T * | const_iterator |
Public Member Functions | |
Vector3 (const T a) | |
Vector3 (const T i, const T j, const T k) | |
Vector3 (const Vector2< T > &xy, const T z) | |
Vector3 (const Vector4< T > &from) | |
template<typename U > | |
Vector3 (const Vector3< U > &orig) | |
Vector3 (const float *values) | |
Vector3 (const double *values) | |
void | set (T xx, T yy, T zz) |
void | set (const float *values) |
void | set (const double *values) |
bool | set (const std::string &values, char delimiter= ' ') |
bool | set (const std::vector< std::string > &values) |
const Vector3 & | operator= (T a) |
const Vector3 & | operator= (const Vector3 &rhs) |
template<typename U > | |
const Vector3 & | operator= (const Vector3< U > &rhs) |
T & | operator[] (size_t position) |
const T & | operator[] (size_t position) const |
Vector3 | operator+ (const T a) const |
Vector3 | operator- (const T a) const |
Vector3 | operator* (const T a) const |
Vector3 | operator/ (T a) const |
const Vector3 & | operator+= (T a) |
const Vector3 & | operator-= (T a) |
const Vector3 & | operator*= (T a) |
const Vector3 & | operator/= (T a) |
Vector3 | operator+ (const Vector3 &rhs) const |
Vector3 | operator- (const Vector3 &rhs) const |
Vector3 | operator* (const Vector3 &rhs) const |
Vector3 | operator/ (const Vector3 &rhs) const |
Vector3 | operator- () const |
const Vector3 & | operator+= (const Vector3 &rhs) |
const Vector3 & | operator-= (const Vector3 &rhs) |
const Vector3 & | operator*= (const Vector3 &rhs) |
const Vector3 & | operator/= (const Vector3 &rhs) |
bool | operator== (const Vector3 &rhs) const |
bool | operator!= (const Vector3 &rhs) const |
bool | isAkin (const Vector3 &rhs, const T &delta=std::numeric_limits< T >::epsilon()) const |
void | clamp (T lower, T upper) |
size_t | smaller (const Vector3 &rhs) const |
size_t | smaller (const Vector3 &rhs, const size_t axis) const |
size_t | greater (const Vector3 &rhs) const |
size_t | greater (const Vector3 &rhs, const size_t axis) const |
T | length () const |
T | lengthSquared () const |
T | distance (const Vector3 &other) const |
T | distanceSquared (const Vector3 &other) const |
T | normalize () |
T | normalise () |
Vector3 | getNormalized () const |
void | scale (T scale_factor) |
Vector3 | cross (const Vector3 &rhs) const |
void | cross (const Vector3 &a, const Vector3 &b) |
T | dot (const Vector3 &rhs) const |
void | invert () |
void | normal (const Vector3 &aa, const Vector3 &bb, const Vector3 &cc) |
Vector3 | normal (const Vector3 &aa, const Vector3 &bb) |
Vector3 | rotate (T theta, T rx, T ry, T rz) |
T | getMinComponent () |
T | getMaxComponent () |
void | randomize () |
bool | getString (std::string &result, const std::string &delimiter=" ") const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
template<> | |
float | length () const |
template<> | |
Vector3< float > | operator/ (float a) const |
template<> | |
Vector3< double > | operator/ (double a) const |
template<> | |
const Vector3< float > & | operator/= (float a) |
template<> | |
const Vector3< double > & | operator/= (double a) |
template<> | |
bool | isAkin (const Vector3 &rhs, const float &delta) const |
template<> | |
Vector3< float > | rotate (float theta, float rx, float ry, float rz) |
Static Public Member Functions | |
static T | normalize (float *source) |
static T | normalise (float *source) |
static T | dot (const Vector3 &a, const Vector3 &b) |
Public Attributes | |
union { | |
struct { | |
T x | |
T y | |
T z | |
} | |
struct { | |
T r | |
T g | |
T b | |
} | |
T xyz [3] | |
T rgb [3] | |
T array [3] | |
}; | |
Static Public Attributes | |
static const Vector3 | FORWARD |
static const Vector3 | BACKWARD |
static const Vector3 | UP |
static const Vector3 | DOWN |
static const Vector3 | LEFT |
static const Vector3 | RIGHT |
static const Vector3 | ONE |
static const Vector3 | ZERO |
static const Vector3 | UNIT_X |
static const Vector3 | UNIT_Y |
static const Vector3 | UNIT_Z |
Friends | |
std::ostream & | operator<< (std::ostream &os, const Vector3 &v) |