JPL Spatial
Sound spatialization and propagation library
Loading...
Searching...
No Matches
JPL::VBAP::LUTQuery< LUTType, LUTCodec, Vec3TypeImplicit > Class Template Reference

Interface to query LUT gains for a direction. More...

#include <JPLSpatial/Panning/VBAPLUT3D.h>

Classes

struct  VBAPCell
 Data extracted from LUT for specific source direction. More...
 

Public Member Functions

JPL_INLINE LUTQuery (const LUTType &lut) noexcept
 
template<CVec3 Vec3Type>
void GainsFor (const Vec3Type &direction, VBAPCell &outSpeakerGains) const
 
void GainsFor (const simd &dirX, const simd &dirY, const simd &dirZ, std::array< SpeakerIdx, 3 *simd::size()> &outIndices, std::array< float, 3 *simd::size()> &outGains) const
 
template<CVec3 Vec3Type>
JPL_INLINE void GainsFor (const Vec3Type &direction, std::span< float > outGains) const
 

Public Attributes

const LUTType & LUT
 

Static Public Attributes

static constexpr bool bLUTHasGains = !std::same_as<typename LUTType::GainType, GainTypeNone>
 

Detailed Description

template<CLUT LUTType, class LUTCodec, CVec3 Vec3TypeImplicit>
class JPL::VBAP::LUTQuery< LUTType, LUTCodec, Vec3TypeImplicit >

Interface to query LUT gains for a direction.

Constructor & Destructor Documentation

◆ LUTQuery()

template<CLUT LUTType, class LUTCodec , CVec3 Vec3TypeImplicit>
JPL_INLINE JPL::VBAP::LUTQuery< LUTType, LUTCodec, Vec3TypeImplicit >::LUTQuery ( const LUTType &  lut)
inlineexplicitnoexcept

Member Function Documentation

◆ GainsFor() [1/3]

template<CLUT LUTType, class LUTCodec , CVec3 Vec3TypeImplicit>
void JPL::VBAP::LUTQuery< LUTType, LUTCodec, Vec3TypeImplicit >::GainsFor ( const simd dirX,
const simd dirY,
const simd dirZ,
std::array< SpeakerIdx, 3 *simd::size()> &  outIndices,
std::array< float, 3 *simd::size()> &  outGains 
) const
inline

◆ GainsFor() [2/3]

template<CLUT LUTType, class LUTCodec , CVec3 Vec3TypeImplicit>
template<CVec3 Vec3Type>
JPL_INLINE void JPL::VBAP::LUTQuery< LUTType, LUTCodec, Vec3TypeImplicit >::GainsFor ( const Vec3Type &  direction,
std::span< float outGains 
) const

Function to query LUT gains for a direction.

Parameters
direction: has to be normalized unit vector
outGains: must be of size at least number of target speakers the LUT was built for

◆ GainsFor() [3/3]

template<CLUT LUTType, class LUTCodec , CVec3 Vec3TypeImplicit>
template<CVec3 Vec3Type>
void JPL::VBAP::LUTQuery< LUTType, LUTCodec, Vec3TypeImplicit >::GainsFor ( const Vec3Type &  direction,
VBAPCell outSpeakerGains 
) const
inline

Function to query LUT gains for a direction.

Parameters
direction: has to be normalized unit vector

Member Data Documentation

◆ bLUTHasGains

template<CLUT LUTType, class LUTCodec , CVec3 Vec3TypeImplicit>
constexpr bool JPL::VBAP::LUTQuery< LUTType, LUTCodec, Vec3TypeImplicit >::bLUTHasGains = !std::same_as<typename LUTType::GainType, GainTypeNone>
staticconstexpr

If LUT doesn't have precomputed gains, querying computes inverse speaker matrix multiplication to get the gains for the query direction

◆ LUT

template<CLUT LUTType, class LUTCodec , CVec3 Vec3TypeImplicit>
const LUTType& JPL::VBAP::LUTQuery< LUTType, LUTCodec, Vec3TypeImplicit >::LUT

The documentation for this class was generated from the following file: