JPL Spatial
Sound spatialization and propagation library
Loading...
Searching...
No Matches
JPL::MinimalVec3 Struct Reference

#include <JPLSpatial/Math/MinimalVec3.h>

Public Member Functions

 MinimalVec3 ()=default
 
JPL_INLINE constexpr MinimalVec3 (float x, float y, float z) noexcept
 
JPL_INLINE constexpr float operator[] (uint32 coordinate) const
 
JPL_INLINE constexpr float LengthSquared () const noexcept
 
JPL_INLINE constexpr float Length () const noexcept
 
JPL_INLINE constexpr MinimalVec3Normalize () noexcept
 
JPL_INLINE constexpr MinimalVec3 SafeNormal (const MinimalVec3 &fallbackDirection, float tolerance=JPL_FLOAT_EPS) const noexcept
 
JPL_INLINE constexpr MinimalVec3 SafeNormal (float &outLength, const MinimalVec3 &fallbackDirection, float tolerance=JPL_FLOAT_EPS) const noexcept
 
JPL_INLINE constexpr MinimalVec3 operator- () const
 
JPL_INLINE constexpr MinimalVec3 operator- (const MinimalVec3 &V) const
 
JPL_INLINE constexpr MinimalVec3 operator+ (const MinimalVec3 &V) const
 
template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE constexpr MinimalVec3 operator* (Arg Scale) const noexcept
 
template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE constexpr MinimalVec3 operator/ (Arg Scale) const noexcept
 
JPL_INLINE constexpr void operator+= (const MinimalVec3 &V) noexcept
 
JPL_INLINE constexpr MinimalVec3operator*= (const MinimalVec3 Other)
 
template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE constexpr MinimalVec3operator/= (Arg Scale) noexcept
 
template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE constexpr MinimalVec3operator*= (Arg Scale) noexcept
 

Static Public Member Functions

static JPL_INLINE constexpr MinimalVec3 Zero () noexcept
 

Public Attributes

union { 
 
   std::array< float, 3 >   mVF 
 
   struct { 
 
      float   X 
 
      float   Y 
 
      float   Z 
 
   }  
 
};  
 

Detailed Description

Minimal vector class to plug into BDPT interface if user doesn't provide their own.

Constructor & Destructor Documentation

◆ MinimalVec3() [1/2]

JPL::MinimalVec3::MinimalVec3 ( )
default

◆ MinimalVec3() [2/2]

JPL_INLINE constexpr JPL::MinimalVec3::MinimalVec3 ( float  x,
float  y,
float  z 
)
inlineconstexprnoexcept

Member Function Documentation

◆ Length()

JPL_INLINE constexpr float JPL::MinimalVec3::Length ( ) const
inlineconstexprnoexcept

◆ LengthSquared()

JPL_INLINE constexpr float JPL::MinimalVec3::LengthSquared ( ) const
inlineconstexprnoexcept

◆ Normalize()

JPL_INLINE constexpr MinimalVec3 & JPL::MinimalVec3::Normalize ( )
inlineconstexprnoexcept

◆ operator*()

template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE constexpr MinimalVec3 JPL::MinimalVec3::operator* ( Arg  Scale) const
inlineconstexprnoexcept

◆ operator*=() [1/2]

template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE constexpr MinimalVec3 & JPL::MinimalVec3::operator*= ( Arg  Scale)
inlineconstexprnoexcept

◆ operator*=() [2/2]

JPL_INLINE constexpr MinimalVec3 & JPL::MinimalVec3::operator*= ( const MinimalVec3  Other)
inlineconstexpr

◆ operator+()

JPL_INLINE constexpr MinimalVec3 JPL::MinimalVec3::operator+ ( const MinimalVec3 V) const
inlineconstexpr

◆ operator+=()

JPL_INLINE constexpr void JPL::MinimalVec3::operator+= ( const MinimalVec3 V)
inlineconstexprnoexcept

◆ operator-() [1/2]

JPL_INLINE constexpr MinimalVec3 JPL::MinimalVec3::operator- ( ) const
inlineconstexpr

◆ operator-() [2/2]

JPL_INLINE constexpr MinimalVec3 JPL::MinimalVec3::operator- ( const MinimalVec3 V) const
inlineconstexpr

◆ operator/()

template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE constexpr MinimalVec3 JPL::MinimalVec3::operator/ ( Arg  Scale) const
inlineconstexprnoexcept

◆ operator/=()

template<typename Arg >
requires (std::is_arithmetic_v<Arg>)
JPL_INLINE constexpr MinimalVec3 & JPL::MinimalVec3::operator/= ( Arg  Scale)
inlineconstexprnoexcept

◆ operator[]()

JPL_INLINE constexpr float JPL::MinimalVec3::operator[] ( uint32  coordinate) const
inlineconstexpr

◆ SafeNormal() [1/2]

JPL_INLINE constexpr MinimalVec3 JPL::MinimalVec3::SafeNormal ( const MinimalVec3 fallbackDirection,
float  tolerance = JPL_FLOAT_EPS 
) const
inlineconstexprnoexcept

◆ SafeNormal() [2/2]

JPL_INLINE constexpr MinimalVec3 JPL::MinimalVec3::SafeNormal ( float outLength,
const MinimalVec3 fallbackDirection,
float  tolerance = JPL_FLOAT_EPS 
) const
inlineconstexprnoexcept

◆ Zero()

static JPL_INLINE constexpr MinimalVec3 JPL::MinimalVec3::Zero ( )
inlinestaticconstexprnoexcept

Member Data Documentation

◆ [union]

union { ... } JPL::MinimalVec3

◆ mVF

std::array<float, 3> JPL::MinimalVec3::mVF

◆ X

float JPL::MinimalVec3::X

◆ Y

float JPL::MinimalVec3::Y

◆ Z

float JPL::MinimalVec3::Z

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