FastUIDraw
|
vecN is a simple static array class with no virtual functions and no memory overhead. Supports runtim array index checking and STL style iterators via pointer iterators. More...
#include <vecN.hpp>
Public Types | |
enum | { array_size = N } |
typedef const_pointer | const_iterator |
iterator typedef to const_pointer | |
typedef const T * | const_pointer |
STL compliant typedef. | |
typedef const T & | const_reference |
STL compliant typedef. | |
typedef ptrdiff_t | difference_type |
STL compliant typedef. | |
typedef pointer | iterator |
iterator typedef to pointer | |
typedef T * | pointer |
STL compliant typedef. | |
typedef T & | reference |
STL compliant typedef. | |
typedef size_t | size_type |
STL compliant typedef. | |
typedef T | value_type |
STL compliant typedef. | |
Public Member Functions | |
vecN (void) | |
vecN (const T &value) | |
template<size_t M> | |
vecN (const vecN< T, M > &obj, const T &value=T()) | |
template<typename S , size_type M> | |
vecN (const vecN< S, M > &obj, const T &value=T()) | |
template<size_t M> | |
vecN (const vecN< T, M > &obj, size_type start, size_type stride=1, const T &default_value=T()) | |
vecN (const T &px, const T &py) | |
vecN (const T &px, const T &py, const T &pz) | |
vecN (const T &px, const T &py, const T &pz, const T &pw) | |
vecN (const T &p0, const T &p1, const T &p2, const T &p3, const T &p4) | |
vecN (const T &p0, const T &p1, const T &p2, const T &p3, const T &p4, const T &p5) | |
vecN (const T &p0, const T &p1, const T &p2, const T &p3, const T &p4, const T &p5, const T &p6) | |
vecN (const T &p0, const T &p1, const T &p2, const T &p3, const T &p4, const T &p5, const T &p6, const T &p7) | |
vecN (const T &p0, const T &p1, const T &p2, const T &p3, const T &p4, const T &p5, const T &p6, const T &p7, const T &p8) | |
vecN (const vecN< T, N-1 > &p, const T &d) | |
void | AddMult (const vecN &dood, const T &mult) |
T | atan (void) const |
reference | back (void) |
const_reference | back (void) const |
iterator | begin (void) |
const_iterator | begin (void) const |
T * | c_ptr (void) |
const T * | c_ptr (void) const |
T | dot (const vecN &obj) const |
iterator | end (void) |
const_iterator | end (void) const |
void | face_forward (const vecN &referencePt) |
const vecN & | fill (const T &obj) |
reference | front (void) |
const_reference | front (void) const |
T | L1norm (void) const |
T | magnitude (void) const |
T | magnitudeSq (void) const |
void | normalize (T tol) |
void | normalize (void) |
bool | operator!= (const vecN &obj) const |
vecN | operator% (const vecN &obj) const |
vecN | operator% (const T &obj) const |
template<size_t M> | |
void | operator%= (const vecN< T, M > &obj) |
void | operator%= (const T &obj) |
vecN | operator* (const vecN &obj) const |
vecN | operator* (const T &obj) const |
template<size_t M> | |
void | operator*= (const vecN< T, M > &obj) |
void | operator*= (const T &obj) |
vecN | operator+ (const vecN &obj) const |
template<size_t M> | |
void | operator+= (const vecN< T, M > &obj) |
vecN | operator- (void) const |
vecN | operator- (const vecN &obj) const |
template<size_t M> | |
void | operator-= (const vecN< T, M > &obj) |
vecN | operator/ (const vecN &obj) const |
vecN | operator/ (const T &obj) const |
template<size_t M> | |
void | operator/= (const vecN< T, M > &obj) |
void | operator/= (const T &obj) |
bool | operator< (const vecN &obj) const |
bool | operator<= (const vecN &obj) const |
const vecN & | operator= (const vecN &obj) |
bool | operator== (const vecN &obj) const |
bool | operator> (const vecN &obj) const |
bool | operator>= (const vecN &obj) const |
const_reference | operator[] (size_type j) const |
reference | operator[] (size_type j) |
void | swap (vecN &obj) |
vecN | unit_vector (void) const |
vecN | unit_vector (T tol) const |
reference | w (void) |
const_reference | w (void) const |
reference | x (void) |
const_reference | x (void) const |
reference | y (void) |
const_reference | y (void) const |
reference | z (void) |
const_reference | z (void) const |
Static Public Member Functions | |
static size_t | size (void) |
Friends | |
vecN | operator* (const T &obj, const vecN &vec) |
vecN | operator/ (const T &obj, const vecN &vec) |
vecN is a simple static array class with no virtual functions and no memory overhead. Supports runtim array index checking and STL style iterators via pointer iterators.
T | typename with a constructor that takes no arguments. |
N | size of array |
anonymous enum |
|
inline |
|
inlineexplicit |
|
inlineexplicit |
Copy constructor from array of different size. Calls T::operator= on each array element, if M<N then for each element beyond M, T::operator= is called with the parameter value.
M | size of other array. |
obj | constant reference to copy elements from. |
value | constant reference for value to use beyond index M |
|
inlineexplicit |
Ctor Calls T::operator= on each array element, if M<N then for each element beyond M, T::operator= is called with the parameter value.
M | size of other array. |
obj | constant reference to copy elements from. |
value | constant reference for value to use beyond index M |
|
inline |
Copy constructor from array of different size specifying the range Copies every stride'th value stored at obj starting at index start to this. For elements of this which are not assigned in this fashion, they are assigned as default_value.
M | size of other array. |
obj | constant reference to copy elements from. |
start | first index of M to use |
stride | stride of copying |
default_value |
|
inline |
|
inline |
|
inline |
|
inline |
Conveniance ctor, will fail to compile unless N=5
p0 | value to which to assing the return value of operator[](0) |
p1 | value to which to assing the return value of operator[](1) |
p2 | value to which to assing the return value of operator[](2) |
p3 | value to which to assing the return value of operator[](3) |
p4 | value to which to assing the return value of operator[](4) |
|
inline |
Conveniance ctor, will fail to compile unless N=6
p0 | value to which to assing the return value of operator[](0) |
p1 | value to which to assing the return value of operator[](1) |
p2 | value to which to assing the return value of operator[](2) |
p3 | value to which to assing the return value of operator[](3) |
p4 | value to which to assing the return value of operator[](4) |
p5 | value to which to assing the return value of operator[](5) |
|
inline |
Conveniance ctor, will fail to compile unless N=7
p0 | value to which to assing the return value of operator[](0) |
p1 | value to which to assing the return value of operator[](1) |
p2 | value to which to assing the return value of operator[](2) |
p3 | value to which to assing the return value of operator[](3) |
p4 | value to which to assing the return value of operator[](4) |
p5 | value to which to assing the return value of operator[](5) |
p6 | value to which to assing the return value of operator[](6) |
|
inline |
Conveniance ctor, will fail to compile unless N=8
p0 | value to which to assing the return value of operator[](0) |
p1 | value to which to assing the return value of operator[](1) |
p2 | value to which to assing the return value of operator[](2) |
p3 | value to which to assing the return value of operator[](3) |
p4 | value to which to assing the return value of operator[](4) |
p5 | value to which to assing the return value of operator[](5) |
p6 | value to which to assing the return value of operator[](6) |
p7 | value to which to assing the return value of operator[](7) |
|
inline |
Conveniance ctor, will fail to compile unless N=9
p0 | value to which to assing the return value of operator[](0) |
p1 | value to which to assing the return value of operator[](1) |
p2 | value to which to assing the return value of operator[](2) |
p3 | value to which to assing the return value of operator[](3) |
p4 | value to which to assing the return value of operator[](4) |
p5 | value to which to assing the return value of operator[](5) |
p6 | value to which to assing the return value of operator[](6) |
p7 | value to which to assing the return value of operator[](7) |
p8 | value to which to assing the return value of operator[](8) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Normalize this vecN up to a tolerance, equivalent to
tol | tolerance to avoid dividing by too small values |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Provided as a conveniance, equivalent to
obj | vecN to which to compare. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
Returns the vector that would be made by calling normalize(void).
|
inline |
Returns the vector that would be made by calling normalize(T).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |