MAGE  v0.171.0
Matthias Advanced Game Engine
mage Namespace Reference

Namespaces

 anonymous_namespace{dump.cpp}
 
 anonymous_namespace{logging.cpp}
 
 anonymous_namespace{system_time.cpp}
 
 color
 
 details
 
 input
 
 loader
 
 rendering
 
 script
 

Classes

class  AABB
 
class  AlignedAllocator
 
struct  Array
 
class  BehaviorScript
 
class  BigEndianBinaryReader
 
class  BigEndianBinaryWriter
 
class  BinaryReader
 
class  BoundingFrustum
 
class  BoundingSphere
 
struct  Complex
 
class  Component
 
class  ComponentClient
 
class  ComponentManager
 
struct  CoreClock
 
struct  CoreClockPerCore
 
class  CPUMonitor
 
struct  Direction3
 
class  DoubleEndedMemoryStack
 
struct  Dual
 
class  DynamicArray
 
class  DynamicMemoryBuffer
 
class  Engine
 
class  EngineMessageHandler
 
class  EngineSetup
 
class  Entity
 
class  Exception
 
class  GameTime
 
class  GameTimer
 
struct  Hyperbolic
 
class  IdGenerator
 
struct  is_equivalent_integral
 
struct  KernelModeCoreClock
 
struct  KernelModeCoreClockPerCore
 
class  LineReader
 
class  LoggingConfiguration
 
class  MemoryArena
 
class  MemoryBuffer
 
class  Node
 
struct  Normal3
 
class  PersistentResourcePool
 
struct  Point3
 
class  ProgressReporter
 
class  ProxyPtr
 
class  Resource
 
class  ResourcePool
 
struct  RGB
 
struct  RGBA
 
class  RNG
 
class  S1ETTransform3D
 
class  S1QTTransform3D
 
class  Scene
 
class  SETTransform3D
 
class  SingleEndedMemoryStack
 
class  SpriteTransform2D
 
class  SQTTransform3D
 
struct  SRGB
 
struct  SRGBA
 
class  StaticMemoryBuffer
 
struct  SystemClock
 
class  TextureTransform2D
 
class  Timer
 
class  Transform
 
class  TransformClient
 
struct  UserModeCoreClock
 
struct  UserModeCoreClockPerCore
 
class  UTF16toUTF8
 
class  UTF8toUTF16
 
struct  UV
 
class  VariableScript
 
class  Window
 
class  WindowDescriptor
 
class  WindowMessageHandler
 
class  WindowMessageListener
 
class  Writer
 
struct  XYZ
 
struct  XYZA
 

Typedefs

using C32 = Complex< F32 >
 
using C64 = Complex< F64 >
 
using D32 = Dual< F32 >
 
using D64 = Dual< F64 >
 
using H32 = Hyperbolic< F32 >
 
using H64 = Hyperbolic< F64 >
 
using AxisAlignedBoundingBox = AABB
 
template<typename T >
using AlignedVector = std::vector< T, AlignedAllocator< T > >
 
template<typename T >
using NotNull = gsl::not_null< T >
 
template<typename T >
using ComPtr = Microsoft::WRL::ComPtr< T >
 
template<typename T >
using SharedPtr = std::shared_ptr< T >
 
template<typename T >
using WeakPtr = std::weak_ptr< T >
 
template<typename T , typename DeleterT = std::default_delete< T >>
using UniquePtr = std::unique_ptr< T, DeleterT >
 
using UniqueHandle = UniquePtr< void, details::HandleCloser >
 
using SharedHandle = SharedPtr< void >
 
using UniqueFileStream = UniquePtr< std::FILE, details::FileStreamCloser >
 
using MemoryStack = SingleEndedMemoryStack
 
using Value = std::variant< bool, F32, F32x2, F32x3, F32x4, S32, S32x2, S32x3, S32x4, U32, U32x2, U32x3, U32x4, std::string >
 
using ValueMap = std::map< std::string, Value, std::less<> >
 
using zstring = gsl::zstring<>
 
using wzstring = gsl::wzstring<>
 
using const_zstring = gsl::czstring<>
 
using const_wzstring = gsl::cwzstring<>
 
using TimeStampSeconds = std::chrono::duration< F64 >
 
using TimeIntervalSeconds = std::chrono::duration< F64 >
 
using WallClockTimer = Timer< std::chrono::high_resolution_clock >
 
using CPUTimer = Timer< CoreClockPerCore >
 
using AtomicBool = std::atomic< bool >
 
using AtomicF32 = std::atomic< F32 >
 
using AtomicF64 = std::atomic< F64 >
 
using AtomicS8 = std::atomic< S8 >
 
using AtomicS16 = std::atomic< S16 >
 
using AtomicS32 = std::atomic< S32 >
 
using AtomicS64 = std::atomic< S64 >
 
using AtomicFS8 = std::atomic< FS8 >
 
using AtomicFS16 = std::atomic< FS16 >
 
using AtomicFS32 = std::atomic< FS32 >
 
using AtomicFS64 = std::atomic< FS64 >
 
using AtomicU8 = std::atomic< U8 >
 
using AtomicU16 = std::atomic< U16 >
 
using AtomicU32 = std::atomic< U32 >
 
using AtomicU64 = std::atomic< U64 >
 
using AtomicFU8 = std::atomic< FU8 >
 
using AtomicFU16 = std::atomic< FU16 >
 
using AtomicFU32 = std::atomic< FU32 >
 
using AtomicFU64 = std::atomic< FU64 >
 
using F32 = float
 
using F64 = double
 
using S8 = std::int8_t
 
using S16 = std::int16_t
 
using S32 = std::int32_t
 
using S64 = std::int64_t
 
using FS8 = std::int_fast8_t
 
using FS16 = std::int_fast16_t
 
using FS32 = std::int_fast32_t
 
using FS64 = std::int_fast64_t
 
using U8 = std::uint8_t
 
using U16 = std::uint16_t
 
using U32 = std::uint32_t
 
using U64 = std::uint64_t
 
using FU8 = std::uint_fast8_t
 
using FU16 = std::uint_fast16_t
 
using FU32 = std::uint_fast32_t
 
using FU64 = std::uint_fast64_t
 
using F32x2 = Array< F32, 2u >
 
using F32x3 = Array< F32, 3u >
 
using F32x4 = Array< F32, 4u >
 
using F32x2A = Array< F32, 2u, 16u >
 
using F32x3A = Array< F32, 3u, 16u >
 
using F32x4A = Array< F32, 4u, 16u >
 
using F64x2 = Array< F64, 2u >
 
using F64x3 = Array< F64, 3u >
 
using F64x4 = Array< F64, 4u >
 
using S8x2 = Array< S8, 2u >
 
using S8x3 = Array< S8, 3u >
 
using S8x4 = Array< S8, 4u >
 
using S16x2 = Array< S16, 2u >
 
using S16x3 = Array< S16, 3u >
 
using S16x4 = Array< S16, 4u >
 
using S32x2 = Array< S32, 2u >
 
using S32x3 = Array< S32, 3u >
 
using S32x4 = Array< S32, 4u >
 
using S64x2 = Array< S64, 2u >
 
using S64x3 = Array< S64, 3u >
 
using S64x4 = Array< S64, 4u >
 
using FS8x2 = Array< FS8, 2u >
 
using FS8x3 = Array< FS8, 3u >
 
using FS8x4 = Array< FS8, 4u >
 
using FS16x2 = Array< FS16, 2u >
 
using FS16x3 = Array< FS16, 3u >
 
using FS16x4 = Array< FS16, 4u >
 
using FS32x2 = Array< FS32, 2u >
 
using FS32x3 = Array< FS32, 3u >
 
using FS32x4 = Array< FS32, 4u >
 
using FS64x2 = Array< FS64, 2u >
 
using FS64x3 = Array< FS64, 3u >
 
using FS64x4 = Array< FS64, 4u >
 
using U8x2 = Array< U8, 2u >
 
using U8x3 = Array< U8, 3u >
 
using U8x4 = Array< U8, 4u >
 
using U16x2 = Array< U16, 2u >
 
using U16x3 = Array< U16, 3u >
 
using U16x4 = Array< U16, 4u >
 
using U32x2 = Array< U32, 2u >
 
using U32x3 = Array< U32, 3u >
 
using U32x4 = Array< U32, 4u >
 
using U64x2 = Array< U64, 2u >
 
using U64x3 = Array< U64, 3u >
 
using U64x4 = Array< U64, 4u >
 
using FU8x2 = Array< FU8, 2u >
 
using FU8x3 = Array< FU8, 3u >
 
using FU8x4 = Array< FU8, 4u >
 
using FU16x2 = Array< FU16, 2u >
 
using FU16x3 = Array< FU16, 3u >
 
using FU16x4 = Array< FU16, 4u >
 
using FU32x2 = Array< FU32, 2u >
 
using FU32x3 = Array< FU32, 3u >
 
using FU32x4 = Array< FU32, 4u >
 
using FU64x2 = Array< FU64, 2u >
 
using FU64x3 = Array< FU64, 3u >
 
using FU64x4 = Array< FU64, 4u >
 

Enumerations

enum  State : U8 { State::Active, State::Passive, State::Terminated }
 
enum  Coverage : U8 { Coverage::NoCoverage, Coverage::PartialCoverage, Coverage::FullCoverage }
 
enum  MessageDisposition : U8 { MessageDisposition::Ignore, MessageDisposition::Continue, MessageDisposition::Abort }
 
enum  HotKey : U8 { HotKey::Unused = 0, HotKey::PrintScreen, HotKey::AltPrintScreen }
 

Functions

void PrintConsoleHeader () noexcept
 
constexpr U32 GetVersionMajor () noexcept
 
constexpr U32 GetVersionMinor () noexcept
 
constexpr U32 GetVersionPatch () noexcept
 
template<typename ElementT , typename... ConstructorArgsT>
ProxyPtr< ElementT > AddElement (AlignedVector< ElementT > &elements, ConstructorArgsT &&... args)
 
template<typename ElementT , typename BaseT , typename... ConstructorArgsT>
ProxyPtr< ElementT > AddElementPtr (AlignedVector< UniquePtr< BaseT > > &elements, ConstructorArgsT &&... args)
 
UniquePtr< EngineCreateEngine (const EngineSetup &setup)
 
template<typename T >
constexpr const Complex< T > operator+ (T a, const Complex< T > &v) noexcept
 
template<typename T >
constexpr const Complex< T > operator- (T a, const Complex< T > &v) noexcept
 
template<typename T >
constexpr const Complex< T > operator* (T a, const Complex< T > &v) noexcept
 
template<typename T >
constexpr const Complex< T > operator/ (T a, const Complex< T > &v) noexcept
 
template<typename T >
constexpr const Dual< T > operator+ (T a, const Dual< T > &v) noexcept
 
template<typename T >
constexpr const Dual< T > operator- (T a, const Dual< T > &v) noexcept
 
template<typename T >
constexpr const Dual< T > operator* (T a, const Dual< T > &v) noexcept
 
template<typename T >
constexpr const Dual< T > operator/ (T a, const Dual< T > &v) noexcept
 
template<typename T >
constexpr const Hyperbolic< T > operator+ (T a, const Hyperbolic< T > &v) noexcept
 
template<typename T >
constexpr const Hyperbolic< T > operator- (T a, const Hyperbolic< T > &v) noexcept
 
template<typename T >
constexpr const Hyperbolic< T > operator* (T a, const Hyperbolic< T > &v) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (F32 src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const F32x2 &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const F32x3 &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const F32x4 &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const F32x2A &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const F32x3A &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const F32x4A &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const S32x2 &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const S32x3 &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const S32x4 &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (U32 src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const U32x2 &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const U32x3 &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const U32x4 &src) noexcept
 
const XMVECTOR XM_CALLCONV XMLoad (const RECT &src) noexcept
 
template<typename T >
const T XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const F32 XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const F32x2 XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const F32x3 XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const F32x4 XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const F32x2A XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const F32x3A XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const F32x4A XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const S32x2 XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const S32x3 XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const S32x4 XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const U32 XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const U32x2 XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const U32x3 XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<>
const U32x4 XM_CALLCONV XMStore (FXMVECTOR src) noexcept
 
template<typename BoundingVolumeT , typename BoundingVolumeU >
Coverage Classify (const BoundingVolumeT &volume1, const BoundingVolumeU &volume2) noexcept
 
template<typename BoundingVolumeT >
Coverage XM_CALLCONV Classify (const BoundingVolumeT &volume, FXMVECTOR point, F32 epsilon) noexcept
 
template<typename BoundingVolumeT >
Coverage Classify (const BoundingVolumeT &volume, const Point3 &point, F32 epsilon) noexcept
 
constexpr const UV InvertHandness (const UV &uv) noexcept
 
constexpr const Point3 InvertHandness (const Point3 &point) noexcept
 
constexpr const Normal3 InvertHandness (const Normal3 &normal) noexcept
 
constexpr const Direction3 InvertHandness (const Direction3 &direction) noexcept
 
constexpr F32 Saturate (F32 value) noexcept
 
const XMVECTOR XM_CALLCONV Saturate (FXMVECTOR value) noexcept
 
F32 WrapAngleDegrees (F32 angle) noexcept
 
F32 WrapAngleRadians (F32 angle) noexcept
 
const XMVECTOR XM_CALLCONV WrapAngleRadians (FXMVECTOR angles) noexcept
 
F32 ClampAngleDegrees (F32 angle, F32 min_angle, F32 max_angle) noexcept
 
F32 ClampAngleRadians (F32 angle, F32 min_angle, F32 max_angle) noexcept
 
const XMVECTOR XM_CALLCONV ClampAngleRadians (FXMVECTOR angles, FXMVECTOR min_angles, FXMVECTOR max_angles) noexcept
 
F32 NormalizedToAbsolute (F32 p, F32 resolution) noexcept
 
const F32x2 NormalizedToAbsolute (const F32x2 &p, const F32x2 &resolution) noexcept
 
const XMVECTOR XM_CALLCONV NormalizedToAbsolute (FXMVECTOR p, FXMVECTOR resolution) noexcept
 
F32 AbsoluteToNormalized (F32 p, F32 resolution) noexcept
 
const F32x2 AbsoluteToNormalized (const F32x2 &p, const F32x2 &resolution) noexcept
 
const XMVECTOR XM_CALLCONV AbsoluteToNormalized (FXMVECTOR p, FXMVECTOR resolution) noexcept
 
const XMVECTOR XM_CALLCONV XMVectorLeftTopRightBottom (const RECT &rect) noexcept
 
const XMVECTOR XM_CALLCONV XMVectorLeftTopWidthHeight (const RECT &rect) noexcept
 
const XMVECTOR XM_CALLCONV GetNDCZConstructionValues (FXMMATRIX projection_matrix) noexcept
 
void FibonacciSpiralSamplesInUnitCircle (gsl::span< F32x2 > samples, F32 shift, F32 alpha) noexcept
 
void FibonacciSpiralSamplesOnUnitSphere (gsl::span< F32x3 > samples, F32 shift) noexcept
 
void FibonacciSpiralSamplesOnUnitHemisphere (gsl::span< F32x3 > samples, F32 shift, bool positive) noexcept
 
void FibonacciSpiralCosineWeightedSamplesOnUnitHemisphere (gsl::span< F32x3 > samples, F32 shift) noexcept
 
F32 RadicalInverse (std::size_t index, F32 base) noexcept
 
F32 VanderCorput (std::size_t index) noexcept
 
void Halton (std::size_t index, gsl::span< F32 > sample) noexcept
 
const F32x2 Halton2D (std::size_t index) noexcept
 
const F32x3 Halton3D (std::size_t index) noexcept
 
const F32x4 Halton4D (std::size_t index) noexcept
 
void Hammersley (std::size_t index, gsl::span< F32 > sample, std::size_t nb_samples) noexcept
 
const F32x2 Hammersley2D (std::size_t index, std::size_t nb_samples) noexcept
 
const F32x3 Hammersley3D (std::size_t index, std::size_t nb_samples) noexcept
 
const F32x4 Hammersley4D (std::size_t index, std::size_t nb_samples) noexcept
 
const F32x2 Roth (std::size_t index, size_t nb_samples) noexcept
 
const F32x2 UniformSampleOnUnitCircle (F32 u) noexcept
 
const F32x2 UniformSampleOnUnitHalfcircle (F32 u) noexcept
 
const F32x2 UniformSampleInUnitCircle (F32 u1, F32 u2) noexcept
 
const F32x2 UniformSampleInUnitHalfcircle (F32 u1, F32 u2) noexcept
 
const F32x3 UniformSampleOnUnitSphere (F32 u1, F32 u2) noexcept
 
const F32x3 UniformSampleOnUnitHemisphere (F32 u1, F32 u2) noexcept
 
const F32x3 UniformSampleInUnitSphere (F32 u1, F32 u2, F32 u3) noexcept
 
const F32x3 UniformSampleInUnitHemisphere (F32 u1, F32 u2, F32 u3) noexcept
 
const F32x3 CosineWeightedSampleOnUnitHemisphere (F32 u1, F32 u2) noexcept
 
const XMVECTOR XM_CALLCONV RGBtoSRGB (FXMVECTOR rgb) noexcept
 
const XMVECTOR XM_CALLCONV SRGBtoRGB (FXMVECTOR srgb) noexcept
 
const XMVECTOR XM_CALLCONV RGBtoXYZ (FXMVECTOR rgb) noexcept
 
const XMVECTOR XM_CALLCONV XYZtoRGB (FXMVECTOR xyz) noexcept
 
const XMMATRIX XM_CALLCONV OrthonormalBasis_HughesMoller (FXMVECTOR n) noexcept
 
const XMMATRIX XM_CALLCONV OrthonormalBasis_Frisvad (FXMVECTOR n) noexcept
 
const XMMATRIX XM_CALLCONV OrthonormalBasis_Duff (FXMVECTOR n) noexcept
 
const XMMATRIX XM_CALLCONV OrthonormalBasis (FXMVECTOR n) noexcept
 
const XMMATRIX XM_CALLCONV GetTranslationMatrix (FXMVECTOR translation) noexcept
 
const XMMATRIX XM_CALLCONV GetInverseTranslationMatrix (FXMVECTOR translation) noexcept
 
const XMVECTOR XM_CALLCONV GetRollPitchYawQuaternion (FXMVECTOR rotation) noexcept
 
const XMVECTOR XM_CALLCONV GetInverseRollPitchYawQuaternion (FXMVECTOR rotation) noexcept
 
const XMMATRIX XM_CALLCONV GetRollPitchYawMatrix (FXMVECTOR rotation) noexcept
 
const XMMATRIX XM_CALLCONV GetInverseRollPitchYawMatrix (FXMVECTOR rotation) noexcept
 
const XMMATRIX XM_CALLCONV GetScalingMatrix (FXMVECTOR scale) noexcept
 
const XMMATRIX XM_CALLCONV GetScalingMatrix (F32 scale) noexcept
 
const XMMATRIX XM_CALLCONV GetInverseScalingMatrix (FXMVECTOR scale) noexcept
 
const XMMATRIX XM_CALLCONV GetInverseScalingMatrix (F32 scale) noexcept
 
const XMMATRIX XM_CALLCONV GetAffineTransformationMatrix (FXMVECTOR scale, FXMVECTOR rotation, FXMVECTOR translation) noexcept
 
const XMMATRIX XM_CALLCONV GetAffineTransformationMatrix (F32 scale, FXMVECTOR rotation, FXMVECTOR translation) noexcept
 
const XMMATRIX XM_CALLCONV GetInverseAffineTransformationMatrix (FXMVECTOR scale, FXMVECTOR rotation, FXMVECTOR translation) noexcept
 
const XMMATRIX XM_CALLCONV GetInverseAffineTransformationMatrix (F32 scale, FXMVECTOR rotation, FXMVECTOR translation) noexcept
 
const XMMATRIX XM_CALLCONV GetAffineTransformationMatrix (FXMVECTOR scale, F32 rotation, FXMVECTOR translation) noexcept
 
const XMMATRIX XM_CALLCONV GetAffineTransformationMatrix (FXMVECTOR offset, FXMVECTOR scale, F32 rotation, FXMVECTOR translation) noexcept
 
constexpr U32 BitsPerPixel (DXGI_FORMAT format) noexcept
 
constexpr DXGI_FORMAT ConvertToSRGB (DXGI_FORMAT format) noexcept
 
template<typename ActionT , typename FromT , std::size_t N>
constexpr const auto TransformArray (ActionT &&action, const std::array< FromT, N > &a)
 
template<typename ToT , typename FromT , std::size_t N>
constexpr const auto StaticCastArray (const std::array< FromT, N > &a)
 
template<typename T , std::size_t N>
constexpr const auto FillArray (const T &value)
 
template<std::size_t ToN, typename T , std::size_t FromN>
constexpr const auto EnlargeArray (const std::array< T, FromN > &a)
 
template<typename T , typename... Ts>
constexpr const auto TuppleToArray (const std::tuple< T, Ts... > &t)
 
template<typename T , std::size_t N>
constexpr const auto ArrayToTupple (const std::array< T, N > &a)
 
template<typename ContainerT , typename PredicateT >
decltype(auto) EraseIf (ContainerT &container, PredicateT &&predicate)
 
void ThrowIfFailed (bool result)
 
template<typename... ArgsT>
void ThrowIfFailed (bool result, std::string_view format_str, const ArgsT &... args)
 
void ThrowIfFailed (BOOL result)
 
template<typename... ArgsT>
void ThrowIfFailed (BOOL result, std::string_view format_str, const ArgsT &... args)
 
void ThrowIfFailed (HRESULT result)
 
template<typename... ArgsT>
void ThrowIfFailed (HRESULT result, std::string_view format_str, const ArgsT &... args)
 
void ReadBinaryFile (const std::filesystem::path &path, UniquePtr< U8[] > &data, std::size_t &size)
 
template<typename T >
const T BytesBigEndianTo (NotNull< const U8 * > bytes) noexcept
 
template<typename T >
const T BytesLittleEndianTo (NotNull< const U8 * > bytes) noexcept
 
template<typename T >
const T BytesTo (NotNull< const U8 * > bytes, bool big_endian) noexcept
 
void AddUnhandledExceptionFilter () noexcept
 
void CreateMiniDump (EXCEPTION_POINTERS *exception_record) noexcept
 
FU16 ConsoleWidth ()
 
void InitializeConsole ()
 
template<typename... ArgsT>
void Log (MessageDisposition disposition, std::string_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void Log (MessageDisposition disposition, std::wstring_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void Debug ([[maybe_unused]] std::string_view format_str, [[maybe_unused]] const ArgsT &... args)
 
template<typename... ArgsT>
void Debug ([[maybe_unused]] std::wstring_view format_str, [[maybe_unused]] const ArgsT &... args)
 
template<typename... ArgsT>
void Info (std::string_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void Info (std::wstring_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void Warning (std::string_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void Warning (std::wstring_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void Error (std::string_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void Error (std::wstring_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void Fatal (std::string_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void Fatal (std::wstring_view format_str, const ArgsT &... args)
 
void * AllocAligned (std::size_t size, std::size_t alignment) noexcept
 
template<typename T >
T * AllocAlignedData (std::size_t count, size_t alignment) noexcept
 
void FreeAligned (void *ptr) noexcept
 
template<typename T , typename... ConstructorArgsT>
SharedPtr< T > MakeShared (ConstructorArgsT &&... args)
 
template<typename T , typename... ConstructorArgsT>
SharedPtr< T > MakeAllocatedShared (ConstructorArgsT &&... args)
 
template<typename T , typename... ConstructorArgsT>
UniquePtr< T > MakeUnique (ConstructorArgsT &&... args)
 
template<typename ToT , typename FromT >
UniquePtr< ToT > static_pointer_cast (UniquePtr< FromT > &&ptr) noexcept
 
template<typename ToT , typename FromT >
UniquePtr< ToT > dynamic_pointer_cast (UniquePtr< FromT > &&ptr) noexcept
 
template<typename ToT , typename FromT >
UniquePtr< ToT > const_pointer_cast (UniquePtr< FromT > &&ptr) noexcept
 
template<typename ToT , typename FromT >
UniquePtr< ToT > reinterpret_pointer_cast (UniquePtr< FromT > &&ptr) noexcept
 
HANDLE SafeHandle (HANDLE handle) noexcept
 
UniqueHandle CreateUniqueHandle (HANDLE handle)
 
SharedHandle CreateSharedHandle (HANDLE handle)
 
template<typename T >
bool operator== (const ProxyPtr< T > &lhs, std::nullptr_t) noexcept
 
template<typename T >
bool operator!= (const ProxyPtr< T > &lhs, std::nullptr_t) noexcept
 
template<typename T >
bool operator== (std::nullptr_t, const ProxyPtr< T > &rhs) noexcept
 
template<typename T >
bool operator!= (std::nullptr_t, const ProxyPtr< T > &rhs) noexcept
 
template<typename ToT , typename FromT >
ProxyPtr< ToT > static_pointer_cast (const ProxyPtr< FromT > &ptr) noexcept
 
template<typename ToT , typename FromT >
ProxyPtr< ToT > dynamic_pointer_cast (const ProxyPtr< FromT > &ptr) noexcept
 
template<typename ToT , typename FromT >
ProxyPtr< ToT > dynamic_pointer_cast (ProxyPtr< FromT > &&ptr) noexcept
 
template<typename ToT , typename FromT >
ProxyPtr< ToT > const_pointer_cast (const ProxyPtr< FromT > &ptr) noexcept
 
template<typename ToT , typename FromT >
ProxyPtr< ToT > const_pointer_cast (ProxyPtr< FromT > &&ptr) noexcept
 
template<typename ToT , typename FromT >
ProxyPtr< ToT > reinterpret_pointer_cast (const ProxyPtr< FromT > &ptr) noexcept
 
template<typename ToT , typename FromT >
ProxyPtr< ToT > reinterpret_pointer_cast (ProxyPtr< FromT > &&ptr) noexcept
 
U64 GetNextGuid () noexcept
 
FU16 NumberOfPhysicalCores ()
 
FU16 NumberOfSystemCores () noexcept
 
template<typename CallerT >
CallerT * GetWindowCaller (NotNull< HWND > window, UINT message, [[maybe_unused]] WPARAM wParam, LPARAM lParam) noexcept
 
template<typename CallerT >
CallerT * GetDialogCaller (NotNull< HWND > dialog, UINT message, [[maybe_unused]] WPARAM wParam, LPARAM lParam) noexcept
 
template<typename StringT , typename... ArgsT>
const auto Format (const StringT &format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void Print (std::string_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void Print (std::wstring_view format_str, const ArgsT &... args)
 
template<typename OutputIt , typename... ArgsT>
OutputIt AppendWrite (OutputIt it, std::string_view format_str, const ArgsT &... args)
 
template<typename OutputIt , typename... ArgsT>
OutputIt AppendWrite (OutputIt it, std::wstring_view format_str, const ArgsT &... args)
 
template<typename OutputIt , typename... ArgsT>
OutputIt AppendWrite (OutputIt it, std::size_t length, std::string_view format_str, const ArgsT &... args)
 
template<typename OutputIt , typename... ArgsT>
OutputIt AppendWrite (OutputIt it, std::size_t length, std::wstring_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void WriteTo (NotNull< std::FILE * > stream, std::string_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void WriteTo (NotNull< std::FILE * > stream, std::wstring_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void WriteTo (NotNull< zstring > buffer, std::size_t length, std::string_view format_str, const ArgsT &... args)
 
template<typename... ArgsT>
void WriteTo (NotNull< wzstring > buffer, std::size_t length, std::wstring_view format_str, const ArgsT &... args)
 
template<std::size_t N, typename... ArgsT>
void WriteTo (char(&buffer)[N], std::string_view format_str, const ArgsT &... args)
 
template<std::size_t N, typename... ArgsT>
void WriteTo (wchar_t(&buffer)[N], std::wstring_view format_str, const ArgsT &... args)
 
template<typename T >
const std::optional< T > StringTo (std::string_view str) noexcept
 
template<typename T >
const std::optional< T > StringPrefixTo (std::string_view str) noexcept
 
void TransformToLowerCase (std::string &str)
 
void TransformToLowerCase (std::wstring &str)
 
void TransformToUpperCase (std::string &str)
 
void TransformToUpperCase (std::wstring &str)
 
const std::wstring GetLocalSystemDateAsString ()
 
const std::wstring GetLocalSystemTimeAsString ()
 
const std::wstring GetLocalSystemDateAndTimeAsString ()
 
U64 GetVirtualMemoryUsage () noexcept
 
U64 GetPhysicalMemoryUsage () noexcept
 
void ComboBoxAdd (NotNull< HWND > dialog, int id, const void *data, NotNull< const_wzstring > desc) noexcept
 
void ComboBoxSelect (NotNull< HWND > dialog, int id, int index) noexcept
 
void ComboBoxSelect (NotNull< HWND > dialog, int id, const void *data) noexcept
 
const void * ComboBoxSelected (NotNull< HWND > dialog, int id) noexcept
 
bool ComboBoxSomethingSelected (NotNull< HWND > dialog, int id) noexcept
 
int ComboBoxCount (NotNull< HWND > dialog, int id) noexcept
 
bool ComboBoxContains (NotNull< HWND > dialog, int id, NotNull< const_wzstring > desc) noexcept
 
void ComboBoxAddValue (NotNull< HWND > dialog, int id, std::size_t value, NotNull< const_wzstring > desc) noexcept
 
template<typename T >
void ComboBoxAddPtr (NotNull< HWND > dialog, int id, const T *ptr, NotNull< const_wzstring > desc) noexcept
 
void ComboBoxSelectValue (NotNull< HWND > dialog, int id, std::size_t value) noexcept
 
template<typename T >
void ComboBoxSelectPtr (NotNull< HWND > dialog, int id, const T *ptr) noexcept
 
std::size_t ComboBoxSelectedValue (NotNull< HWND > dialog, int id) noexcept
 
template<typename T >
const T * ComboBoxSelectedPtr (NotNull< HWND > dialog, int id) noexcept
 

Variables

constexpr F32 XM_GA = 2.399963230f
 
constexpr U16 g_primes []
 
template<typename T , typename U >
constexpr bool is_equivalent_integral_v = is_equivalent_integral< T, U >::value
 

Typedef Documentation

◆ AlignedVector

template<typename T >
using mage::AlignedVector = typedef std::vector< T, AlignedAllocator< T > >

◆ AtomicBool

using mage::AtomicBool = typedef std::atomic< bool >

An atomic boolean type.

◆ AtomicF32

using mage::AtomicF32 = typedef std::atomic< F32 >

An atomic floating point type with width of exactly 32 bits.

◆ AtomicF64

using mage::AtomicF64 = typedef std::atomic< F64 >

An atomic floating point type with width of exactly 64 bits.

◆ AtomicFS16

using mage::AtomicFS16 = typedef std::atomic< FS16 >

The fastest atomic signed integer type with width of at least 16 bits.

◆ AtomicFS32

using mage::AtomicFS32 = typedef std::atomic< FS32 >

The fastest atomic signed integer type with width of at least 32 bits.

◆ AtomicFS64

using mage::AtomicFS64 = typedef std::atomic< FS64 >

The fastest atomic signed integer type with width of at least 64 bits.

◆ AtomicFS8

using mage::AtomicFS8 = typedef std::atomic< FS8 >

The fastest atomic signed integer type with width of at least 8 bits.

◆ AtomicFU16

using mage::AtomicFU16 = typedef std::atomic< FU16 >

The fastest atomic unsigned integer type with width of at least 16 bits.

◆ AtomicFU32

using mage::AtomicFU32 = typedef std::atomic< FU32 >

The fastest atomic unsigned integer type with width of at least 32 bits.

◆ AtomicFU64

using mage::AtomicFU64 = typedef std::atomic< FU64 >

The fastest atomic unsigned integer type with width of at least 64 bits.

◆ AtomicFU8

using mage::AtomicFU8 = typedef std::atomic< FU8 >

The fastest atomic unsigned integer type with width of at least 8 bits.

◆ AtomicS16

using mage::AtomicS16 = typedef std::atomic< S16 >

An atomic signed integer type with width of exactly 16 bits.

◆ AtomicS32

using mage::AtomicS32 = typedef std::atomic< S32 >

An atomic signed integer type with width of exactly 32 bits.

◆ AtomicS64

using mage::AtomicS64 = typedef std::atomic< S64 >

An atomic signed integer type with width of exactly 64 bits.

◆ AtomicS8

using mage::AtomicS8 = typedef std::atomic< S8 >

An atomic signed integer type with width of exactly 8 bits.

◆ AtomicU16

using mage::AtomicU16 = typedef std::atomic< U16 >

An atomic unsigned integer type with width of exactly 16 bits.

◆ AtomicU32

using mage::AtomicU32 = typedef std::atomic< U32 >

An atomic unsigned integer type with width of exactly 32 bits.

◆ AtomicU64

using mage::AtomicU64 = typedef std::atomic< U64 >

An atomic unsigned integer type with width of exactly 64 bits.

◆ AtomicU8

using mage::AtomicU8 = typedef std::atomic< U8 >

An atomic unsigned integer type with width of exactly 8 bits.

◆ AxisAlignedBoundingBox

A class of Axis-Aligned Bounding Boxes (AABBs).

◆ C32

using mage::C32 = typedef Complex< F32 >

◆ C64

using mage::C64 = typedef Complex< F64 >

◆ ComPtr

template<typename T >
using mage::ComPtr = typedef Microsoft::WRL::ComPtr< T >

A class of smart pointers for managing shared-ownership COM resources.

Template Parameters
TThe COM resource type.

◆ const_wzstring

using mage::const_wzstring = typedef gsl::cwzstring<>

◆ const_zstring

using mage::const_zstring = typedef gsl::czstring<>

◆ CPUTimer

A class of CPU (i.e. core clock per core) timers.

◆ D32

using mage::D32 = typedef Dual< F32 >

◆ D64

using mage::D64 = typedef Dual< F64 >

◆ F32

using mage::F32 = typedef float

A floating point type with width of exactly 32 bits.

◆ F32x2

using mage::F32x2 = typedef Array< F32, 2u >

A 2x1 vector type for floating points with width of exactly 32 bits.

◆ F32x2A

using mage::F32x2A = typedef Array< F32, 2u, 16u >

A 2x1 vector type for floating points with width of exactly 32 bits with a 16-byte alignment.

◆ F32x3

using mage::F32x3 = typedef Array< F32, 3u >

A 3x1 vector type for floating points with width of exactly 32 bits.

◆ F32x3A

using mage::F32x3A = typedef Array< F32, 3u, 16u >

A 3x1 vector type for floating points with width of exactly 32 bits with a 16-byte alignment.

◆ F32x4

using mage::F32x4 = typedef Array< F32, 4u >

A 4x1 vector type for floating points with width of exactly 32 bits.

◆ F32x4A

using mage::F32x4A = typedef Array< F32, 4u, 16u >

A 4x1 vector type for floating points with width of exactly 32 bits with a 16-byte alignment.

◆ F64

using mage::F64 = typedef double

A floating point type with width of exactly 64 bits.

◆ F64x2

using mage::F64x2 = typedef Array< F64, 2u >

A 2x1 vector type for floating points with width of exactly 64 bits.

◆ F64x3

using mage::F64x3 = typedef Array< F64, 3u >

A 3x1 vector type for floating points with width of exactly 64 bits.

◆ F64x4

using mage::F64x4 = typedef Array< F64, 4u >

A 4x1 vector type for floating points with width of exactly 64 bits.

◆ FS16

using mage::FS16 = typedef std::int_fast16_t

The fastest signed integer type with width of at least 16 bits.

◆ FS16x2

using mage::FS16x2 = typedef Array< FS16, 2u >

A 2x1 vector type for the fastest signed integers with width of at least 16 bits.

◆ FS16x3

using mage::FS16x3 = typedef Array< FS16, 3u >

A 3x1 vector type for the fastest signed integers with width of at least 16 bits.

◆ FS16x4

using mage::FS16x4 = typedef Array< FS16, 4u >

A 4x1 vector type for the fastest signed integers with width of at least 16 bits.

◆ FS32

using mage::FS32 = typedef std::int_fast32_t

The fastest signed integer type with width of at least 32 bits.

◆ FS32x2

using mage::FS32x2 = typedef Array< FS32, 2u >

A 2x1 vector type for the fastest signed integers with width of at least 32 bits.

◆ FS32x3

using mage::FS32x3 = typedef Array< FS32, 3u >

A 3x1 vector type for the fastest signed integers with width of at least 32 bits.

◆ FS32x4

using mage::FS32x4 = typedef Array< FS32, 4u >

A 4x1 vector type for the fastest signed integers with width of at least 32 bits.

◆ FS64

using mage::FS64 = typedef std::int_fast64_t

The fastest signed integer type with width of at least 64 bits.

◆ FS64x2

using mage::FS64x2 = typedef Array< FS64, 2u >

A 2x1 vector type for the fastest signed integers with width of at least 64 bits.

◆ FS64x3

using mage::FS64x3 = typedef Array< FS64, 3u >

A 3x1 vector type for the fastest signed integers with width of at least 64 bits.

◆ FS64x4

using mage::FS64x4 = typedef Array< FS64, 4u >

A 4x1 vector type for the fastest signed integers with width of at least 64 bits.

◆ FS8

using mage::FS8 = typedef std::int_fast8_t

The fastest signed integer type with width of at least 8 bits.

◆ FS8x2

using mage::FS8x2 = typedef Array< FS8, 2u >

A 2x1 vector type for the fastest signed integers with width of at least 8 bits.

◆ FS8x3

using mage::FS8x3 = typedef Array< FS8, 3u >

A 3x1 vector type for the fastest signed integers with width of at least 8 bits.

◆ FS8x4

using mage::FS8x4 = typedef Array< FS8, 4u >

A 4x1 vector type for the fastest signed integers with width of at least 8 bits.

◆ FU16

using mage::FU16 = typedef std::uint_fast16_t

The fastest unsigned integer type with width of at least 16 bits.

◆ FU16x2

using mage::FU16x2 = typedef Array< FU16, 2u >

A 2x1 vector type for the fastest unsigned integers with width of at least 16 bits.

◆ FU16x3

using mage::FU16x3 = typedef Array< FU16, 3u >

A 3x1 vector type for the fastest unsigned integers with width of at least 16 bits.

◆ FU16x4

using mage::FU16x4 = typedef Array< FU16, 4u >

A 4x1 vector type for the fastest unsigned integers with width of at least 16 bits.

◆ FU32

using mage::FU32 = typedef std::uint_fast32_t

The fastest unsigned integer type with width of at least 32 bits.

◆ FU32x2

using mage::FU32x2 = typedef Array< FU32, 2u >

A 2x1 vector type for the fastest unsigned integers with width of at least 32 bits.

◆ FU32x3

using mage::FU32x3 = typedef Array< FU32, 3u >

A 3x1 vector type for the fastest unsigned integers with width of at least 32 bits.

◆ FU32x4

using mage::FU32x4 = typedef Array< FU32, 4u >

A 4x1 vector type for the fastest unsigned integers with width of at least 32 bits.

◆ FU64

using mage::FU64 = typedef std::uint_fast64_t

The fastest unsigned integer type with width of at least 64 bits.

◆ FU64x2

using mage::FU64x2 = typedef Array< FU64, 2u >

A 2x1 vector type for the fastest unsigned integers with width of at least 64 bits.

◆ FU64x3

using mage::FU64x3 = typedef Array< FU64, 3u >

A 3x1 vector type for the fastest unsigned integers with width of at least 64 bits.

◆ FU64x4

using mage::FU64x4 = typedef Array< FU64, 4u >

A 4x1 vector type for the fastest unsigned integers with width of at least 64 bits.

◆ FU8

using mage::FU8 = typedef std::uint_fast8_t

The fastest unsigned integer type with width of at least 8 bits.

◆ FU8x2

using mage::FU8x2 = typedef Array< FU8, 2u >

A 2x1 vector type for the fastest unsigned integers with width of at least 8 bits.

◆ FU8x3

using mage::FU8x3 = typedef Array< FU8, 3u >

A 3x1 vector type for the fastest unsigned integers with width of at least 8 bits.

◆ FU8x4

using mage::FU8x4 = typedef Array< FU8, 4u >

A 4x1 vector type for the fastest unsigned integers with width of at least 8 bits.

◆ H32

using mage::H32 = typedef Hyperbolic< F32 >

◆ H64

using mage::H64 = typedef Hyperbolic< F64 >

◆ MemoryStack

A class of single-ended memory stacks.

◆ NotNull

template<typename T >
using mage::NotNull = typedef gsl::not_null< T >

A class of not-null values.

Template Parameters
TThe null-assignable value or pointer type.

A type for representing not-null values.

◆ S16

using mage::S16 = typedef std::int16_t

A signed integer type with width of exactly 16 bits.

◆ S16x2

using mage::S16x2 = typedef Array< S16, 2u >

A 2x1 vector type for signed integers with width of exactly 16 bits.

◆ S16x3

using mage::S16x3 = typedef Array< S16, 3u >

A 3x1 vector type for signed integers with width of exactly 16 bits.

◆ S16x4

using mage::S16x4 = typedef Array< S16, 4u >

A 4x1 vector type for signed integers with width of exactly 16 bits.

◆ S32

using mage::S32 = typedef std::int32_t

A signed integer type with width of exactly 32 bits.

◆ S32x2

using mage::S32x2 = typedef Array< S32, 2u >

A 2x1 vector type for signed integers with width of exactly 32 bits.

◆ S32x3

using mage::S32x3 = typedef Array< S32, 3u >

A 3x1 vector type for signed integers with width of exactly 32 bits.

◆ S32x4

using mage::S32x4 = typedef Array< S32, 4u >

A 4x1 vector type for signed integers with width of exactly 32 bits.

◆ S64

using mage::S64 = typedef std::int64_t

A signed integer type with width of exactly 64 bits.

◆ S64x2

using mage::S64x2 = typedef Array< S64, 2u >

A 2x1 vector type for signed integers with width of exactly 64 bits.

◆ S64x3

using mage::S64x3 = typedef Array< S64, 3u >

A 3x1 vector type for signed integers with width of exactly 64 bits.

◆ S64x4

using mage::S64x4 = typedef Array< S64, 4u >

A 4x1 vector type for signed integers with width of exactly 64 bits.

◆ S8

using mage::S8 = typedef std::int8_t

A signed integer type with width of exactly 8 bits.

◆ S8x2

using mage::S8x2 = typedef Array< S8, 2u >

A 2x1 vector type for signed integers with width of exactly 8 bits.

◆ S8x3

using mage::S8x3 = typedef Array< S8, 3u >

A 3x1 vector type for signed integers with width of exactly 8 bits.

◆ S8x4

using mage::S8x4 = typedef Array< S8, 4u >

A 4x1 vector type for signed integers with width of exactly 8 bits.

◆ SharedHandle

using mage::SharedHandle = typedef SharedPtr< void >

A class of smart pointers for managing shared-ownership handle resources.

◆ SharedPtr

template<typename T >
using mage::SharedPtr = typedef std::shared_ptr< T >

A class of smart pointers for managing shared-ownership memory resources.

Template Parameters
TThe memory resource type.

◆ TimeIntervalSeconds

using mage::TimeIntervalSeconds = typedef std::chrono::duration< F64 >

A time interval type expressed in seconds.

◆ TimeStampSeconds

using mage::TimeStampSeconds = typedef std::chrono::duration< F64 >

A time stamp type expressed in seconds.

◆ U16

using mage::U16 = typedef std::uint16_t

An unsigned integer type with width of exactly 16 bits.

◆ U16x2

using mage::U16x2 = typedef Array< U16, 2u >

A 2x1 vector type for unsigned integers with width of exactly 16 bits.

◆ U16x3

using mage::U16x3 = typedef Array< U16, 3u >

A 3x1 vector type for unsigned integers with width of exactly 16 bits.

◆ U16x4

using mage::U16x4 = typedef Array< U16, 4u >

A 4x1 vector type for unsigned integers with width of exactly 16 bits.

◆ U32

using mage::U32 = typedef std::uint32_t

An unsigned integer type with width of exactly 32 bits.

◆ U32x2

using mage::U32x2 = typedef Array< U32, 2u >

A 2x1 vector type for unsigned integers with width of exactly 32 bits.

◆ U32x3

using mage::U32x3 = typedef Array< U32, 3u >

A 3x1 vector type for unsigned integers with width of exactly 32 bits.

◆ U32x4

using mage::U32x4 = typedef Array< U32, 4u >

A 4x1 vector type for unsigned integers with width of exactly 32 bits.

◆ U64

using mage::U64 = typedef std::uint64_t

An unsigned integer type with width of exactly 64 bits.

◆ U64x2

using mage::U64x2 = typedef Array< U64, 2u >

A 2x1 vector type for unsigned integers with width of exactly 64 bits.

◆ U64x3

using mage::U64x3 = typedef Array< U64, 3u >

A 3x1 vector type for unsigned integers with width of exactly 64 bits.

◆ U64x4

using mage::U64x4 = typedef Array< U64, 4u >

A 4x1 vector type for unsigned integers with width of exactly 64 bits.

◆ U8

using mage::U8 = typedef std::uint8_t

An unsigned integer type with width of exactly 8 bits.

◆ U8x2

using mage::U8x2 = typedef Array< U8, 2u >

A 2x1 vector type for unsigned integers with width of exactly 8 bits.

◆ U8x3

using mage::U8x3 = typedef Array< U8, 3u >

A 3x1 vector type for unsigned integers with width of exactly 8 bits.

◆ U8x4

using mage::U8x4 = typedef Array< U8, 4u >

A 4x1 vector type for unsigned integers with width of exactly 8 bits.

◆ UniqueFileStream

A class of smart pointers for managing exclusive-ownership file streams.

◆ UniqueHandle

A class of smart pointers for managing exclusive-ownership handle resources.

◆ UniquePtr

template<typename T , typename DeleterT = std::default_delete< T >>
using mage::UniquePtr = typedef std::unique_ptr< T, DeleterT >

A class of smart pointers for managing exclusive-ownership memory resources.

Template Parameters
TThe memory resource type.
DeleterTThe deleter type.

◆ Value

using mage::Value = typedef std::variant< bool, F32, F32x2, F32x3, F32x4, S32, S32x2, S32x3, S32x4, U32, U32x2, U32x3, U32x4, std::string >

A value type for representing the types of variables.

◆ ValueMap

using mage::ValueMap = typedef std::map< std::string, Value, std::less<> >

A value map type for representing the mapping type between the name and value of variables.

◆ WallClockTimer

using mage::WallClockTimer = typedef Timer< std::chrono::high_resolution_clock >

A class of wall clock timers.

◆ WeakPtr

template<typename T >
using mage::WeakPtr = typedef std::weak_ptr< T >

A class of smart pointers for referencing but not managing shared-ownership memory resources.

Template Parameters
TThe memory resource type.

◆ wzstring

using mage::wzstring = typedef gsl::wzstring<>

◆ zstring

using mage::zstring = typedef gsl::zstring<>

Enumeration Type Documentation

◆ Coverage

enum mage::Coverage : U8
strong

An enumeration of the different coverages for bounding volumes.

This contains: NoCoverage, PartialCoverage and FullCoverage.

Enumerator
NoCoverage 
PartialCoverage 
FullCoverage 

◆ HotKey

enum mage::HotKey : U8
strong

An enumeration of the different hot keys registered by windows.

This contains: Unused, PrintScreen, and AltPrintScreen.

Enumerator
Unused 
PrintScreen 
AltPrintScreen 

◆ MessageDisposition

An enumeration of message dispositions.

This contains: Ignore, Continue and Abort.

Enumerator
Ignore 
Continue 
Abort 

◆ State

enum mage::State : U8
strong

An enumeration of the different states.

This contains: Active, Passive and Terminated.

Enumerator
Active 
Passive 
Terminated 

Function Documentation

◆ AbsoluteToNormalized() [1/3]

F32 mage::AbsoluteToNormalized ( F32  p,
F32  resolution 
)
noexcept

◆ AbsoluteToNormalized() [2/3]

const F32x2 mage::AbsoluteToNormalized ( const F32x2 p,
const F32x2 resolution 
)
noexcept

◆ AbsoluteToNormalized() [3/3]

const XMVECTOR XM_CALLCONV mage::AbsoluteToNormalized ( FXMVECTOR  p,
FXMVECTOR  resolution 
)
noexcept

◆ AddElement()

template<typename ElementT , typename... ConstructorArgsT>
ProxyPtr< ElementT > mage::AddElement ( AlignedVector< ElementT > &  elements,
ConstructorArgsT &&...  args 
)

◆ AddElementPtr()

template<typename ElementT , typename BaseT , typename... ConstructorArgsT>
ProxyPtr< ElementT > mage::AddElementPtr ( AlignedVector< UniquePtr< BaseT > > &  elements,
ConstructorArgsT &&...  args 
)

◆ AddUnhandledExceptionFilter()

void mage::AddUnhandledExceptionFilter ( )
noexcept

◆ AllocAligned()

void* mage::AllocAligned ( std::size_t  size,
std::size_t  alignment 
)
noexcept

Allocates memory on a given alignment boundary of the given size.

Precondition
alignment must be an integer power of 2.
Parameters
[in]sizeThe requested size in bytes to allocate in memory.
[in]alignmentThe alignment in bytes.
Returns
nullptr if the allocation failed.
A pointer to the memory block that was allocated. The pointer is a multiple of the given alignment.

◆ AllocAlignedData()

template<typename T >
T* mage::AllocAlignedData ( std::size_t  count,
size_t  alignment 
)
noexcept

Allocates memory on a given alignment boundary.

Template Parameters
TThe data type.
Parameters
[in]countThe number of objects of type T to allocate in memory.
[in]alignmentThe alignment in bytes.
Returns
nullptr if the allocation failed.
A pointer to the memory block that was allocated. The pointer is a multiple of the given alignment.

◆ AppendWrite() [1/4]

template<typename OutputIt , typename... ArgsT>
OutputIt mage::AppendWrite ( OutputIt  it,
std::string_view  format_str,
const ArgsT &...  args 
)

◆ AppendWrite() [2/4]

template<typename OutputIt , typename... ArgsT>
OutputIt mage::AppendWrite ( OutputIt  it,
std::wstring_view  format_str,
const ArgsT &...  args 
)

◆ AppendWrite() [3/4]

template<typename OutputIt , typename... ArgsT>
OutputIt mage::AppendWrite ( OutputIt  it,
std::size_t  length,
std::string_view  format_str,
const ArgsT &...  args 
)

◆ AppendWrite() [4/4]

template<typename OutputIt , typename... ArgsT>
OutputIt mage::AppendWrite ( OutputIt  it,
std::size_t  length,
std::wstring_view  format_str,
const ArgsT &...  args 
)

◆ ArrayToTupple()

template<typename T , std::size_t N>
constexpr const auto mage::ArrayToTupple ( const std::array< T, N > &  a)

◆ BitsPerPixel()

constexpr U32 mage::BitsPerPixel ( DXGI_FORMAT  format)
noexcept

Returns the number of bits per pixel of the given DXGI format.

Parameters
[in]formatThe DXGI format.
Returns
The number of bits per pixel of the given DXGI format.

◆ BytesBigEndianTo()

template<typename T >
const T mage::BytesBigEndianTo ( NotNull< const U8 * >  bytes)
noexcept

Reads a T element from the given big endian byte array.

Precondition
The given byte array must contain at least sizeof(T) bytes.
Template Parameters
TThe data type.
Parameters
[in]bytesA pointer to a big endian byte array.
Returns
The T element represented by the big endian byte array bytes.

◆ BytesLittleEndianTo()

template<typename T >
const T mage::BytesLittleEndianTo ( NotNull< const U8 * >  bytes)
noexcept

Reads a T element from the given little endian byte array.

Precondition
The given byte array must contain at least sizeof(T) bytes.
Template Parameters
TThe data type.
Parameters
[in]bytesA pointer to a little endian byte array.
Returns
The T element represented by the little endian byte array bytes.

◆ BytesTo()

template<typename T >
const T mage::BytesTo ( NotNull< const U8 * >  bytes,
bool  big_endian 
)
noexcept

Reads a T element from the given byte array.

Precondition
The given byte array must contain at least sizeof(T) bytes.
Template Parameters
TThe data type.
Parameters
[in]bytesA pointer to a byte array.
[in]big_endiantrue if the given byte array should be interpreted as big endian. false otherwise (i.e. little endian).
Returns
The T element represented by the byte array bytes.

◆ ClampAngleDegrees()

F32 mage::ClampAngleDegrees ( F32  angle,
F32  min_angle,
F32  max_angle 
)
noexcept

Clamps the given angle (in degrees) between the given minimum and maximum angle (in degrees).

Precondition
min_angle lies in [-180, 180].
max_angle lies in [-180, 180].
min_angle is not greater than max_angle.
Parameters
[in]angleThe angle (in degrees).
[in]min_angleThe minimum angle (in degrees).
[in]max_angleThe maximum angle (in degrees).
Returns
The clamped angle between the given minimum and maximum angle (in degrees).

◆ ClampAngleRadians() [1/2]

F32 mage::ClampAngleRadians ( F32  angle,
F32  min_angle,
F32  max_angle 
)
noexcept

Clamps the given angle (in radians) between the given minimum and maximum angle (in radians).

Precondition
min_angle lies in [-pi, pi].
max_angle lies in [-pi, pi].
min_angle is not greater than max_angle.
Parameters
[in]angleThe angle (in radians).
[in]min_angleThe minimum angle (in radians).
[in]max_angleThe maximum angle (in radians).
Returns
The clamped angle between the given minimum and maximum angle (in radians).

◆ ClampAngleRadians() [2/2]

const XMVECTOR XM_CALLCONV mage::ClampAngleRadians ( FXMVECTOR  angles,
FXMVECTOR  min_angles,
FXMVECTOR  max_angles 
)
noexcept

Clamps the given angles (in radians) between the given minimum and maximum angles (in radians).

Precondition
min_angles lies in [-pi, pi].
max_angles lies in [-pi, pi].
min_angles is not greater than max_angles.
Parameters
[in]anglesThe angles (in radians).
[in]min_anglesThe minimum angles (in radians).
[in]max_anglesThe maximum angles (in radians).
Returns
The clamped angles between the given minimum and maximum angles (in radians).

◆ Classify() [1/3]

template<typename BoundingVolumeT , typename BoundingVolumeU >
Coverage mage::Classify ( const BoundingVolumeT &  volume1,
const BoundingVolumeU &  volume2 
)
noexcept

Classifies the second given bounding volume with regard to the first given bounding volume.

Template Parameters
BoundingVolumeTThe first bounding volume type.
BoundingVolumeUThe second bounding volume type.
Parameters
[in]volume1A reference to the first bounding volume.
[in]volume2A reference to the second bounding volume.
Returns
The coverage of volume2 with regard to volume1.

◆ Classify() [2/3]

template<typename BoundingVolumeT >
Coverage XM_CALLCONV mage::Classify ( const BoundingVolumeT &  volume,
FXMVECTOR  point,
F32  epsilon 
)
noexcept

Classifies the given point with regard to the given bounding volume.

Template Parameters
BoundingVolumeTThe bounding volume type.
Parameters
[in]volumeA reference to the bounding volume.
[in]pointThe point.
[in]epsilonThe epsilon value.
Returns
The coverage of point with regard to volume.

◆ Classify() [3/3]

template<typename BoundingVolumeT >
Coverage mage::Classify ( const BoundingVolumeT &  volume,
const Point3 point,
F32  epsilon 
)
noexcept

Classifies the given point with regard to the given bounding volume.

Template Parameters
BoundingVolumeTThe bounding volume type.
Parameters
[in]volumeA reference to the bounding volume.
[in]pointA reference to the point.
[in]epsilonThe epsilon value.
Returns
The coverage of point with regard to volume.

◆ ComboBoxAdd()

void mage::ComboBoxAdd ( NotNull< HWND >  dialog,
int  id,
const void *  data,
NotNull< const_wzstring desc 
)
noexcept

Adds an item associated with the given data and described with the given descriptor to a combo box.

Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
[in]dataA pointer to the data of the item to add.
[in]descThe description of the item to add.

◆ ComboBoxAddPtr()

template<typename T >
void mage::ComboBoxAddPtr ( NotNull< HWND >  dialog,
int  id,
const T *  ptr,
NotNull< const_wzstring desc 
)
noexcept

Adds an item associated with the given pointer and described with the given descriptor to a combo box.

Template Parameters
TThe data type.
Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
[in]ptrThe pointer of the item to add.
[in]descThe description of the item to add.

◆ ComboBoxAddValue()

void mage::ComboBoxAddValue ( NotNull< HWND >  dialog,
int  id,
std::size_t  value,
NotNull< const_wzstring desc 
)
noexcept

Adds an item associated with the given value and described with the given descriptor to a combo box.

Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
[in]valueThe value of the item to add.
[in]descThe description of the item to add.

◆ ComboBoxContains()

bool mage::ComboBoxContains ( NotNull< HWND >  dialog,
int  id,
NotNull< const_wzstring desc 
)
noexcept

Checks whether a combo box contains the given descriptor.

Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
[in]descThe string description to check.
Returns
true if the given description is contained in the combo box. false otherwise.

◆ ComboBoxCount()

int mage::ComboBoxCount ( NotNull< HWND >  dialog,
int  id 
)
noexcept

Returns the number of items in a combo box.

Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
Returns
The number of items of a combo box.

◆ ComboBoxSelect() [1/2]

void mage::ComboBoxSelect ( NotNull< HWND >  dialog,
int  id,
int  index 
)
noexcept

Selects the item at the given index in a combo box.

Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
[in]indexThe index of the item.

◆ ComboBoxSelect() [2/2]

void mage::ComboBoxSelect ( NotNull< HWND >  dialog,
int  id,
const void *  data 
)
noexcept

Selects the item associated with the given data in a combo box.

Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
[in]dataA pointer to the data of the item.

◆ ComboBoxSelected()

const void * mage::ComboBoxSelected ( NotNull< HWND >  dialog,
int  id 
)
noexcept

Returns the data associated with the selected item in a combo box.

Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
Returns
nullptr if the combo box has no items.
A pointer to the data associated with the selected item in the combo box.

◆ ComboBoxSelectedPtr()

template<typename T >
const T* mage::ComboBoxSelectedPtr ( NotNull< HWND >  dialog,
int  id 
)
noexcept

Returns the pointer associated with the selected item in a combo box.

Precondition
The combo box must have at least one item.
Template Parameters
TThe data type.
Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
Returns
The pointer associated with the selected item in a combo box.
Note
This function converts the void * data to T* data.

◆ ComboBoxSelectedValue()

std::size_t mage::ComboBoxSelectedValue ( NotNull< HWND >  dialog,
int  id 
)
noexcept

Returns the value associated with the selected item in a combo box.

Precondition
The combo box must have at least one item.
Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
Returns
The value associated with the selected item in a combo box.
Note
This function converts the void * data to std::size_t data.

◆ ComboBoxSelectPtr()

template<typename T >
void mage::ComboBoxSelectPtr ( NotNull< HWND >  dialog,
int  id,
const T *  ptr 
)
noexcept

Selects the item associated with the given pointer in a combo box.

Template Parameters
TThe data type.
Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
[in]ptrThe pointer of the item to add.

◆ ComboBoxSelectValue()

void mage::ComboBoxSelectValue ( NotNull< HWND >  dialog,
int  id,
std::size_t  value 
)
noexcept

Selects the item associated with the given value in a combo box.

Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
[in]valueThe value of the item to add.

◆ ComboBoxSomethingSelected()

bool mage::ComboBoxSomethingSelected ( NotNull< HWND >  dialog,
int  id 
)
noexcept

Checks whether a valid item is selected in a combo box.

Parameters
[in]dialogA handle to the dialog box that contains the control.
[in]idThe identifier of the control to be retrieved.
Returns
true if a valid item is selected in the combo box. false otherwise.

◆ ConsoleWidth()

FU16 mage::ConsoleWidth ( )

Returns the fixed console width.

Returns
The fixed console width.
Exceptions
ExceptionFailed to retrieve a valid handle to the standard output device.
ExceptionFailed to retrieve the screen buffer info of the console.

◆ const_pointer_cast() [1/3]

template<typename ToT , typename FromT >
UniquePtr< ToT > mage::const_pointer_cast ( UniquePtr< FromT > &&  ptr)
noexcept

Creates a unique pointer whose stored pointer is obtained by const casting the stored pointer of the given unique pointer.

Template Parameters
ToTThe conversion to-type.
FromTThe conversion from-type.
Parameters
[in]ptrA reference to the unique pointer to cast.
Returns
The moved unique pointer.

◆ const_pointer_cast() [2/3]

template<typename ToT , typename FromT >
ProxyPtr< ToT > mage::const_pointer_cast ( const ProxyPtr< FromT > &  ptr)
noexcept

Creates a proxy pointer whose stored getter is obtained by const casting the stored getter of the given proxy pointer.

Template Parameters
ToTThe conversion to-type.
FromTThe conversion from-type.
Parameters
[in]ptrA reference to the proxy pointer to cast.
Returns
The moved proxy pointer.

◆ const_pointer_cast() [3/3]

template<typename ToT , typename FromT >
ProxyPtr< ToT > mage::const_pointer_cast ( ProxyPtr< FromT > &&  ptr)
noexcept

Creates a proxy pointer whose stored getter is obtained by const casting the stored getter of the given proxy pointer.

Template Parameters
ToTThe conversion to-type.
FromTThe conversion from-type.
Parameters
[in]ptrA reference to the proxy pointer to cast.
Returns
The moved proxy pointer.

◆ ConvertToSRGB()

constexpr DXGI_FORMAT mage::ConvertToSRGB ( DXGI_FORMAT  format)
noexcept

Converts the given DXGI format to an sRGB DXGI format.

Parameters
[in]formatThe DXGI format.
Returns
The matching sRGB converted DXGI format of the given DXGI format.

◆ CosineWeightedSampleOnUnitHemisphere()

const F32x3 mage::CosineWeightedSampleOnUnitHemisphere ( F32  u1,
F32  u2 
)
noexcept

◆ CreateEngine()

UniquePtr< Engine > mage::CreateEngine ( const EngineSetup setup)

◆ CreateMiniDump()

void mage::CreateMiniDump ( EXCEPTION_POINTERS *  exception_record)
noexcept

◆ CreateSharedHandle()

SharedHandle mage::CreateSharedHandle ( HANDLE  handle)

Creates a shared handle for the given handle.

Parameters
[in]handleA handle.
Returns
A shared handle for the given handle handle.

◆ CreateUniqueHandle()

UniqueHandle mage::CreateUniqueHandle ( HANDLE  handle)

Creates a unique handle for the given handle.

Parameters
[in]handleA handle.
Returns
A unique handle for the given handle handle.

◆ Debug() [1/2]

template<typename... ArgsT>
void mage::Debug ( [[maybe_unused] ] std::string_view  format_str,
[[maybe_unused] ] const ArgsT &...  args 
)

Logs a debug message.

A debug message is associated with generally useful information to log only in debug builds.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ Debug() [2/2]

template<typename... ArgsT>
void mage::Debug ( [[maybe_unused] ] std::wstring_view  format_str,
[[maybe_unused] ] const ArgsT &...  args 
)

Logs a debug message.

A debug message is associated with generally useful information to log only in debug builds.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ dynamic_pointer_cast() [1/3]

template<typename ToT , typename FromT >
UniquePtr< ToT > mage::dynamic_pointer_cast ( UniquePtr< FromT > &&  ptr)
noexcept

Creates a unique pointer whose stored pointer is obtained by dynamically casting the stored pointer of the given unique pointer.

Template Parameters
ToTThe conversion to-type.
FromTThe conversion from-type.
Parameters
[in]ptrA reference to the unique pointer to cast.
Returns
The moved unique pointer.

◆ dynamic_pointer_cast() [2/3]

template<typename ToT , typename FromT >
ProxyPtr< ToT > mage::dynamic_pointer_cast ( const ProxyPtr< FromT > &  ptr)
noexcept

Creates a proxy pointer whose stored getter is obtained by dynamically casting the stored getter of the given proxy pointer.

Template Parameters
ToTThe conversion to-type.
FromTThe conversion from-type.
Parameters
[in]ptrA reference to the proxy pointer to cast.
Returns
The moved proxy pointer.

◆ dynamic_pointer_cast() [3/3]

template<typename ToT , typename FromT >
ProxyPtr< ToT > mage::dynamic_pointer_cast ( ProxyPtr< FromT > &&  ptr)
noexcept

Creates a proxy pointer whose stored getter is obtained by dynamically casting the stored getter of the given proxy pointer.

Template Parameters
ToTThe conversion to-type.
FromTThe conversion from-type.
Parameters
[in]ptrA reference to the proxy pointer to cast.
Returns
The moved proxy pointer.

◆ EnlargeArray()

template<std::size_t ToN, typename T , std::size_t FromN>
constexpr const auto mage::EnlargeArray ( const std::array< T, FromN > &  a)

◆ EraseIf()

template<typename ContainerT , typename PredicateT >
decltype(auto) mage::EraseIf ( ContainerT &  container,
PredicateT &&  predicate 
)

Erases all the elements of the given container that satisfy the given predicate.

Template Parameters
ContainerTThe container type.
PredicateTThe predicate type.
Parameters
[in,out]containerA reference to the container.
[in]predicateA reference to the predicate.
Returns
The iterator following the last removed element.

◆ Error() [1/2]

template<typename... ArgsT>
void mage::Error ( std::string_view  format_str,
const ArgsT &...  args 
)

Logs an error message.

An error message is associated with any error which is fatal to the operation, but not the service or application.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ Error() [2/2]

template<typename... ArgsT>
void mage::Error ( std::wstring_view  format_str,
const ArgsT &...  args 
)

Logs an error message.

An error message is associated with any error which is fatal to the operation, but not the service or application.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ Fatal() [1/2]

template<typename... ArgsT>
void mage::Fatal ( std::string_view  format_str,
const ArgsT &...  args 
)

Logs a fatal message.

A fatal message is associated with any error that is forcing a shutdown of the service or application to prevent data loss (or further data loss).

Template Parameters
ArgsTThe format argument types.
Parameters
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ Fatal() [2/2]

template<typename... ArgsT>
void mage::Fatal ( std::wstring_view  format_str,
const ArgsT &...  args 
)

Logs a fatal message.

A fatal message is associated with any error that is forcing a shutdown of the service or application to prevent data loss (or further data loss).

Template Parameters
ArgsTThe format argument types.
Parameters
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ FibonacciSpiralCosineWeightedSamplesOnUnitHemisphere()

void mage::FibonacciSpiralCosineWeightedSamplesOnUnitHemisphere ( gsl::span< F32x3 samples,
F32  shift 
)
noexcept

◆ FibonacciSpiralSamplesInUnitCircle()

void mage::FibonacciSpiralSamplesInUnitCircle ( gsl::span< F32x2 samples,
F32  shift,
F32  alpha 
)
noexcept

◆ FibonacciSpiralSamplesOnUnitHemisphere()

void mage::FibonacciSpiralSamplesOnUnitHemisphere ( gsl::span< F32x3 samples,
F32  shift,
bool  positive 
)
noexcept

◆ FibonacciSpiralSamplesOnUnitSphere()

void mage::FibonacciSpiralSamplesOnUnitSphere ( gsl::span< F32x3 samples,
F32  shift 
)
noexcept

◆ FillArray()

template<typename T , std::size_t N>
constexpr const auto mage::FillArray ( const T &  value)

◆ Format()

template<typename StringT , typename... ArgsT>
const auto mage::Format ( const StringT &  format_str,
const ArgsT &...  args 
)

◆ FreeAligned()

void mage::FreeAligned ( void *  ptr)
noexcept

Frees a block of memory that was allocated with mage::AllocAligned(std::size_t, std::size_t) or mage::AllocAlignedData<T>(std::size_t, std::size_t).

Parameters
[in]ptrA pointer to the memory block that was allocated.

◆ GetAffineTransformationMatrix() [1/4]

const XMMATRIX XM_CALLCONV mage::GetAffineTransformationMatrix ( FXMVECTOR  scale,
FXMVECTOR  rotation,
FXMVECTOR  translation 
)
noexcept

◆ GetAffineTransformationMatrix() [2/4]

const XMMATRIX XM_CALLCONV mage::GetAffineTransformationMatrix ( F32  scale,
FXMVECTOR  rotation,
FXMVECTOR  translation 
)
noexcept

◆ GetAffineTransformationMatrix() [3/4]

const XMMATRIX XM_CALLCONV mage::GetAffineTransformationMatrix ( FXMVECTOR  scale,
F32  rotation,
FXMVECTOR  translation 
)
noexcept

◆ GetAffineTransformationMatrix() [4/4]

const XMMATRIX XM_CALLCONV mage::GetAffineTransformationMatrix ( FXMVECTOR  offset,
FXMVECTOR  scale,
F32  rotation,
FXMVECTOR  translation 
)
noexcept

◆ GetDialogCaller()

template<typename CallerT >
CallerT* mage::GetDialogCaller ( NotNull< HWND >  dialog,
UINT  message,
[[maybe_unused] ] WPARAM  wParam,
LPARAM  lParam 
)
noexcept

Returns the caller of DialogBoxParam.

Precondition
The lParam formal parameter of DialogBoxParam should be initialized to this and this should point to an instance of type CallerT.
Template Parameters
CallerTThe caller type.
Parameters
[in]dialogA handle to the dialog box.
[in]messageThe message.
[in]wParamAdditional message-specific information.
[in]lParamAdditional message-specific information.
Returns
A pointer to the caller of DialogBoxParam.

◆ GetInverseAffineTransformationMatrix() [1/2]

const XMMATRIX XM_CALLCONV mage::GetInverseAffineTransformationMatrix ( FXMVECTOR  scale,
FXMVECTOR  rotation,
FXMVECTOR  translation 
)
noexcept

◆ GetInverseAffineTransformationMatrix() [2/2]

const XMMATRIX XM_CALLCONV mage::GetInverseAffineTransformationMatrix ( F32  scale,
FXMVECTOR  rotation,
FXMVECTOR  translation 
)
noexcept

◆ GetInverseRollPitchYawMatrix()

const XMMATRIX XM_CALLCONV mage::GetInverseRollPitchYawMatrix ( FXMVECTOR  rotation)
noexcept

◆ GetInverseRollPitchYawQuaternion()

const XMVECTOR XM_CALLCONV mage::GetInverseRollPitchYawQuaternion ( FXMVECTOR  rotation)
noexcept

◆ GetInverseScalingMatrix() [1/2]

const XMMATRIX XM_CALLCONV mage::GetInverseScalingMatrix ( FXMVECTOR  scale)
noexcept

◆ GetInverseScalingMatrix() [2/2]

const XMMATRIX XM_CALLCONV mage::GetInverseScalingMatrix ( F32  scale)
noexcept

◆ GetInverseTranslationMatrix()

const XMMATRIX XM_CALLCONV mage::GetInverseTranslationMatrix ( FXMVECTOR  translation)
noexcept

◆ GetLocalSystemDateAndTimeAsString()

const std::wstring mage::GetLocalSystemDateAndTimeAsString ( )

Returns the current local system date and time as a string.

Returns
The current local system date and time as a string.

◆ GetLocalSystemDateAsString()

const std::wstring mage::GetLocalSystemDateAsString ( )

Returns the current local system date as a string.

Returns
The current local system date as a string.

◆ GetLocalSystemTimeAsString()

const std::wstring mage::GetLocalSystemTimeAsString ( )

Returns the current local system time as a string.

Returns
The current local system time as a string.

◆ GetNDCZConstructionValues()

const XMVECTOR XM_CALLCONV mage::GetNDCZConstructionValues ( FXMMATRIX  projection_matrix)
noexcept

Returns the projection values from the given projection matrix to construct the NDC z-coordinate from the view z-coordinate.

Parameters
[in]projection_matrixThe projection matrix.
Returns
The projection values from the given projection matrix to construct the NDC z-coordinate from the view z-coordinate.

◆ GetNextGuid()

U64 mage::GetNextGuid ( )
noexcept

Returns the next guid.

Returns
The next guid.

◆ GetPhysicalMemoryUsage()

U64 mage::GetPhysicalMemoryUsage ( )
noexcept

Retrieves the current working set size (in bytes) of the running process.

Returns
If the retrieval fails, the return value is zero. To get extended error information, call GetLastError.
If the retrieval succeeds, the total physical memory usage of this process (in bytes).

◆ GetRollPitchYawMatrix()

const XMMATRIX XM_CALLCONV mage::GetRollPitchYawMatrix ( FXMVECTOR  rotation)
noexcept

◆ GetRollPitchYawQuaternion()

const XMVECTOR XM_CALLCONV mage::GetRollPitchYawQuaternion ( FXMVECTOR  rotation)
noexcept

◆ GetScalingMatrix() [1/2]

const XMMATRIX XM_CALLCONV mage::GetScalingMatrix ( FXMVECTOR  scale)
noexcept

◆ GetScalingMatrix() [2/2]

const XMMATRIX XM_CALLCONV mage::GetScalingMatrix ( F32  scale)
noexcept

◆ GetTranslationMatrix()

const XMMATRIX XM_CALLCONV mage::GetTranslationMatrix ( FXMVECTOR  translation)
noexcept

◆ GetVersionMajor()

constexpr U32 mage::GetVersionMajor ( )
noexcept

Returns the version major number.

Returns
The version major number.

◆ GetVersionMinor()

constexpr U32 mage::GetVersionMinor ( )
noexcept

Returns the version minor number.

Returns
The version minor number.

◆ GetVersionPatch()

constexpr U32 mage::GetVersionPatch ( )
noexcept

Returns the version patch number.

Returns
The version patch number.

◆ GetVirtualMemoryUsage()

U64 mage::GetVirtualMemoryUsage ( )
noexcept

Retrieves the total amount of memory (in bytes) that the memory manager has committed to the running process.

Returns
If the retrieval fails, the return value is zero. To get extended error information, call GetLastError.
If the retrieval succeeds, the total virtual memory usage of this process (in bytes).

◆ GetWindowCaller()

template<typename CallerT >
CallerT* mage::GetWindowCaller ( NotNull< HWND >  window,
UINT  message,
[[maybe_unused] ] WPARAM  wParam,
LPARAM  lParam 
)
noexcept

Returns the caller of CreateWindow or CreateWindowEx.

Precondition
The lpParam formal parameter of CreateWindow or CreateWindowEx should be initialized to this and this should point to an instance of type CallerT.
Template Parameters
CallerTThe caller type.
Parameters
[in]windowA handle to the window.
[in]messageThe message.
[in]wParamAdditional message-specific information.
[in]lParamAdditional message-specific information.
Returns
A pointer to the caller of CreateWindow or CreateWindowEx.

◆ Halton()

void mage::Halton ( std::size_t  index,
gsl::span< F32 sample 
)
noexcept

◆ Halton2D()

const F32x2 mage::Halton2D ( std::size_t  index)
noexcept

◆ Halton3D()

const F32x3 mage::Halton3D ( std::size_t  index)
noexcept

◆ Halton4D()

const F32x4 mage::Halton4D ( std::size_t  index)
noexcept

◆ Hammersley()

void mage::Hammersley ( std::size_t  index,
gsl::span< F32 sample,
std::size_t  nb_samples 
)
noexcept

◆ Hammersley2D()

const F32x2 mage::Hammersley2D ( std::size_t  index,
std::size_t  nb_samples 
)
noexcept

◆ Hammersley3D()

const F32x3 mage::Hammersley3D ( std::size_t  index,
std::size_t  nb_samples 
)
noexcept

◆ Hammersley4D()

const F32x4 mage::Hammersley4D ( std::size_t  index,
std::size_t  nb_samples 
)
noexcept

◆ Info() [1/2]

template<typename... ArgsT>
void mage::Info ( std::string_view  format_str,
const ArgsT &...  args 
)

Logs an info message.

An info message is associated with generally useful information to log.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ Info() [2/2]

template<typename... ArgsT>
void mage::Info ( std::wstring_view  format_str,
const ArgsT &...  args 
)

Logs an info message.

An info message is associated with generally useful information to log.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ InitializeConsole()

void mage::InitializeConsole ( )

Allocates a console for basic IO and redirects stdin, stdout and stderr to this allocated console.

Exceptions
ExceptionFailed to initialize the console.

◆ InvertHandness() [1/4]

constexpr const UV mage::InvertHandness ( const UV uv)
noexcept

Inverts the handness of the given set of UV texture coordinates.

Parameters
[in]uvA reference to the set of UV texture coordinates.
Returns
The set of UV texture coordinates with inverted handness.

◆ InvertHandness() [2/4]

constexpr const Point3 mage::InvertHandness ( const Point3 point)
noexcept

Inverts the handness of the given point.

Parameters
[in]pointA reference to the point.
Returns
The point with inverted handness.

◆ InvertHandness() [3/4]

constexpr const Normal3 mage::InvertHandness ( const Normal3 normal)
noexcept

Inverts the handness of the given normal.

Parameters
[in]normalA reference to the normal.
Returns
The normal with inverted handness.

◆ InvertHandness() [4/4]

constexpr const Direction3 mage::InvertHandness ( const Direction3 direction)
noexcept

Inverts the handness of the given direction.

Parameters
[in]directionA reference to the direction.
Returns
The direction with inverted handness.

◆ Log() [1/2]

template<typename... ArgsT>
void mage::Log ( MessageDisposition  disposition,
std::string_view  format_str,
const ArgsT &...  args 
)

Logs a message.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]dispositionThe message disposition.
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ Log() [2/2]

template<typename... ArgsT>
void mage::Log ( MessageDisposition  disposition,
std::wstring_view  format_str,
const ArgsT &...  args 
)

Logs a message.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]dispositionThe message disposition.
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ MakeAllocatedShared()

template<typename T , typename... ConstructorArgsT>
SharedPtr< T > mage::MakeAllocatedShared ( ConstructorArgsT &&...  args)

Constructs an object of type T.

The custom allocator is used for constructing the object of type T.

Template Parameters
TThe type.
ConstructorArgsTThe constructor argument types.
Parameters
[in]argsA reference to the constructor arguments.
Returns
A shared pointer to the constructed object of type T.

◆ MakeShared()

template<typename T , typename... ConstructorArgsT>
SharedPtr< T > mage::MakeShared ( ConstructorArgsT &&...  args)

Constructs an object of type T.

No custom allocator is used for constructing the object of type T.

Template Parameters
TThe type.
ConstructorArgsTThe constructor argument types.
Parameters
[in]argsA reference to the constructor arguments.
Returns
A shared pointer to the constructed object of type T.

◆ MakeUnique()

template<typename T , typename... ConstructorArgsT>
UniquePtr< T > mage::MakeUnique ( ConstructorArgsT &&...  args)

Constructs an object of type T.

Template Parameters
TThe type.
ConstructorArgsTThe constructor argument types.
Parameters
[in]argsA reference to the constructor arguments.
Returns
A unique pointer to the constructed object of type T.

◆ NormalizedToAbsolute() [1/3]

F32 mage::NormalizedToAbsolute ( F32  p,
F32  resolution 
)
noexcept

◆ NormalizedToAbsolute() [2/3]

const F32x2 mage::NormalizedToAbsolute ( const F32x2 p,
const F32x2 resolution 
)
noexcept

◆ NormalizedToAbsolute() [3/3]

const XMVECTOR XM_CALLCONV mage::NormalizedToAbsolute ( FXMVECTOR  p,
FXMVECTOR  resolution 
)
noexcept

◆ NumberOfPhysicalCores()

FU16 mage::NumberOfPhysicalCores ( )

Returns the number of physical cores (i.e. physical processors).

Returns
The number of physical cores (i.e. physical processors).

◆ NumberOfSystemCores()

FU16 mage::NumberOfSystemCores ( )
noexcept

Returns the number of system cores (i.e. logical processors).

Returns
The number of system cores (i.e. logical processors).

◆ operator!=() [1/2]

template<typename T >
bool mage::operator!= ( const ProxyPtr< T > &  lhs,
std::nullptr_t   
)
noexcept

Checks whether the given proxy pointer is not equal to nullptr.

Template Parameters
TThe memory resource type.
Parameters
[in]lhsA reference to the proxy pointer.
Returns
true if the given proxy pointer is equal to nullptr. false otherwise.

◆ operator!=() [2/2]

template<typename T >
bool mage::operator!= ( std::nullptr_t  ,
const ProxyPtr< T > &  rhs 
)
noexcept

Checks whether the given proxy pointer is not equal to nullptr.

Template Parameters
TThe memory resource type.
Parameters
[in]rhsA reference to the proxy pointer.
Returns
true if the given proxy pointer is equal to nullptr. false otherwise.

◆ operator*() [1/3]

template<typename T >
constexpr const Hyperbolic< T > mage::operator* ( a,
const Hyperbolic< T > &  v 
)
noexcept

◆ operator*() [2/3]

template<typename T >
constexpr const Dual< T > mage::operator* ( a,
const Dual< T > &  v 
)
noexcept

◆ operator*() [3/3]

template<typename T >
constexpr const Complex< T > mage::operator* ( a,
const Complex< T > &  v 
)
noexcept

◆ operator+() [1/3]

template<typename T >
constexpr const Hyperbolic< T > mage::operator+ ( a,
const Hyperbolic< T > &  v 
)
noexcept

◆ operator+() [2/3]

template<typename T >
constexpr const Dual< T > mage::operator+ ( a,
const Dual< T > &  v 
)
noexcept

◆ operator+() [3/3]

template<typename T >
constexpr const Complex< T > mage::operator+ ( a,
const Complex< T > &  v 
)
noexcept

◆ operator-() [1/3]

template<typename T >
constexpr const Hyperbolic< T > mage::operator- ( a,
const Hyperbolic< T > &  v 
)
noexcept

◆ operator-() [2/3]

template<typename T >
constexpr const Dual< T > mage::operator- ( a,
const Dual< T > &  v 
)
noexcept

◆ operator-() [3/3]

template<typename T >
constexpr const Complex< T > mage::operator- ( a,
const Complex< T > &  v 
)
noexcept

◆ operator/() [1/2]

template<typename T >
constexpr const Dual< T > mage::operator/ ( a,
const Dual< T > &  v 
)
noexcept

◆ operator/() [2/2]

template<typename T >
constexpr const Complex< T > mage::operator/ ( a,
const Complex< T > &  v 
)
noexcept

◆ operator==() [1/2]

template<typename T >
bool mage::operator== ( const ProxyPtr< T > &  lhs,
std::nullptr_t   
)
noexcept

Checks whether the given proxy pointer is equal to nullptr.

Template Parameters
TThe memory resource type.
Parameters
[in]lhsA reference to the proxy pointer.
Returns
true if the given proxy pointer is equal to nullptr. false otherwise.

◆ operator==() [2/2]

template<typename T >
bool mage::operator== ( std::nullptr_t  ,
const ProxyPtr< T > &  rhs 
)
noexcept

Checks whether the given proxy pointer is equal to nullptr.

Template Parameters
TThe memory resource type.
Parameters
[in]rhsA reference to the proxy pointer.
Returns
true if the given proxy pointer is equal to nullptr. false otherwise.

◆ OrthonormalBasis()

const XMMATRIX XM_CALLCONV mage::OrthonormalBasis ( FXMVECTOR  n)
noexcept

Calculates an orthonormal basis from a given unit vector.

Precondition
n is normalized.
Parameters
[in]nA basis vector of the orthonormal basis.
Returns
An orthonormal basis (i.e. object-to-world transformation).

◆ OrthonormalBasis_Duff()

const XMMATRIX XM_CALLCONV mage::OrthonormalBasis_Duff ( FXMVECTOR  n)
noexcept

Calculates an orthonormal basis from a given unit vector with the method of Duff, Burgess, Christensen, Hery, Kensler, Liani and Villemin.

Precondition
n is normalized.
Parameters
[in]nA basis vector of the orthonormal basis.
Returns
An orthonormal basis (i.e. object-to-world transformation).

◆ OrthonormalBasis_Frisvad()

const XMMATRIX XM_CALLCONV mage::OrthonormalBasis_Frisvad ( FXMVECTOR  n)
noexcept

Calculates an orthonormal basis from a given unit vector with the method of Frisvad.

Precondition
n is normalized.
Parameters
[in]nA basis vector of the orthonormal basis.
Returns
An orthonormal basis (i.e. object-to-world transformation).

◆ OrthonormalBasis_HughesMoller()

const XMMATRIX XM_CALLCONV mage::OrthonormalBasis_HughesMoller ( FXMVECTOR  n)
noexcept

Calculates an orthonormal basis from a given unit vector with the method of Hughes and Möller.

Precondition
n is normalized.
Parameters
[in]nA basis vector of the orthonormal basis.
Returns
An orthonormal basis (i.e. object-to-world transformation).

◆ Print() [1/2]

template<typename... ArgsT>
void mage::Print ( std::string_view  format_str,
const ArgsT &...  args 
)

◆ Print() [2/2]

template<typename... ArgsT>
void mage::Print ( std::wstring_view  format_str,
const ArgsT &...  args 
)

◆ PrintConsoleHeader()

void mage::PrintConsoleHeader ( )
noexcept

Prints the header of the engine to the console.

◆ RadicalInverse()

F32 mage::RadicalInverse ( std::size_t  index,
F32  base 
)
noexcept

◆ ReadBinaryFile()

void mage::ReadBinaryFile ( const std::filesystem::path &  path,
UniquePtr< U8[] > &  data,
std::size_t &  size 
)

Reads the bytes of the binary file associated with the given path.

Parameters
[in]pathA reference to the path.
[in,out]dataA reference to a pointer to a buffer for storing the read bytes.
[in,out]sizeA reference to the size of the read bytes.
Exceptions
ExceptionFailed to read from the file.

◆ reinterpret_pointer_cast() [1/3]

template<typename ToT , typename FromT >
UniquePtr< ToT > mage::reinterpret_pointer_cast ( UniquePtr< FromT > &&  ptr)
noexcept

Creates a unique pointer whose stored pointer is obtained by reinterpret casting the stored pointer of the given unique pointer.

Template Parameters
ToTThe conversion to-type.
FromTThe conversion from-type.
Parameters
[in]ptrA reference to the unique pointer to cast.
Returns
The moved unique pointer.

◆ reinterpret_pointer_cast() [2/3]

template<typename ToT , typename FromT >
ProxyPtr< ToT > mage::reinterpret_pointer_cast ( const ProxyPtr< FromT > &  ptr)
noexcept

Creates a proxy pointer whose stored getter is obtained by reinterpret casting the stored getter of the given proxy pointer.

Template Parameters
ToTThe conversion to-type.
FromTThe conversion from-type.
Parameters
[in]ptrA reference to the proxy pointer to cast.
Returns
The moved proxy pointer.

◆ reinterpret_pointer_cast() [3/3]

template<typename ToT , typename FromT >
ProxyPtr< ToT > mage::reinterpret_pointer_cast ( ProxyPtr< FromT > &&  ptr)
noexcept

Creates a proxy pointer whose stored getter is obtained by reinterpret casting the stored getter of the given proxy pointer.

Template Parameters
ToTThe conversion to-type.
FromTThe conversion from-type.
Parameters
[in]ptrA reference to the proxy pointer to cast.
Returns
The moved proxy pointer.

◆ RGBtoSRGB()

const XMVECTOR XM_CALLCONV mage::RGBtoSRGB ( FXMVECTOR  rgb)
noexcept

Converts the given spectrum from (linear) RGB to sRGB space.

Parameters
[in]rgbThe spectrum in (linear) RGB space.
Returns
The spectrum in sRGB space.
Note
The alpha channel of the given spectrum is preserved.

◆ RGBtoXYZ()

const XMVECTOR XM_CALLCONV mage::RGBtoXYZ ( FXMVECTOR  rgb)
noexcept

Converts the given spectrum from (linear) RGB to XYZ space.

Parameters
[in]rgbThe spectrum in (linear) RGB space.
Returns
The spectrum in XYZ space.
Note
The alpha channel of the given spectrum is preserved.

◆ Roth()

const F32x2 mage::Roth ( std::size_t  index,
size_t  nb_samples 
)
noexcept

◆ SafeHandle()

HANDLE mage::SafeHandle ( HANDLE  handle)
noexcept

Converts the given handle to a safe handle.

Parameters
[in]handleA handle.
Returns
If the given handle is an invalid handle, nullptr is returned.
Otherwise, the given handle is returned.

◆ Saturate() [1/2]

constexpr F32 mage::Saturate ( F32  value)
noexcept

Clamps the given value to [0,1].

Parameters
[in]valueThe value.
Returns
The clamped value.

◆ Saturate() [2/2]

const XMVECTOR XM_CALLCONV mage::Saturate ( FXMVECTOR  value)
noexcept

Clamps the given value to [0,1]^4.

Parameters
[in]valueThe value.
Returns
The clamped value.

◆ SRGBtoRGB()

const XMVECTOR XM_CALLCONV mage::SRGBtoRGB ( FXMVECTOR  srgb)
noexcept

Converts the given spectrum from sRGB to (linear) RGB space.

Parameters
[in]srgbThe spectrum in sRGB space.
Returns
The spectrum in (linear) RGB space.
Note
The alpha channel of the given spectrum is preserved.

◆ static_pointer_cast() [1/2]

template<typename ToT , typename FromT >
UniquePtr< ToT > mage::static_pointer_cast ( UniquePtr< FromT > &&  ptr)
noexcept

Creates a unique pointer whose stored pointer is obtained by statically casting the stored pointer of the given unique pointer.

Template Parameters
ToTThe conversion to-type.
FromTThe conversion from-type.
Parameters
[in]ptrA reference to the unique pointer to cast.
Returns
The moved unique pointer.

◆ static_pointer_cast() [2/2]

template<typename ToT , typename FromT >
ProxyPtr< ToT > mage::static_pointer_cast ( const ProxyPtr< FromT > &  ptr)
noexcept

Creates a proxy pointer whose stored getter is obtained by statically casting the stored getter of the given proxy pointer.

Template Parameters
ToTThe conversion to-type.
FromTThe conversion from-type.
Parameters
[in]ptrA reference to the proxy pointer to cast.
Returns
The moved proxy pointer.

◆ StaticCastArray()

template<typename ToT , typename FromT , std::size_t N>
constexpr const auto mage::StaticCastArray ( const std::array< FromT, N > &  a)

◆ StringPrefixTo()

template<typename T >
const std::optional< T > mage::StringPrefixTo ( std::string_view  str)
noexcept

Converts the prefix of the given string to a T value.

Template Parameters
TThe data type.
Parameters
[in]strThe string to convert.
Returns
A T value if the the conversion of the prefix of the given string succeeded.

◆ StringTo()

template<typename T >
const std::optional< T > mage::StringTo ( std::string_view  str)
noexcept

Converts the given string to a T value.

Template Parameters
TThe data type.
Parameters
[in]strThe string to convert.
Returns
A T value if the the conversion of the given string succeeded.

◆ ThrowIfFailed() [1/6]

void mage::ThrowIfFailed ( bool  result)

Throws if the given result correspond to a failure.

Parameters
[in]resultThe result value.
Exceptions
Exceptionresult is false.

◆ ThrowIfFailed() [2/6]

template<typename... ArgsT>
void mage::ThrowIfFailed ( bool  result,
std::string_view  format_str,
const ArgsT &...  args 
)

Throws if the given result correspond to a failure.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]resultThe result value.
[in]format_strThe format string.
[in]argsA reference to the format arguments.
Exceptions
Exceptionresult is false.

◆ ThrowIfFailed() [3/6]

void mage::ThrowIfFailed ( BOOL  result)

Throws if the given result correspond to a failure.

Parameters
[in]resultThe result value.
Exceptions
Exceptionresult is FALSE.

◆ ThrowIfFailed() [4/6]

template<typename... ArgsT>
void mage::ThrowIfFailed ( BOOL  result,
std::string_view  format_str,
const ArgsT &...  args 
)

Throws if the given result correspond to a failure.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]resultThe result value.
[in]format_strThe format string.
[in]argsA reference to the format arguments.
Exceptions
Exceptionresult is FALSE.

◆ ThrowIfFailed() [5/6]

void mage::ThrowIfFailed ( HRESULT  result)

Throws if the given result correspond to a failure.

Parameters
[in]resultThe result value.
Exceptions
ExceptionThe given result corresponds to a failure.

◆ ThrowIfFailed() [6/6]

template<typename... ArgsT>
void mage::ThrowIfFailed ( HRESULT  result,
std::string_view  format_str,
const ArgsT &...  args 
)

Throws if the given result correspond to a failure.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]resultThe result value.
[in]format_strThe format string.
[in]argsA reference to the format arguments.
Exceptions
ExceptionThe given result corresponds to a failure.

◆ TransformArray()

template<typename ActionT , typename FromT , std::size_t N>
constexpr const auto mage::TransformArray ( ActionT &&  action,
const std::array< FromT, N > &  a 
)

◆ TransformToLowerCase() [1/2]

void mage::TransformToLowerCase ( std::string &  str)

Transforms the given string to lower case.

Parameters
[in,out]strA reference to the string to transform.

◆ TransformToLowerCase() [2/2]

void mage::TransformToLowerCase ( std::wstring &  str)

Transforms the given string to lower case.

Parameters
[in,out]strA reference to the string to transform.

◆ TransformToUpperCase() [1/2]

void mage::TransformToUpperCase ( std::string &  str)

Transforms the given string to upper case.

Parameters
[in,out]strA reference to the string to transform.

◆ TransformToUpperCase() [2/2]

void mage::TransformToUpperCase ( std::wstring &  str)

Transforms the given string to upper case.

Parameters
[in,out]strA reference to the string to transform.

◆ TuppleToArray()

template<typename T , typename... Ts>
constexpr const auto mage::TuppleToArray ( const std::tuple< T, Ts... > &  t)

◆ UniformSampleInUnitCircle()

const F32x2 mage::UniformSampleInUnitCircle ( F32  u1,
F32  u2 
)
noexcept

◆ UniformSampleInUnitHalfcircle()

const F32x2 mage::UniformSampleInUnitHalfcircle ( F32  u1,
F32  u2 
)
noexcept

◆ UniformSampleInUnitHemisphere()

const F32x3 mage::UniformSampleInUnitHemisphere ( F32  u1,
F32  u2,
F32  u3 
)
noexcept

◆ UniformSampleInUnitSphere()

const F32x3 mage::UniformSampleInUnitSphere ( F32  u1,
F32  u2,
F32  u3 
)
noexcept

◆ UniformSampleOnUnitCircle()

const F32x2 mage::UniformSampleOnUnitCircle ( F32  u)
noexcept

◆ UniformSampleOnUnitHalfcircle()

const F32x2 mage::UniformSampleOnUnitHalfcircle ( F32  u)
noexcept

◆ UniformSampleOnUnitHemisphere()

const F32x3 mage::UniformSampleOnUnitHemisphere ( F32  u1,
F32  u2 
)
noexcept

◆ UniformSampleOnUnitSphere()

const F32x3 mage::UniformSampleOnUnitSphere ( F32  u1,
F32  u2 
)
noexcept

◆ VanderCorput()

F32 mage::VanderCorput ( std::size_t  index)
noexcept

◆ Warning() [1/2]

template<typename... ArgsT>
void mage::Warning ( std::string_view  format_str,
const ArgsT &...  args 
)

Logs a warning message.

A warning message is associated with anything that can potentially cause application oddities.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ Warning() [2/2]

template<typename... ArgsT>
void mage::Warning ( std::wstring_view  format_str,
const ArgsT &...  args 
)

Logs a warning message.

A warning message is associated with anything that can potentially cause application oddities.

Template Parameters
ArgsTThe format argument types.
Parameters
[in]format_strThe format string.
[in]argsA reference to the format arguments.

◆ WrapAngleDegrees()

F32 mage::WrapAngleDegrees ( F32  angle)
noexcept

Wraps the given angle (in degrees) to [-180, 180].

Parameters
[in]angleThe angle (in degrees).
Returns
The wrapped angle (in degrees).

◆ WrapAngleRadians() [1/2]

F32 mage::WrapAngleRadians ( F32  angle)
noexcept

Wraps the given angle (in radians) to [-pi, pi].

Parameters
[in]angleThe angle (in radians).
Returns
The wrapped angle (in radians).

◆ WrapAngleRadians() [2/2]

const XMVECTOR XM_CALLCONV mage::WrapAngleRadians ( FXMVECTOR  angles)
noexcept

Wraps the given angles (in radians) to [-pi, pi).

Parameters
[in]anglesThe angles (in radians).
Returns
The wrapped angles (in radians).

◆ WriteTo() [1/6]

template<typename... ArgsT>
void mage::WriteTo ( NotNull< std::FILE * >  stream,
std::string_view  format_str,
const ArgsT &...  args 
)

◆ WriteTo() [2/6]

template<typename... ArgsT>
void mage::WriteTo ( NotNull< std::FILE * >  stream,
std::wstring_view  format_str,
const ArgsT &...  args 
)

◆ WriteTo() [3/6]

template<typename... ArgsT>
void mage::WriteTo ( NotNull< zstring buffer,
std::size_t  length,
std::string_view  format_str,
const ArgsT &...  args 
)

◆ WriteTo() [4/6]

template<typename... ArgsT>
void mage::WriteTo ( NotNull< wzstring buffer,
std::size_t  length,
std::wstring_view  format_str,
const ArgsT &...  args 
)

◆ WriteTo() [5/6]

template<std::size_t N, typename... ArgsT>
void mage::WriteTo ( char(&)  buffer[N],
std::string_view  format_str,
const ArgsT &...  args 
)

◆ WriteTo() [6/6]

template<std::size_t N, typename... ArgsT>
void mage::WriteTo ( wchar_t(&)  buffer[N],
std::wstring_view  format_str,
const ArgsT &...  args 
)

◆ XMLoad() [1/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( F32  src)
noexcept

◆ XMLoad() [2/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const F32x2 src)
noexcept

◆ XMLoad() [3/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const F32x3 src)
noexcept

◆ XMLoad() [4/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const F32x4 src)
noexcept

◆ XMLoad() [5/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const F32x2A src)
noexcept

◆ XMLoad() [6/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const F32x3A src)
noexcept

◆ XMLoad() [7/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const F32x4A src)
noexcept

◆ XMLoad() [8/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const S32x2 src)
noexcept

◆ XMLoad() [9/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const S32x3 src)
noexcept

◆ XMLoad() [10/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const S32x4 src)
noexcept

◆ XMLoad() [11/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( U32  src)
noexcept

◆ XMLoad() [12/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const U32x2 src)
noexcept

◆ XMLoad() [13/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const U32x3 src)
noexcept

◆ XMLoad() [14/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const U32x4 src)
noexcept

◆ XMLoad() [15/15]

const XMVECTOR XM_CALLCONV mage::XMLoad ( const RECT &  src)
noexcept

◆ XMStore() [1/15]

template<typename T >
const T XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [2/15]

template<>
const F32 XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [3/15]

template<>
const F32x2 XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [4/15]

template<>
const F32x3 XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [5/15]

template<>
const F32x4 XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [6/15]

template<>
const F32x2A XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [7/15]

template<>
const F32x3A XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [8/15]

template<>
const F32x4A XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [9/15]

template<>
const S32x2 XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [10/15]

template<>
const S32x3 XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [11/15]

template<>
const S32x4 XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [12/15]

template<>
const U32 XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [13/15]

template<>
const U32x2 XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [14/15]

template<>
const U32x3 XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMStore() [15/15]

template<>
const U32x4 XM_CALLCONV mage::XMStore ( FXMVECTOR  src)
noexcept

◆ XMVectorLeftTopRightBottom()

const XMVECTOR XM_CALLCONV mage::XMVectorLeftTopRightBottom ( const RECT &  rect)
noexcept

Converts the given RECT (left, top, right, bottom) to a XMVECTOR (left, top, right, bottom).

Parameters
[in]rectA reference to the rectangle.
Returns
A XMVECTOR (left, top, right, bottom) representing the given RECT (left, top, right, bottom).

◆ XMVectorLeftTopWidthHeight()

const XMVECTOR XM_CALLCONV mage::XMVectorLeftTopWidthHeight ( const RECT &  rect)
noexcept

Converts the given RECT (left, top, right, bottom) to a XMVECTOR (left, top, width, height).

Parameters
[in]rectA reference to the rectangle.
Returns
A XMVECTOR (left, top, width, height) representing the given RECT (left, top, right, bottom).

◆ XYZtoRGB()

const XMVECTOR XM_CALLCONV mage::XYZtoRGB ( FXMVECTOR  xyz)
noexcept

Converts the given spectrum from XYZ to (linear) RGB space.

Parameters
[in]xyzThe spectrum in XYZ space.
Returns
The spectrum in (linear) RGB space.
Note
The alpha channel of the given spectrum is preserved.

Variable Documentation

◆ g_primes

constexpr U16 mage::g_primes[]
Initial value:
= {
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43,
47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107,
109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181,
191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263,
269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349,
353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433,
439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521,
523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613,
617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701,
709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809,
811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887,
907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997
}

The first 168 prime numbers (i.e. all the prime numbers less than 1000).

◆ is_equivalent_integral_v

template<typename T , typename U >
constexpr bool mage::is_equivalent_integral_v = is_equivalent_integral< T, U >::value

◆ XM_GA

constexpr F32 mage::XM_GA = 2.399963230f

The Golden Angle.