Vector<D, N>: a D-dimensional vector of numbers of type N.
More...
#include <Vector.h>
List of all members.
Detailed Description
template<unsigned D, typename N = double>
class VecMath::Vector< D, N >
Vector<D, N>: a D-dimensional vector of numbers of type N.
- Template Parameters:
-
D | dimension of the vector |
N | numerical type of the vector elements |
- Author:
- Lene Preuss <lene.preuss@gmail.com>
Constructor & Destructor Documentation
template<unsigned D, typename N>
template<unsigned D, typename N>
Constructor with variable argument list.
To avoid using variable arglists, for D
up to 10 you can use makeVector().
- Parameters:
-
x0 | the vector's first element. |
x1 | the vector's second element. |
... | the vector's other elements. |
References VecMath::Vector< D, N >::_x, and va_end.
Member Function Documentation
template<unsigned D, typename N >
Direct access to the array storing the components.
Needed by glVertex3dv
Referenced by Util::glVertex().
template<unsigned D, typename N >
template<unsigned D, typename N >
template<typename T >
Convert the Vector into an array of arbitrary objects.
Array of floats is needed by glLightfv(). Any other type can be a target type as long as a conversion exists from N
to T
.
- Template Parameters:
-
T | The type of objects the vector elements are converted to. A cast operator to T objects must exist for type N . |
template<unsigned D, typename N>
- Parameters:
-
- Returns:
- *this*s
template<unsigned D, typename N>
template<unsigned D, typename N>
template<unsigned D, typename N >
Returns component i by value.
- Parameters:
-
- Returns:
- non-const reference to the accessed element
template<unsigned D, typename N >
Returns a reference to component i.
- Parameters:
-
- Returns:
- non-const reference to the accessed element
The documentation for this class was generated from the following files: