|
| template<typename T , typename Tfloat = typename DefaultFPType<T>::fptype> |
| TGX_INLINE Vec3< T > | tgx::normalize (Vec3< T > V) |
| | Return the vector normalized to have unit norm (do nothing if the vector is 0). More...
|
| |
| template<typename T , typename Tfloat = typename DefaultFPType<T>::fptype> |
| TGX_INLINE Vec3< T > | tgx::normalize_fast (Vec3< T > V) |
| | Return the vector normalized to have unit norm (do nothing if the vector is 0). More...
|
| |
|
template<typename T > |
| TGX_INLINE T | tgx::dist2 (const Vec3< T > &V1, const Vec3< T > &V2) |
| | Compute the squared euclidian distance between two vectors.
|
| |
| template<typename T , typename Tfloat = typename DefaultFPType<T>::fptype> |
| TGX_INLINE Tfloat | tgx::dist (const Vec3< T > &V1, const Vec3< T > &V2) |
| | Compute the euclidian distance between two vectors. More...
|
| |
| template<typename T , typename Tfloat = typename DefaultFPType<T>::fptype> |
| TGX_INLINE Tfloat | tgx::dist_fast (const Vec3< T > &V1, const Vec3< T > &V2) |
| | Compute the euclidian distance between two vectors. More...
|
| |
| template<typename T > |
| TGX_INLINE Vec3< T > | tgx::operator+ (Vec3< T > V1, const Vec3< T > &V2) |
| | Addition operator. More...
|
| |
| template<typename T > |
| TGX_INLINE Vec3< T > | tgx::operator- (Vec3< T > V1, const Vec3< T > &V2) |
| | Substraction operator. More...
|
| |
| template<typename T > |
| TGX_INLINE Vec3< T > | tgx::operator* (Vec3< T > V1, const Vec3< T > &V2) |
| | Multiplication operator. More...
|
| |
| template<typename T > |
| TGX_INLINE Vec3< T > | tgx::operator/ (Vec3< T > V1, const Vec3< T > &V2) |
| | Division operator. More...
|
| |
|
template<typename T > |
| TGX_INLINE Vec3< T > | tgx::operator+ (const T a, Vec3< T > V) |
| | Scalar addition operator.
|
| |
|
template<typename T > |
| TGX_INLINE Vec3< T > | tgx::operator+ (Vec3< T > V, const T a) |
| | Scalar addition operator.
|
| |
|
template<typename T > |
| TGX_INLINE Vec3< T > | tgx::operator- (Vec3< T > V, const T a) |
| | Scalar substraction operator.
|
| |
|
template<typename T > |
| TGX_INLINE Vec3< T > | tgx::operator* (const T a, Vec3< T > V) |
| | Scalar multiplication operator.
|
| |
|
template<typename T > |
| TGX_INLINE Vec3< T > | tgx::operator* (Vec3< T > V, const T a) |
| | Scalar multiplication operator.
|
| |
|
template<typename T > |
| TGX_INLINE Vec3< T > | tgx::operator/ (Vec3< T > V, const T a) |
| | Scalar division operator.
|
| |
|
template<typename T > |
| TGX_INLINE T | tgx::dotProduct (const Vec3< T > &U, const Vec3< T > &V) |
| | Return the dot product U.V between two vectors.
|
| |
|
TGX_INLINE float | tgx::dotProduct (const Vec3< float > &U, const Vec3< float > &V) |
| | Return the dot product U.V between two float vectors using fused multiply-add operations when enabled for the target architecture.
|
| |
|
template<typename T > |
| TGX_INLINE Vec3< T > | tgx::crossProduct (const Vec3< T > &U, const Vec3< T > &V) |
| | Return the cross product of U x V.
|
| |
|
template<typename T , typename Tfloat = typename DefaultFPType<T>::fptype> |
| TGX_INLINE Vec3< T > | tgx::lerp (const Tfloat alpha, const Vec3< T > &V1, const Vec3< T > &V2) |
| | Linear interpolation: V1 + alpha(V2 - V1).
|
| |