![]() |
ULIS
dev4.0.7
Utility Library for Imaging Systems
|
The TVectorN class provides a simple ND vector class for vector geometry applications. More...
Public Types | |
typedef P | tComputation |
Public Member Functions | |
constexpr | TVectorN () |
template<typename U , typename Q , uint8 M> | |
constexpr | TVectorN (const TVectorN< U, Q, M > &iOther) |
constexpr | TVectorN (std::initializer_list< T > iValues) |
constexpr | TVectorN (T iValue) |
constexpr T * | Data () |
constexpr const T * | Data () const |
constexpr tComputation | Distance () const |
constexpr tComputation | DistanceSquared () const |
constexpr tComputation | DotProduct (const TVectorN< T, P, N > &iOther) const |
constexpr tComputation | ManhattanDistance () const |
constexpr TVectorN< T, P, N > & | Normalize () |
constexpr TVectorN< T, P, N > | Normalized () const |
constexpr bool | operator!= (const TVectorN< T, P, N > &iOther) const |
constexpr TVectorN< T, P, N > & | operator*= (const TVectorN< T, P, N > &iOther) |
constexpr TVectorN< T, P, N > & | operator*= (T iValue) |
constexpr TVectorN< T, P, N > & | operator+= (const TVectorN< T, P, N > &iOther) |
constexpr TVectorN< T, P, N > & | operator+= (T iValue) |
constexpr TVectorN< T, P, N > | operator- () const |
constexpr TVectorN< T, P, N > & | operator-= (const TVectorN< T, P, N > &iOther) |
constexpr TVectorN< T, P, N > & | operator-= (T iValue) |
constexpr TVectorN< T, P, N > & | operator/= (const TVectorN< T, P, N > &iOther) |
constexpr TVectorN< T, P, N > & | operator/= (T iValue) |
constexpr bool | operator== (const TVectorN< T, P, N > &iOther) const |
constexpr T & | operator[] (int iIndex) |
constexpr const T & | operator[] (int iIndex) const |
constexpr tComputation | Sum () const |
Public Attributes | |
T | m [N] |
The TVectorN class is a template class that provides basic ND vector functionnalities, it can be used with any numeric types, ranging from integer values to floating point values.
typedef P TVectorN< T, P, N >::tComputation |
Default constructor for the vector, with default zero values.
|
constexpr |
Construct the vector from input value all components will have said value
|
constexpr |
Construct the vector from input values.
|
constexpr |
Construct the vector from input vector of any convertible type.
|
constexpr |
Return a pointer to the base storage.
|
constexpr |
Return a pointer to the base storage.
|
constexpr |
Return the euclidean distance of the vector.
|
constexpr |
Return the squared euclidean distance of the vector. This can be useful for testing against another squared distance, thus saving a square root calculation.
|
constexpr |
Dot Product
|
constexpr |
Return the manhattan distance of the vector.
|
constexpr |
Normalize this vector.
|
constexpr |
Return the normalized version of this vector.
|
constexpr |
Compare this vector to the other vector for strict inequality.
|
constexpr |
Multiply this vector by the input vector and return a reference to this vector.
|
constexpr |
Multiply this vector by the input value and return a reference to this vector.
|
constexpr |
Add the input to this vector and return a reference to this vector.
|
constexpr |
Add the input value to this vector and return a reference to this vector.
|
constexpr |
Unary Negative Operator
|
constexpr |
Substract the input to this vector and return a reference to this vector.
|
constexpr |
Substract the input value to this vector and return a reference to this vector.
|
constexpr |
Divide this vector by the input vector and return a reference to this vector.
|
constexpr |
Divide this vector by the input value and return a reference to this vector.
|
constexpr |
Compare this vector to the other vector for strict equality.
|
constexpr |
Access component x or y by index, return a reference to the component.
|
constexpr |
Access component x or y by index, return a const reference to the component.
|
constexpr |
Return the horizontal sum of the vector.
T TVectorN< T, P, N >::m[N] |
The N elements of the N-Dimensional vector.