|
INLINE float | dot (const BasicVector< float > &v1, const BasicVector< float > &v2) |
| Make sure the vector is trivially constructible and destructible, needed for fast initialization of arrays. More...
|
|
INLINE double | dot (const BasicVector< double > &v1, const BasicVector< double > &v2) |
|
INLINE BasicVector< float > | cross (const BasicVector< float > &v1, const BasicVector< float > &v2) |
| Cross product between two vectors. More...
|
|
INLINE BasicVector< double > | cross (const BasicVector< double > &v1, const BasicVector< double > &v2) |
|
INLINE Float | getSqrLength (const Vector &v) |
|
INLINE Float | getLength (const Vector &v) |
| Returns the length of the vector. Enabled only for vectors of floating-point precision. More...
|
|
INLINE Float | getLengthApprox (const Vector &v) |
| Returns approximate value of the length. Enabled only for vectors of floating-point precision. More...
|
|
INLINE Vector | getNormalized (const Vector &v) |
|
INLINE Tuple< Vector, Float > | getNormalizedWithLength (const Vector &v) |
| Returns normalized vector and length of the input vector as tuple. More...
|
|
template<> |
INLINE BasicVector< float > | min (const BasicVector< float > &v1, const BasicVector< float > &v2) |
| Component-wise minimum. More...
|
|
template<> |
INLINE BasicVector< float > | max (const BasicVector< float > &v1, const BasicVector< float > &v2) |
| Component-wise maximum. More...
|
|
template<> |
INLINE BasicVector< double > | min (const BasicVector< double > &v1, const BasicVector< double > &v2) |
|
template<> |
INLINE BasicVector< double > | max (const BasicVector< double > &v1, const BasicVector< double > &v2) |
|
template<> |
INLINE Vector | clamp (const Vector &v, const Vector &v1, const Vector &v2) |
| Component-wise clamping. More...
|
|
template<> |
INLINE Vector | clamp (const Vector &v, const Interval &range) |
| Clamping all components by range. More...
|
|
INLINE bool | almostEqual (const Vector &v1, const Vector &v2, const Float eps=EPS) |
| Checks if two vectors are equal to some given accuracy. More...
|
|
template<> |
INLINE Float | norm (const Vector &v) |
| Returns norm of a vector, i.e. its (approximative) length. More...
|
|
template<> |
INLINE Float | normSqr (const Vector &v) |
| Returns squared length of a vector. More...
|
|
template<> |
INLINE Float | minElement (const Vector &v) |
| Returns minimum element of a vector. Considers only the first 3 component, 4th one is ignored. More...
|
|
template<> |
INLINE Float | maxElement (const Vector &v) |
| Returns maximum element of a vector. Considers only the first 3 component, 4th one is ignored. More...
|
|
INLINE Size | argMin (const Vector &v) |
| Returns the index of the minimum element. More...
|
|
INLINE Size | argMax (const Vector &v) |
| Returns the index of the maximum element. More...
|
|
template<> |
INLINE auto | abs (const BasicVector< float > &v) |
| Computes vector of absolute values. More...
|
|
template<> |
INLINE auto | abs (const BasicVector< double > &v) |
|
INLINE Float | l1Norm (const Vector &v) |
| Returns the L1 norm (sum of absolute values) of the vector. More...
|
|
template<> |
INLINE bool | isReal (const BasicVector< float > &v) |
| Computes vector of inverse squared roots. More...
|
|
template<> |
INLINE bool | isReal (const BasicVector< double > &v) |
|
template<> |
INLINE auto | less (const Vector &v1, const Vector &v2) |
|
template<> |
INLINE StaticArray< Float, 6 > | getComponents< Vector > (const Vector &v) |
|
template<typename T1 , typename T2 > |
INLINE BasicVector< T1 > | vectorCast (const BasicVector< T2 > &v) |
|
template<> |
INLINE BasicVector< Float > | vectorCast (const BasicVector< Float > &v) |
|
INLINE Vector | cos (const Vector &v) |
| Cosine applied to all components of the vector. More...
|
|
INLINE Vector | sphericalToCartesian (const Float r, const Float theta, const Float phi) |
| Constructs a vector from spherical coordinates. More...
|
|
INLINE Vector | cylindricalToCartesian (const Float r, const Float phi, const Float z) |
| Constructs a vector from cylindrical coordinates. More...
|
|
INLINE SphericalCoords | cartensianToSpherical (const Vector &v) |
| Converts vector in cartesian coordinates to spherical coordinates. More...
|
|
INLINE Vector | sphericalInversion (const Vector &v, const Vector ¢er, const Float radius) |
|
INLINE Float | distance (const Vector &r, const Vector &axis) |
| Returns the distance of vector from given axis. The axis is assumed to be normalized. More...
|
|
INLINE bool | lexicographicalLess (const Vector &v1, const Vector &v2) |
| Compares components of two vectors lexicographically, primary component is z. More...
|
|
Basic vector algebra. Computations are accelerated using SIMD.
- Author
- Pavel Sevecek (sevecek at sirrah.troja.mff.cuni.cz)
- Date
- 2016-2021
Definition in file Vector.h.