|
fennec
|
Math Vector Type. More...
#include <vector.h>
Inherits detail::vector_base_type< ScalarT, sizeof...(IndicesV)>.
| ScalarT | base scalar type of each Component |
| IndicesV | index of each Component |
Forward Definitions & Constants | |
| using | base_type = detail::vector_base_type< ScalarT, sizeof...(IndicesV)> |
| vector base type | |
| using | scalar_t = ScalarT |
| alias for ScalarT | |
| using | vector_t = vector |
| alias for this type | |
| using | decay_t = conditional_t< N==1, scalar_t, vector_t > |
| Type that the vector should Decay into. | |
| static constexpr size_t | dimension = sizeof...(IndicesV) |
| dimension of the swizzle | |
| static constexpr size_t | num_components = sizeof...(IndicesV) |
| number of components | |
| static constexpr size_t | size = sizeof...(IndicesV) |
| size of the swizzle | |
| static constexpr size_t | N = sizeof...(IndicesV) |
| size of the swizzle | |
Constructors | |
| constexpr | vector () |
| default constructor, initializes components with 0 | |
| constexpr | vector (const vector_t &x) |
| copy constructor | |
| constexpr | vector (vector_t &&x) noexcept |
| move constructor | |
| constexpr | vector (scalar_t s) |
| scalar constructor | |
| constexpr | vector (int_t s) |
| int conversion scalar | |
| constexpr | vector (double_t s) |
| double conversion scalar | |
| template<typename OScalarT , size_t MoreIndicesStartV, size_t... MoreIndicesV> | |
| constexpr | vector (const vector< OScalarT, IndicesV..., MoreIndicesStartV, MoreIndicesV... > &v) |
| vector conversion constructor | |
| template<typename SwizzleDataT , typename SwizzleScalarT , size_t... SwizzleIndicesV> | |
| constexpr | vector (const detail::swizzle_storage< SwizzleDataT, SwizzleScalarT, SwizzleIndicesV... > &swizzle) |
| swizzle conversion constructor | |
| template<typename... ArgsT> requires (total_component_count_v<ArgsT...> == N) | |
| constexpr | vector (ArgsT &&... args) |
| piecewise constructor | |
Public Member Functions | |
| decay_t | decay () |
| decay implementation | |
Access operators | |
| constexpr scalar_t & | operator[] (size_t i) |
| constexpr scalar_t | operator[] (size_t i) const |
| indexed access operator | |
Assignment operators | |
| constexpr vector_t & | operator= (const vector_t &rhs) |
| copy assignment | |
| constexpr vector_t & | operator= (vector_t &&rhs) noexcept |
| move assignment | |
Comparison Operators | |
| constexpr bool_t | operator== (const vector_t &rhs) const |
| vector equality operator | |
| constexpr bool_t | operator!= (const vector_t &rhs) const |
| vector inequality operator | |
\ref fennec_math_scalar "scalar" - \ref fennec_math_vector "vector" Arithmetic operators | |
| constexpr friend vector_t | operator+ (scalar_t lhs, const vector_t &rhs) |
| scalar - vector addition operator | |
| constexpr friend vector_t | operator- (scalar_t lhs, const vector_t &rhs) |
| scalar - vector subtraction operator | |
| constexpr friend vector_t | operator* (scalar_t lhs, const vector_t &rhs) |
| scalar - vector multiplication operator | |
| constexpr friend vector_t | operator/ (scalar_t lhs, const vector_t &rhs) |
| scalar - vector division operator | |
| constexpr friend vector_t | operator% (scalar_t lhs, const vector_t &rhs) |
| scalar - vector integer modulus operator | |
\ref fennec_math_vector "vector" - \ref fennec_math_scalar "scalar" Arithmetic operators | |
| constexpr friend vector_t | operator+ (const vector_t &lhs, scalar_t rhs) |
| vector - scalar addition operator | |
| constexpr friend vector_t | operator- (const vector_t &lhs, scalar_t rhs) |
| vector - scalar subtraction operator | |
| constexpr friend vector_t | operator* (const vector_t &lhs, scalar_t rhs) |
| vector - scalar multiplication operator | |
| constexpr friend vector_t | operator/ (const vector_t &lhs, scalar_t rhs) |
| vector - scalar division operator | |
| constexpr friend vector_t | operator% (const vector_t &lhs, scalar_t rhs) |
| vector - scalar integer modulus operator | |
\ref fennec_math_vector "vector" - \ref fennec_math_scalar "scalar" Arithmetic Assignment operators | |
| constexpr friend vector_t & | operator+= (vector_t &lhs, scalar_t rhs) |
| vector - scalar addition operator | |
| constexpr friend vector_t & | operator-= (vector_t &lhs, scalar_t rhs) |
| vector - scalar Subtraction operator | |
| constexpr friend vector_t & | operator*= (vector_t &lhs, scalar_t rhs) |
| vector - scalar multiplication operator | |
| constexpr friend vector_t & | operator/= (vector_t &lhs, scalar_t rhs) |
| vector - scalar division operator | |
| constexpr friend vector_t & | operator%= (vector_t &lhs, scalar_t rhs) |
| vector - scalar integer modulus operator | |
\ref fennec_math_vector "vector" - \ref fennec_math_vector "vector" Arithmetic operators | |
| constexpr friend vector_t | operator- (const vector_t &x) |
| negation operator | |
| constexpr friend vector_t | operator+ (const vector_t &lhs, const vector_t &rhs) |
| vector - vector addition operator | |
| constexpr friend vector_t | operator- (const vector_t &lhs, const vector_t &rhs) |
| vector - vector subtraction operator | |
| constexpr friend vector_t | operator* (const vector_t &lhs, const vector_t &rhs) |
| vector - vector multiplication operator | |
| constexpr friend vector_t | operator/ (const vector_t &lhs, const vector_t &rhs) |
| vector - vector division operator | |
| constexpr friend vector_t | operator% (const vector_t &lhs, const vector_t &rhs) |
| vector - vector integer modulus operator | |
\ref fennec_math_vector "vector" - \ref fennec_math_vector "vector" Arithmetic Assignment operators | |
| constexpr friend vector_t & | operator+= (vector_t &lhs, const vector_t &rhs) |
| vector - vector addition operator | |
| constexpr friend vector_t & | operator-= (vector_t &lhs, const vector_t &rhs) |
| vector - vector subtraction operator | |
| constexpr friend vector_t & | operator*= (vector_t &lhs, const vector_t &rhs) |
| vector - vector multiplication operator | |
| constexpr friend vector_t & | operator/= (vector_t &lhs, const vector_t &rhs) |
| vector - vector division operator | |
| constexpr friend vector_t & | operator%= (vector_t &lhs, const vector_t &rhs) |
| vector - vector integer modulus operator | |
Boolean Operators | |
| constexpr friend vector_t | operator! (const vector_t &x) |
| unary boolean not operator | |
| constexpr friend vector_t | operator&& (const vector_t &lhs, scalar_t rhs) |
| vector - scalar logical and operator | |
| constexpr friend vector_t | operator&& (const vector_t &lhs, const vector_t &rhs) |
| vector - vector logical and operator | |
| constexpr friend vector_t | operator|| (const vector_t &lhs, scalar_t rhs) |
| vector - scalar logical or operator | |
| constexpr friend vector_t | operator|| (const vector_t &lhs, const vector_t &rhs) |
| vector - vector logical or operator | |
Bitwise Operators | |
| constexpr friend vector_t | operator& (scalar_t rhs, const vector_t &lhs) |
| scalar - vector bitwise and operator | |
| constexpr friend vector_t | operator& (const vector_t &lhs, scalar_t rhs) |
| vector - scalar bitwise and operator | |
| constexpr friend vector_t | operator&= (vector_t &lhs, scalar_t rhs) |
| vector - scalar bitwise and assignment operator | |
| constexpr friend vector_t | operator& (const vector_t &lhs, const vector_t &rhs) |
| vector - vector bitwise and operator | |
| constexpr friend vector_t | operator&= (vector_t &lhs, const vector_t &rhs) |
| vector - vector bitwise and assignment operator | |
| constexpr friend vector_t | operator| (scalar_t rhs, const vector_t &lhs) |
| scalar - vector bitwise or operator | |
| constexpr friend vector_t | operator| (const vector_t &lhs, scalar_t rhs) |
| vector - scalar bitwise or operator | |
| constexpr friend vector_t | operator|= (vector_t &lhs, scalar_t rhs) |
| vector - scalar bitwise or assignment operator | |
| constexpr friend vector_t | operator| (const vector_t &lhs, const vector_t &rhs) |
| vector - vector bitwise or operator | |
| constexpr friend vector_t | operator|= (vector_t &lhs, const vector_t &rhs) |
| vector - vector bitwise or assignment operator | |
| constexpr friend vector_t | operator^ (scalar_t lhs, const vector_t &rhs) |
| constexpr friend vector_t | operator^ (const vector_t &lhs, scalar_t rhs) |
| constexpr friend vector_t | operator^= (vector_t &lhs, scalar_t rhs) |
| constexpr friend vector_t | operator^ (const vector_t &lhs, const vector_t &rhs) |
| constexpr friend vector_t | operator^= (vector_t &lhs, const vector_t &rhs) |
| constexpr friend vector_t | operator<< (scalar_t lhs, const vector_t &rhs) |
| constexpr friend vector_t | operator<< (const vector_t &lhs, scalar_t rhs) |
| constexpr friend vector_t | operator<<= (vector_t &lhs, scalar_t rhs) |
| constexpr friend vector_t | operator<< (const vector_t &lhs, const vector_t &rhs) |
| constexpr friend vector_t | operator<<= (vector_t &lhs, const vector_t &rhs) |
| constexpr friend vector_t | operator>> (scalar_t lhs, const vector_t &rhs) |
| constexpr friend vector_t | operator>> (const vector_t &lhs, scalar_t rhs) |
| constexpr friend vector_t | operator>>= (vector_t &lhs, scalar_t rhs) |
| constexpr friend vector_t | operator>> (const vector_t &lhs, const vector_t &rhs) |
| constexpr friend vector_t | operator>>= (vector_t &lhs, const vector_t &rhs) |
|
inlineconstexpr |
** **
|
inlineconstexpr |
| x | object to copy |
|
inlineconstexprnoexcept |
| x | object to move |
|
inlineexplicitconstexpr |
| s | scalar value to initialize with |
|
inlineexplicitconstexpr |
| s | scalar value to initialize with |
|
inlineexplicitconstexpr |
| s | scalar value to initialize with |
|
inlineexplicitconstexpr |
| OScalarT | scalar Type of the vector to Convert |
| MoreIndicesStartV | |
| MoreIndicesV |
| v |
|
inlineexplicitconstexpr |
| SwizzleDataT | swizzle Data Type |
| SwizzleScalarT | swizzle scalar Type |
| SwizzleIndicesV | swizzle Indices |
| swizzle | swizzle object |
|
inlineexplicitconstexpr |
constructs a vector from a series of scalars, swizzles, and vectors
| ArgsT | argument types |
| args | arguments |
|
inline |
|
inlineconstexpr |
| i | the index of the component |
|
inlineconstexpr |
| i | the index of the component |
|
inlineconstexpr |
this, after having set lhs, such that \(lhs_i=rhs_i\) | rhs | vector to copy |
|
inlineconstexprnoexcept |
this, after having set lhs, such that \(lhs_i=rhs_i\) | rhs | vector to move |
|
inlineconstexpr |
| rhs | vector to compare with |
|
inlineconstexpr |
| rhs | vector to compare with |
|
friend |
| lhs | left hand side |
| rhs | right hand side |
|
friend |
| lhs | left hand side |
| rhs | right hand side |
|
friend |
| lhs | left hand side |
| rhs | right hand side |
|
friend |
| lhs | left hand side |
| rhs | right hand side |
|
friend |
| lhs | left hand side |
| rhs | right hand side |
|
friend |
| lhs | left hand side |
| rhs | right hand side |
|
friend |
| lhs | left hand side |
| rhs | right hand side |
|
friend |
| lhs | left hand side |
| rhs | right hand side |
|
friend |
| lhs | left hand side |
| rhs | right hand side |
|
friend |
| lhs | left hand side |
| rhs | right hand side |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| x | the vector |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| x | the vector |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |
|
friend |
| lhs | Left Hand Side of the Expression |
| rhs | Right Hand Side of the Expression |