47 template<CVec3 Vec3Type>
61 return Vec3Type{ 0.0f, 0.0f, 0.0f };
81 return Vec2{ 0.0f, 0.0f };
87 namespace SpeakerTriangulation
89 using Vec3i = std::array<uint8, 3>;
91 template<auto GetSpeakerVectorFunction,
class Vec3ContainerType>
112 template<auto GetSpeakerVectorFunction,
class Vec3ContainerType,
class IndexContainerType>
137 template<CVec3 Vec3Type,
class Vec3iContainerType>
174 template<auto GetSpeakerVectorFunction, CVec3 Vec3Type,
class Vec3ContainerType,
class Vec3iContainerType>
247 if (
a1 <
a2)
return std::strong_ordering::less;
248 if (
a1 >
a2)
return std::strong_ordering::greater;
249 return std::strong_ordering::equal;
254 template<
template<
typename...>
class ArrayType,
class ...Args>
#define JPL_ASSERT(inExpression,...)
Main assert macro, usage: JPL_ASSERT(condition, message) or JPL_ASSERT(condition)
Definition ErrorReporting.h:76
#define JPL_ENSURE(inExpression,...)
Define ENSURE.
Definition ErrorReporting.h:90
Definition ChannelMap.h:150
Definition ConvexHullBuilder.h:57
Utility class to encapsulate dummy speaker handling while building a LUT.
Definition DummySpeakers.h:36
JPL_INLINE constexpr auto Abs(const T &value) noexcept
Standard abs is not constexpr in C++20.
Definition Math.h:87
bool GetSpeakerVectors(ChannelMap channelMap, Vec3ContainerType &outVectors)
Definition VBAPEx.h:92
bool TriangulateSpeakerLayout(std::span< const Vec3Type > speakerVectors, Vec3iContainerType &outIndices)
Definition VBAPEx.h:138
std::array< uint8, 3 > Vec3i
Definition VBAPEx.h:89
Definition AcousticMaterial.h:36
Vec3Type ComputeVBAP(const Vec3Type &sourceDirection, const Vec3Type &triPointA, const Vec3Type &triPointB, const Vec3Type &triPointC)
Definition VBAPEx.h:48
std::uint32_t uint32
Definition Core.h:311
std::pmr::memory_resource * GetDefaultMemoryResource() noexcept
Definition Memory.h:42
EChannel
Definition ChannelMap.h:39
@ TOP_Channels
Definition ChannelMap.h:75
@ TopCenter
Definition ChannelMap.h:58
@ LFE
Definition ChannelMap.h:43
JPL_INLINE simd min(const simd &a, const simd &b) noexcept
Element-wise min.
Definition SIMD.h:1813
Minimal 2x2 matrix interface.
Definition MinimalMat.h:35
static JPL_INLINE constexpr Mat2 FromColumns(const Vec2 &l1, const Vec2 &l2) noexcept
Definition MinimalMat.h:42
Minimal 3x3 matrix interface.
Definition MinimalMat.h:83
static JPL_INLINE constexpr Mat3 FromColumns(const Vec3 &l1, const Vec3 &l2, const Vec3 &l3) noexcept
Definition MinimalMat.h:90
JPL_INLINE constexpr std::strong_ordering operator<=>(const ChannelAngle &other) const noexcept
Definition VBAPEx.h:243
float Angle
Definition VBAPEx.h:239
uint32 ChannelId
Definition VBAPEx.h:240
JPL_INLINE constexpr bool operator==(const ChannelAngle &other) const noexcept
Definition VBAPEx.h:251
static void GetSortedChannelAngles(ChannelMap channelMap, ArrayType< ChannelAngle, Args... > &sortedChannelAngles, std::function< float(EChannel)> getChannelAngle, bool skipLFE=true)
Get channel angles from ChannelMap, normalize to [0, Pi] and sort in assending order.
Definition VBAPEx.h:255
Definition MinimalVec2.h:29
static constexpr std::size_t size() noexcept
Get number of element of the vector.
Definition SIMD.h:97