Generic storage class template for math vector representations storing DIM
elements of type T
.
More...
#include <vector.h>
Public Attributes | |
T | elements [DIM] |
coordinates. More... | |
Generic storage class template for math vector representations storing DIM
elements of type T
.
Used as base class for the mi::math::Vector class template.
Use the mi::math::Vector template in your programs and this storage class only if you need a POD type, for example for parameter passing.
This class template provides array-like storage for DIM
many values of a (arithmetic) type T
. It has specializations for DIM
== 1,2,3, and 4. These specializations use data members named x
, y
, z
, and w
according to the dimension. They provide users of the mi::math::Vector class template with the conventional member access to vector elements, such as in:
This class template contains only the data and no member functions. The necessary access abstraction is encoded in the free function mi::math::vector_base_ptr(), which is overloaded for the general case and the various specializations for the small dimensions. It returns a pointer to the first element.
#include <mi/math/vector.h>