|
JPL Spatial
Sound spatialization and propagation library
|
Forward declaration. More...
#include <JPLSpatial/Math/DirectionEncoding.h>
Public Types | |
| using | EncodedType = typename Precision::EncodedType |
| using | FloatType = std::conditional_t<(Precision::cBitsPerAxis > 23), double, float > |
Static Public Member Functions | |
| template<CVec3 Vec3> | |
| static constexpr EncodedType | Encode (const Vec3 &direction) |
| static simd_mask | Encode (const simd &dirX, const simd &dirY, const simd &dirZ) |
| template<CVec3 Vec3> | |
| static constexpr Vec3 | Decode (EncodedType encodedDirection) |
| static void | Decode (const simd_mask &encodedDirection, simd &outX, simd &outY, simd &outZ) |
| template<std::integral T> | |
| static JPL_INLINE constexpr bool | IsValidCode (T code) noexcept |
| template<std::integral T> | |
| static JPL_INLINE constexpr bool | AreValidComponents (T x, T y) noexcept |
| template<std::integral T> | |
| static JPL_INLINE constexpr EncodedType | CombineComponents (T x, T y) noexcept |
| template<std::integral T> | |
| static JPL_INLINE constexpr auto | SanitizeCode (T code) noexcept |
| Alias the padding rim to the last real texel. | |
Static Public Attributes | |
| static constexpr auto | cBitsPerAxis = Precision::cBitsPerAxis |
| static constexpr EncodedType | cAxisMask = static_cast<EncodedType>((1llu << cBitsPerAxis) - 1u) |
| static constexpr size_t | cAxisRange = cAxisMask + 1 |
| static constexpr auto | cMaxComponentError = Octahedron::cMaxComponentError<cBitsPerAxis> |
| static constexpr auto | cMaxVectorError = Octahedron::cMaxVectorError<cBitsPerAxis> |
Forward declaration.
Static utility class for octahedral encoding of a direction vector in 3D space.
| using JPL::OctahedronEncoding< Precision >::EncodedType = typename Precision::EncodedType |
| using JPL::OctahedronEncoding< Precision >::FloatType = std::conditional_t<(Precision::cBitsPerAxis > 23), double, float> |
|
staticconstexprnoexcept |
Check if 'x' and 'y' components' can produce a valid code, taking into acount padding rim.
|
staticconstexprnoexcept |
Combine encoded 'x' and 'y' components into a valid code, sanitizing if necessary.
|
static |
|
staticconstexpr |
Decodes octahedron encoded direction back to a vector. This reverses the operation performed by Encode.
| encodedDirection | : the octahedron integer to be decoded back to a direction vector. |
|
inlinestatic |
|
staticconstexpr |
Encodes a direction vector into octahedron.
| direction | : direction vector to be encoded, must be normalized and non-zero |
|
staticconstexprnoexcept |
Check if 'code' falls within valid range of the encoder's precision, taking into acount padding rim.
|
staticconstexprnoexcept |
Alias the padding rim to the last real texel.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |