|
HERMES_DEVICE_CALLABLE | Vector3 () |
| Default constructor.
|
|
HERMES_DEVICE_CALLABLE | Vector3 (T _f) |
| Constructs from single component value.
|
|
HERMES_DEVICE_CALLABLE | Vector3 (T _x, T _y, T _z) |
| Constructs from component values.
|
|
HERMES_DEVICE_CALLABLE | Vector3 (const T *v) |
| Constructs from component array.
|
|
HERMES_DEVICE_CALLABLE | Vector3 (const Point3< T > &p) |
| Casts from geometric point.
|
|
template<typename S , typename C = T> |
HERMES_DEVICE_CALLABLE | Vector3 (const Vector3< Interval< S > > &vi, typename std::enable_if_t< !std::is_same_v< C, Interval< f32 > > &&!std::is_same_v< C, Interval< f64 > > > *=nullptr) |
| Constructs from interval.
|
|
HERMES_DEVICE_CALLABLE Vector3 & | operator= (const T &v) |
| Copy assign.
|
|
HERMES_DEVICE_CALLABLE Vector3< T > & | operator/= (T f) |
|
HERMES_DEVICE_CALLABLE Vector3< T > & | operator/= (const Vector3< T > &v) |
|
HERMES_DEVICE_CALLABLE Vector3< T > | operator/ (const T &f) const |
|
HERMES_DEVICE_CALLABLE Vector3< T > | operator- () const |
|
HERMES_DEVICE_CALLABLE bool | operator== (const Vector3< T > &b) const |
|
HERMES_DEVICE_CALLABLE bool | operator< (const Vector3< T > &b) const |
|
HERMES_DEVICE_CALLABLE bool | operator> (const Vector3< T > &b) const |
|
HERMES_DEVICE_CALLABLE bool | operator>= (const Vector3< T > &b) const |
|
HERMES_DEVICE_CALLABLE bool | operator<= (const Vector3< T > &b) const |
|
HERMES_DEVICE_CALLABLE T | operator[] (int i) const |
| Get i-th component.
|
|
HERMES_DEVICE_CALLABLE T & | operator[] (int i) |
| Get i-th component reference.
|
|
HERMES_DEVICE_CALLABLE Vector2< T > | xy (int i=0, int j=1) const |
| Gets 2-dimensional swizzle form.
|
|
HERMES_DEVICE_CALLABLE T | mLength () const |
| Computes Manhattan distance.
|
|
template<typename C = T> |
HERMES_DEVICE_CALLABLE T | length (typename std::enable_if_t<!std::is_same_v< C, Interval< f32 > > &&!std::is_same_v< C, Interval< f64 > > > *=nullptr) const |
| Computes vector magnitude.
|
|
template<typename C = T> |
HERMES_DEVICE_CALLABLE T | length (typename std::enable_if_t< std::is_same_v< C, Interval< f32 > >||std::is_same_v< C, Interval< f64 > > > *=nullptr) const |
| Computes vector magnitude.
|
|
HERMES_DEVICE_CALLABLE T | length2 () const |
| Computes vector squared magnitude.
|
|
HERMES_DEVICE_CALLABLE T | maxAbs () const |
| Gets maximum absolute component value.
|
|
HERMES_DEVICE_CALLABLE T | max () const |
| Gets maximum component value.
|
|
HERMES_DEVICE_CALLABLE int | maxDimension () const |
| Gets index of component with maximum value.
|
|
HERMES_DEVICE_CALLABLE int | maxAbsDimension () const |
| Gets index of component with maximum absolute value.
|
|
HERMES_DEVICE_CALLABLE void | normalize () |
| Normalizes this vector.
|
|
HERMES_DEVICE_CALLABLE Vector3 | normalized () const |
| Gets a normalized copy of this vector.
|
|
HERMES_DEVICE_CALLABLE Vector3 | projectOnto (const Vector3 &b) |
| Projects this vector onto b.
|
|
HERMES_DEVICE_CALLABLE Vector3 | rejectOn (const Vector3 b) |
| Rejects this vector on b.
|
|
HERMES_DEVICE_CALLABLE bool | hasNaNs () const |
| Check for nans.
|
|
template<
typename T>
class hermes::Vector3< T >
Geometric 3-dimensional vector (x, y, z)
- Template Parameters
-