HDK
|
#include <Types.h>
Classes | |
class | Hash |
Function object for hashing vectors. More... | |
Public Types | |
using | Iterator = typename std::array< S, N >::iterator |
using | ConstIterator = typename std::array< S, N >::const_iterator |
Public Member Functions | |
VectorN () | |
VectorN (Uninit) | |
VectorN (S s) | |
VectorN (const std::array< S, N > &arr) | |
VectorN (const vector< S > &vec) | |
VectorN (const S *begin, const S *end) | |
Comparison Operators | |
bool | operator== (const V &rhs) const |
Return true if the given vector is identical to this one. More... | |
bool | operator!= (const V &rhs) const |
Return true if the given vector differs from this one. More... | |
bool | operator< (const V &rhs) const |
Compare two vectors lexicographically. More... | |
Indexing Operators | |
S & | operator[] (size_t i) |
Return the scalar value at the given index. More... | |
const S & | operator[] (size_t i) const |
Return the const scalar value at the given index. More... | |
Component-wise Operators | |
V | operator+ (const V &rhs) const |
Component-wise addition of two vectors. More... | |
VectorN & | operator+= (const V &rhs) |
Component-wise addition of two vectors. More... | |
V | operator- (const V &rhs) const |
Component-wise subtraction of two vectors. More... | |
VectorN & | operator-= (const V &rhs) |
Component-wise subtraction of two vectors. More... | |
V | operator* (const V &rhs) const |
Component-wise multiplication of two vectors. More... | |
VectorN & | operator*= (const V &rhs) |
Component-wise multiplication of two vectors. More... | |
V | operator/ (const V &rhs) const |
Component-wise division of two vectors. More... | |
VectorN & | operator/= (const V &rhs) |
Component-wise division of two vectors. More... | |
V | operator* (S s) const |
Component-wise multiplication of a vector by a scalar. More... | |
VectorN & | operator*= (S s) |
Component-wise multiplication of a vector by a scalar. More... | |
V | operator/ (S s) const |
Component-wise division of a vector by a scalar. More... | |
VectorN & | operator/= (S s) |
Component-wise division of a vector by a scalar. More... | |
V | operator- () const |
Unary negation of a vector. More... | |
Geometric Methods | |
S | getMagnitude () const |
Return the magnitude of the vector. More... | |
V | getNormalized () const |
Return a normalized vector. More... | |
S | dot (const V &rhs) const |
Return the dot product of two vectors. More... | |
Iterators | |
Iterator | begin () |
ConstIterator | begin () const |
Iterator | end () |
ConstIterator | end () const |
Utility | |
S * | data () |
Return a pointer to the underlying data array. More... | |
const S * | data () const |
Return a const pointer to the underlying data array. More... | |
Static Public Member Functions | |
Static Methods | |
static constexpr size_t | numElements () |
Return the number of scalar elements for the vector. More... | |
Protected Attributes | |
std::array< S, N > | _arr |
The class template for vectors of scalar values. Inherited by Vector2, Vector3, Vector4, Color3, and Color4.
Template parameter V is the vector subclass, S is the scalar element type, and N is the number of scalar elements in the vector.
using VectorN< V, S, N >::ConstIterator = typename std::array<S, N>::const_iterator |
|
inline |
|
inline |