67 const Vec3
X = Normalized(CrossProduct(
Y,
Z));
68 Y = CrossProduct(
Z,
X);
158 return Basis<Vec3>::MakeFrom(
forward);
std::remove_cvref_t< decltype(GetX(std::declval< Vec3 >()))> FloatOf
Definition Vec3Math.h:36
void CreateOrthonormalBasis(const Vec3 &normal, Vec3 &tangent, Vec3 &bitangent) noexcept
Definition Vec3Math.h:84
JPL_INLINE constexpr T FMA(T a, T b, T c) noexcept
Inlined fuse multiply-add. Compiler in some circumstances is more eager to optimize this than std::fm...
Definition Math.h:186
JPL_INLINE constexpr bool IsNearlyEqual(T a, T b, T tolerance=JPL_FLOAT_EPS_V< T >) noexcept
Definition Math.h:152
JPL_INLINE constexpr auto Abs(const T &value) noexcept
Standard abs is not constexpr in C++20.
Definition Math.h:87
JPL_INLINE std::pair< T, T > SinCos(T value) noexcept
Definition Math.h:164
Definition AcousticMaterial.h:36
JPL_INLINE auto GetX(const Vec3Type &v) noexcept
Definition Vec3Traits.h:35
JPL_INLINE auto GetZ(const Vec3Type &v) noexcept
Definition Vec3Traits.h:37
JPL_INLINE auto GetY(const Vec3Type &v) noexcept
Definition Vec3Traits.h:36
JPL_INLINE simd min(const simd &a, const simd &b) noexcept
Element-wise min.
Definition SIMD.h:1813
Orthonormal basis (column-major)
Definition MinimalBasis.h:35
JPL_INLINE Vec3 InverseTransform(const Vec3 &pWorld) const noexcept
Apply rotation world -> local.
Definition MinimalBasis.h:98
JPL_INLINE Vec3 Transform(const Vec3 &vector) const noexcept
Apply rotation local -> world.
Definition MinimalBasis.h:108
Vec3 X
Definition MinimalBasis.h:38
static const Basis & Identity() noexcept
Definition MinimalBasis.h:40
Vec3 Z
Definition MinimalBasis.h:38
Internal::FloatOf< Vec3 > Float
Definition MinimalBasis.h:36
Vec3 Y
Definition MinimalBasis.h:38
JPL_INLINE void Transform(simd &inOutX, simd &inOutY, simd &inOutZ) const noexcept
Definition MinimalBasis.h:116
static Basis Rotation(const Vec3 &axis, Float angleRad) noexcept
Definition MinimalBasis.h:77
JPL_INLINE Basis Transform(const Basis &otherBasis) const noexcept
Compose orientations: apply 'this' basis mapping to the other's axes.
Definition MinimalBasis.h:130
JPL_INLINE Basis InverseTransform(const Basis &otherBasis) const noexcept
Re-express 'other' in 'this' local frame.
Definition MinimalBasis.h:140
static Basis FromUpAndForward(const Vec3 &up, const Vec3 &forward) noexcept
Creates a basis from the given up and forward normalized unit vectors.
Definition MinimalBasis.h:60
static JPL_INLINE Basis FromForward(const Vec3 &forward) noexcept
Definition MinimalBasis.h:52
Minimal 4-wide 32-bit float vector implementation for SIMD.
Definition SIMD.h:60