|
template<typename T , Size DIM> |
T * | mi::math::vector_base_ptr (Vector_struct<T, DIM> &vec) |
| Returns the base pointer to the vector data. More...
|
|
template<typename T , Size DIM> |
const T * | mi::math::vector_base_ptr (const Vector_struct<T, DIM> &vec) |
| Returns the base pointer to the vector data. More...
|
|
template<typename T> |
T * | mi::math::vector_base_ptr (Vector_struct<T, 1> &vec) |
| Returns the base pointer to the vector data, specialization for DIM==1 . More...
|
|
template<typename T> |
const T * | mi::math::vector_base_ptr (const Vector_struct<T, 1> &vec) |
| Returns the base pointer to the vector data, specialization for DIM==1 . More...
|
|
template<typename T> |
T * | mi::math::vector_base_ptr (Vector_struct<T, 2> &vec) |
| Returns the base pointer to the vector data, specialization for DIM==2 . More...
|
|
template<typename T> |
const T * | mi::math::vector_base_ptr (const Vector_struct<T, 2> &vec) |
| Returns the base pointer to the vector data, specialization for DIM==2 . More...
|
|
template<typename T> |
T * | mi::math::vector_base_ptr (Vector_struct<T, 3> &vec) |
| Returns the base pointer to the vector data, specialization for DIM==3 . More...
|
|
template<typename T> |
const T * | mi::math::vector_base_ptr (const Vector_struct<T, 3> &vec) |
| Returns the base pointer to the vector data, specialization for DIM==3 . More...
|
|
template<typename T> |
T * | mi::math::vector_base_ptr (Vector_struct<T, 4> &vec) |
| Returns the base pointer to the vector data, specialization for DIM==4 . More...
|
|
template<typename T> |
const T * | mi::math::vector_base_ptr (const Vector_struct<T, 4> &vec) |
| Returns the base pointer to the vector data, specialization for DIM==4 . More...
|
|
static Size | mi::math::Vector<T, DIM>::size () |
| Constant size of the vector. More...
|
|
static Size | mi::math::Vector<T, DIM>::max_size () |
| Constant maximum size of the vector. More...
|
|
T * | mi::math::Vector<T, DIM>::begin () |
| Returns the pointer to the first vector element. More...
|
|
const T * | mi::math::Vector<T, DIM>::begin () const |
| Returns the pointer to the first vector element. More...
|
|
T * | mi::math::Vector<T, DIM>::end () |
| Returns the past-the-end pointer. More...
|
|
const T * | mi::math::Vector<T, DIM>::end () const |
| Returns the past-the-end pointer. More...
|
|
| mi::math::Vector<T, DIM>::Vector () |
| The default constructor leaves the vector elements uninitialized. More...
|
|
| mi::math::Vector<T, DIM>::Vector (const Vector<T, DIM> &vec)=default |
| Default copy constructor. More...
|
|
| mi::math::Vector<T, DIM>::Vector (const Vector_struct<T, DIM> &vec) |
| Constructor from underlying storage type. More...
|
|
| mi::math::Vector<T, DIM>::Vector (T v) |
| Constructor initializes all vector elements to the value v . More...
|
|
template<typename Iterator> |
| mi::math::Vector<T, DIM>::Vector (From_iterator_tag, Iterator p) |
| Constructor requires the mi::math::FROM_ITERATOR tag as first argument and initializes the vector elements with the first DIM elements from the sequence starting at the iterator p . More...
|
|
template<typename T2> |
| mi::math::Vector<T, DIM>::Vector (T2 const (&array)[DIM]) |
| Constructor initializes the vector elements from an array of dimension DIM . More...
|
|
template<typename T2> |
| mi::math::Vector<T, DIM>::Vector (const Vector<T2, DIM> &other) |
| Template constructor that allows explicit conversions from other vectors with assignment compatible element value type. More...
|
|
template<typename T2> |
| mi::math::Vector<T, DIM>::Vector (const Vector_struct<T2, DIM> &other) |
| Template constructor that allows explicit conversions from underlying storage type with assignment compatible element value type. More...
|
|
| mi::math::Vector<T, DIM>::Vector (T v1, T v2) |
| Dedicated constructor, for dimension 2 only, that initializes the vector elements from the two elements (v1,v2). More...
|
|
| mi::math::Vector<T, DIM>::Vector (T v1, T v2, T v3) |
| Dedicated constructor, for dimension 3 only, that initializes the vector elements from the three elements (v1,v2,v3). More...
|
|
| mi::math::Vector<T, DIM>::Vector (T v1, const Vector<T, 2> &v2) |
| Dedicated constructor, for dimension 3 only, that initializes the vector elements from the three elements (v1,v2.x,v2.y). More...
|
|
| mi::math::Vector<T, DIM>::Vector (const Vector<T, 2> &v1, T v2) |
| Dedicated constructor, for dimension 3 only, that initializes the vector elements from the three elements (v1.x,v1.y,v2). More...
|
|
| mi::math::Vector<T, DIM>::Vector (T v1, T v2, T v3, T v4) |
| Dedicated constructor, for dimension 4 only, that initializes the vector elements from the four elements (v1,v2,v3,v4). More...
|
|
| mi::math::Vector<T, DIM>::Vector (T v1, T v2, const Vector<T, 2> &v3) |
| Dedicated constructor, for dimension 4 only, that initializes the vector elements from the four elements (v1,v2,v3.x,v3.y). More...
|
|
| mi::math::Vector<T, DIM>::Vector (T v1, const Vector<T, 2> &v2, T v3) |
| Dedicated constructor, for dimension 4 only, that initializes the vector elements from the four elements (v1,v2.x,v2.y,v3). More...
|
|
| mi::math::Vector<T, DIM>::Vector (const Vector<T, 2> &v1, T v2, T v3) |
| Dedicated constructor, for dimension 4 only, that initializes the vector elements from the four elements (v1.x,v1.y,v2,v3). More...
|
|
| mi::math::Vector<T, DIM>::Vector (const Vector<T, 2> &v1, const Vector<T, 2> &v2) |
| Dedicated constructor, for dimension 4 only, that initializes the vector elements from the four elements (v1.x,v1.y,v2.x,v2.y). More...
|
|
| mi::math::Vector<T, DIM>::Vector (T v1, const Vector<T, 3> &v2) |
| Dedicated constructor, for dimension 4 only, that initializes the vector elements from the four elements (v1,v2.x,v2.y,v2.z). More...
|
|
| mi::math::Vector<T, DIM>::Vector (const Vector<T, 3> &v1, T v2) |
| Dedicated constructor, for dimension 4 only, that initializes the vector elements from the four elements (v1.x,v1.y,v1.z,v2). More...
|
|
| mi::math::Vector<T, DIM>::Vector (const Color_struct &color) |
| Dedicated constructor, for dimension 4 only, that initializes the vector elements from a color interpreted as a vector (r,g,b,a). More...
|
|
Vector & | mi::math::Vector<T, DIM>::operator= (const Vector &other)=default |
| Assignment. More...
|
|
Vector & | mi::math::Vector<T, DIM>::operator= (T s) |
| Assignment from a scalar, setting all elements to s . More...
|
|
Vector & | mi::math::Vector<T, DIM>::operator= (const Color_struct &color) |
| Assignment, for dimension 4 only, that assigns color interpreted as a vector (r,g,b,a) to this vector. More...
|
|
T & | mi::math::Vector<T, DIM>::operator[] (Size i) |
| Accesses the i-th vector element. More...
|
|
const T & | mi::math::Vector<T, DIM>::operator[] (Size i) const |
| Accesses the i-th vector element. More...
|
|
const T & | mi::math::Vector<T, DIM>::get (Size i) const |
| Returns the i-th vector element. More...
|
|
void | mi::math::Vector<T, DIM>::set (Size i, T value) |
| Sets the i-th vector element to value . More...
|
|
bool | mi::math::Vector<T, DIM>::normalize () |
| Normalizes this vector to unit length. More...
|
|
bool | mi::math::Vector<T, DIM>::operator== (Vector<T, DIM> rhs) const |
| Returns true if lhs is elementwise equal to rhs . More...
|
|
bool | mi::math::Vector<T, DIM>::operator!= (Vector<T, DIM> rhs) const |
| Returns true if lhs is elementwise not equal to rhs . More...
|
|
bool | mi::math::Vector<T, DIM>::operator< (Vector<T, DIM> rhs) const |
| Returns true if lhs is lexicographically less than rhs . More...
|
|
bool | mi::math::Vector<T, DIM>::operator<= (Vector<T, DIM> rhs) const |
| Returns true if lhs is lexicographically less than or equal to rhs . More...
|
|
bool | mi::math::Vector<T, DIM>::operator> (Vector<T, DIM> rhs) const |
| Returns true if lhs is lexicographically greater than rhs . More...
|
|
bool | mi::math::Vector<T, DIM>::operator>= (Vector<T, DIM> rhs) const |
| Returns true if lhs is lexicographically greater than or equal to rhs . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> & | mi::math::operator+= (Vector<T, DIM> &lhs, const Vector_struct<T, DIM> &rhs) |
| Adds rhs elementwise to lhs and returns the modified lhs . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> & | mi::math::operator-= (Vector<T, DIM> &lhs, const Vector_struct<T, DIM> &rhs) |
| Subtracts rhs elementwise from lhs and returns the modified lhs . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> & | mi::math::operator*= (Vector<T, DIM> &lhs, const Vector_struct<T, DIM> &rhs) |
| Multiplies rhs elementwise with lhs and returns the modified lhs . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> & | mi::math::operator%= (Vector<T, DIM> &lhs, const Vector_struct<T, DIM> &rhs) |
| Computes lhs modulo rhs elementwise and returns the modified lhs . More...
|
|
template<typename T , typename U , Size DIM> |
Vector<T, DIM> & | mi::math::operator/= (Vector<T, DIM> &lhs, const Vector_struct<U, DIM> &rhs) |
| Divides lhs elementwise by rhs and returns the modified lhs . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::operator+ (const Vector_struct<T, DIM> &lhs, const Vector_struct<T, DIM> &rhs) |
| Adds lhs and rhs elementwise and returns the new result. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::operator- (const Vector_struct<T, DIM> &lhs, const Vector_struct<T, DIM> &rhs) |
| Subtracts rhs elementwise from lhs and returns the new result. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::operator* (const Vector_struct<T, DIM> &lhs, const Vector_struct<T, DIM> &rhs) |
| Multiplies rhs elementwise with lhs and returns the new result. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::operator% (const Vector_struct<T, DIM> &lhs, const Vector_struct<T, DIM> &rhs) |
| Computes lhs modulo rhs elementwise and returns the new result. More...
|
|
template<typename T , typename U , Size DIM> |
Vector<T, DIM> | mi::math::operator/ (const Vector_struct<T, DIM> &lhs, const Vector_struct<U, DIM> &rhs) |
| Divides rhs elementwise by lhs and returns the new result. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::operator- (const Vector_struct<T, DIM> &v) |
| Negates the vector v elementwise and returns the new result. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> & | mi::math::operator+= (Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Adds rhs elementwise to lhs and returns the modified lhs . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> & | mi::math::operator-= (Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Subtracts rhs elementwise from lhs and returns the modified lhs . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> & | mi::math::operator*= (Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Multiplies rhs elementwise with lhs and returns the modified lhs . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> & | mi::math::operator%= (Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Computes lhs modulo rhs elementwise and returns the modified lhs . More...
|
|
template<typename T , typename U , Size DIM> |
Vector<T, DIM> & | mi::math::operator/= (Vector<T, DIM> &lhs, const Vector<U, DIM> &rhs) |
| Divides lhs elementwise by rhs and returns the modified lhs . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::operator+ (const Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Adds lhs and rhs elementwise and returns the new result. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::operator- (const Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Subtracts rhs elementwise from lhs and returns the new result. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::operator* (const Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Multiplies rhs elementwise with lhs and returns the new result. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::operator% (const Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Computes lhs modulo rhs elementwise and returns the new result. More...
|
|
template<typename T , typename U , Size DIM> |
Vector<T, DIM> | mi::math::operator/ (const Vector<T, DIM> &lhs, const Vector<U, DIM> &rhs) |
| Divides rhs elementwise by lhs and returns the new result. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::operator- (const Vector<T, DIM> &v) |
| Negates the vector v elementwise and returns the new result. More...
|
|
template<typename T , typename TT , Size DIM> |
Vector<T, DIM> & | mi::math::operator*= (Vector<T, DIM> &v, TT s) |
| Multiplies the vector v elementwise with the scalar s and returns the modified vector v . More...
|
|
template<typename T , typename TT , Size DIM> |
Vector<T, DIM> & | mi::math::operator%= (Vector<T, DIM> &v, TT s) |
| Computes v modulo s elementwise and returns the modified vector v . More...
|
|
template<typename T , typename TT , Size DIM> |
Vector<T, DIM> & | mi::math::operator/= (Vector<T, DIM> &v, TT s) |
| Divides the vector v elementwise by the scalar s and returns the modified vector v . More...
|
|
template<typename T , typename TT , Size DIM> |
Vector<T, DIM> | mi::math::operator* (const Vector_struct<T, DIM> &v, TT s) |
| Multiplies the vector v elementwise with the scalar s and returns the new result. More...
|
|
template<typename T , typename TT , Size DIM> |
Vector<T, DIM> | mi::math::operator* (TT s, const Vector_struct<T, DIM> &v) |
| Multiplies the vector v elementwise with the scalar s and returns the new result. More...
|
|
template<typename T , typename TT , Size DIM> |
Vector<T, DIM> | mi::math::operator% (const Vector_struct<T, DIM> &v, TT s) |
| Computes v modulo s elementwise and returns the new result. More...
|
|
template<typename T , typename TT , Size DIM> |
Vector<T, DIM> | mi::math::operator/ (const Vector_struct<T, DIM> &v, TT s) |
| Divides the vector v elementwise by the scalar s and returns the new result. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> & | mi::math::operator++ (Vector<T, DIM> &vec) |
| Pre-increments all elements of vec and returns the result. Modifies vec . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> & | mi::math::operator-- (Vector<T, DIM> &vec) |
| Pre-decrements all elements of vec and returns the result. Modifies vec . More...
|
|
template<Size DIM> |
Vector<bool, DIM> | mi::math::operator&& (const Vector<bool, DIM> &lhs, const Vector<bool, DIM> &rhs) |
| Returns the elementwise logical and of two boolean vectors. More...
|
|
template<Size DIM> |
Vector<bool, DIM> | mi::math::operator&& (bool lhs, const Vector<bool, DIM> &rhs) |
| Returns the elementwise logical and of a bool and a boolean vector. More...
|
|
template<Size DIM> |
Vector<bool, DIM> | mi::math::operator&& (const Vector<bool, DIM> &lhs, bool rhs) |
| Returns the elementwise logical and of a boolean vector and a bool. More...
|
|
template<Size DIM> |
Vector<bool, DIM> | mi::math::operator|| (const Vector<bool, DIM> &lhs, const Vector<bool, DIM> &rhs) |
| Returns the elementwise logical or of two boolean vectors. More...
|
|
template<Size DIM> |
Vector<bool, DIM> | mi::math::operator|| (bool lhs, const Vector<bool, DIM> &rhs) |
| Returns the elementwise logical or of a bool and a boolean vector. More...
|
|
template<Size DIM> |
Vector<bool, DIM> | mi::math::operator|| (const Vector<bool, DIM> &lhs, bool rhs) |
| Returns the elementwise logical or of a boolean vector and a bool. More...
|
|
template<Size DIM> |
Vector<bool, DIM> | mi::math::operator^ (const Vector<bool, DIM> &lhs, const Vector<bool, DIM> &rhs) |
| Returns the elementwise logical xor of two boolean vectors. More...
|
|
template<Size DIM> |
Vector<bool, DIM> | mi::math::operator^ (bool lhs, const Vector<bool, DIM> &rhs) |
| Returns the elementwise logical xor of a bool and a boolean vector. More...
|
|
template<Size DIM> |
Vector<bool, DIM> | mi::math::operator^ (const Vector<bool, DIM> &lhs, bool rhs) |
| Returns the elementwise logical xor of a boolean vector and a bool. More...
|
|
template<Size DIM> |
Vector<bool, DIM> | mi::math::operator! (const Vector<bool, DIM> &vec) |
| Returns the elementwise logical not of a boolean vector. More...
|
|
template<typename T , Size DIM> |
Vector<bool, DIM> | mi::math::elementwise_is_equal (const Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Returns the boolean vector result of an elementwise equality comparison. More...
|
|
template<typename T , Size DIM> |
Vector<bool, DIM> | mi::math::elementwise_is_not_equal (const Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Returns the boolean vector result of an elementwise inequality comparison. More...
|
|
template<typename T , Size DIM> |
Vector<bool, DIM> | mi::math::elementwise_is_less_than (const Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Returns the boolean vector result of an elementwise less-than comparison. More...
|
|
template<typename T , Size DIM> |
Vector<bool, DIM> | mi::math::elementwise_is_less_than_or_equal (const Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Returns the boolean vector result of an elementwise less-than-or-equal comparison. More...
|
|
template<typename T , Size DIM> |
Vector<bool, DIM> | mi::math::elementwise_is_greater_than (const Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Returns the boolean vector result of an elementwise greater-than comparison. More...
|
|
template<typename T , Size DIM> |
Vector<bool, DIM> | mi::math::elementwise_is_greater_than_or_equal (const Vector<T, DIM> &lhs, const Vector<T, DIM> &rhs) |
| Returns the boolean vector result of an elementwise greater-than-or-equal comparison. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::abs (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise absolute values of the vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::acos (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise arc cosine of the vector v . More...
|
|
template<typename T , Size DIM> |
bool | mi::math::all (const Vector_struct<T, DIM> &v) |
| Returns true if all of all elements of v returns true . More...
|
|
template<typename T , Size DIM> |
bool | mi::math::any (const Vector_struct<T, DIM> &v) |
| Returns true if any of any element of v returns true . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::asin (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise arc sine of the vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::atan (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise arc tangent of the vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::atan2 (const Vector_struct<T, DIM> &v, const Vector_struct<T, DIM> &w) |
| Returns a vector with the elementwise arc tangent of the vector v / w . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::ceil (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise smallest integral value that is not less than the element in vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::clamp (const Vector_struct<T, DIM> &v, const Vector_struct<T, DIM> &low, const Vector_struct<T, DIM> &high) |
| Returns the vector v elementwise clamped to the range [low , high ]. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::clamp (const Vector_struct<T, DIM> &v, const Vector_struct<T, DIM> &low, T high) |
| Returns the vector v elementwise clamped to the range [low , high ]. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::clamp (const Vector_struct<T, DIM> &v, T low, const Vector_struct<T, DIM> &high) |
| Returns the vector v elementwise clamped to the range [low , high ]. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::clamp (const Vector_struct<T, DIM> &v, T low, T high) |
| Returns the vector v elementwise clamped to the range [low , high ]. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::cos (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise cosine of the vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::degrees (const Vector_struct<T, DIM> &v) |
| Converts elementwise radians in v to degrees. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::elementwise_max (const Vector_struct<T, DIM> &lhs, const Vector_struct<T, DIM> &rhs) |
| Returns elementwise maximum of two vectors. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::elementwise_min (const Vector_struct<T, DIM> &lhs, const Vector_struct<T, DIM> &rhs) |
| Returns elementwise minimum of two vectors. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::exp (const Vector_struct<T, DIM> &v) |
| Returns a vector with elementwise e to the power of the element in the vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::exp2 (const Vector_struct<T, DIM> &v) |
| Returns a vector with elementwise 2 to the power of the element in the vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::floor (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise largest integral value that is not greater than the element in vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::fmod (const Vector_struct<T, DIM> &a, const Vector_struct<T, DIM> &b) |
| Returns elementwise a modulo b , in other words, the remainder of a/b. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::fmod (const Vector_struct<T, DIM> &a, T b) |
| Returns elementwise a modulo b , in other words, the remainder of a/b. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::frac (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise positive fractional part of the vector v . More...
|
|
template<typename T , Size DIM> |
bool | mi::math::is_approx_equal (const Vector_struct<T, DIM> &left, const Vector_struct<T, DIM> &right, T e) |
| Compares the two given values elementwise for equality within the given epsilon. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::lerp (const Vector_struct<T, DIM> &v1, const Vector_struct<T, DIM> &v2, const Vector_struct<T, DIM> &t) |
| Returns the elementwise linear interpolation between v1 and v2 , i.e., it returns (1-t) * v1 + t * v2 . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::lerp (const Vector_struct<T, DIM> &v1, const Vector_struct<T, DIM> &v2, T t) |
| Returns the linear interpolation between v1 and v2 , i.e., it returns (1-t) * v1 + t * v2 . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::log (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise natural logarithm of the vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::log2 (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise base 2 logarithm of the vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::log10 (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise base 10 logarithm of the vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::modf (const Vector_struct<T, DIM> &v, Vector<T, DIM> &i) |
| Returns the elementwise fractional part of v and stores the elementwise integral part of v in i . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::pow (const Vector_struct<T, DIM> &a, const Vector_struct<T, DIM> &b) |
| Returns the vector a elementwise to the power of b . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::pow (const Vector_struct<T, DIM> &a, T b) |
| Returns the vector a elementwise to the power of b . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::radians (const Vector_struct<T, DIM> &v) |
| Converts elementwise degrees in v to radians. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::round (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elements of vector v rounded to nearest integers. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::rsqrt (const Vector_struct<T, DIM> &v) |
| Returns the reciprocal of the square root of each element of v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::saturate (const Vector_struct<T, DIM> &v) |
| Returns the vector v clamped elementwise to the range [0,1]. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::sign (const Vector_struct<T, DIM> &v) |
| Returns the elementwise sign of vector v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::sin (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise sine of the vector v . More...
|
|
template<typename T , Size DIM> |
void | mi::math::sincos (const Vector_struct<T, DIM> &a, Vector<T, DIM> &s, Vector<T, DIM> &c) |
| Computes elementwise the sine s and cosine c of angles a simultaneously. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::smoothstep (const Vector_struct<T, DIM> &a, const Vector_struct<T, DIM> &b, const Vector_struct<T, DIM> &v) |
| Returns 0 if v is less than a and 1 if v is greater than b in an elementwise fashion. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::smoothstep (const Vector_struct<T, DIM> &a, const Vector_struct<T, DIM> &b, T x) |
| Returns 0 if x is less than a and 1 if x is greater than b in an elementwise fashion. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::sqrt (const Vector_struct<T, DIM> &v) |
| Returns the square root of each element of v . More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::step (const Vector_struct<T, DIM> &a, const Vector_struct<T, DIM> &v) |
| Returns elementwise 0 if v is less than a and 1 otherwise. More...
|
|
template<typename T , Size DIM> |
Vector<T, DIM> | mi::math::tan (const Vector_struct<T, DIM> &v) |
| Returns a vector with the elementwise tangent of the vector v . More...
|
|
template<typename T> |
T | mi::math::cross (const Vector_struct<T, 2> &lhs, const Vector_struct<T, 2> &rhs) |
| Returns the two-times-two determinant result for the two vectors lhs and rhs . More...
|
|
template<typename T> |
Vector<T, 3> | mi::math::cross (const Vector_struct<T, 3> &lhs, const Vector_struct<T, 3> &rhs) |
| Returns the three-dimensional cross product result for the two vectors lhs and rhs . More...
|
|
template<typename T> |
void | mi::math::make_basis (const Vector<T, 3> &n, Vector<T, 3> *u, Vector<T, 3> *v) |
| Computes a basis of 3D space with one given vector. More...
|
|
template<typename T> |
void | mi::math::make_basis (const Vector<T, 3> &n, const Vector<T, 3> &u, const Vector<T, 3> &v, Vector<T, 3> *t, Vector<T, 3> *b) |
| Computes a basis of 3D space with one given vector, plane, and direction. More...
|
|
template<typename T2 , Size DIM2, typename T1 , Size DIM1> |
Vector<T2, DIM2> | mi::math::convert_vector (const Vector<T1, DIM1> &v, const T2 &fill=T2(0)) |
| Converts the vector v of type Vector<T1, DIM1> to a vector of type Vector<T2, DIM2> . More...
|
|