ludus::foundation::math¶
Ludus Wiki · API overview · Browse API
Namespace
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
Related declarations¶
- ludus::foundation::math::Aabb2
- ludus::foundation::math::Aabb3
- ludus::foundation::math::Affine2
- ludus::foundation::math::Affine3
- ludus::foundation::math::ApproximatePolygonIntegral
- ludus::foundation::math::BicubicBezierPatch
- ludus::foundation::math::CompensatedSum
- ludus::foundation::math::ConeTriangle
- ludus::foundation::math::ConeTriangleIntersection
- ludus::foundation::math::CubicBezier1
- ludus::foundation::math::CubicBezier2
- ludus::foundation::math::CubicBezier3
- ludus::foundation::math::CubicHermite1
- ludus::foundation::math::CubicHermite2
- ludus::foundation::math::CubicHermite3
- ludus::foundation::math::CubicSample1
- ludus::foundation::math::CubicSample2
- ludus::foundation::math::CubicSample3
- ludus::foundation::math::EllipticalCone
- ludus::foundation::math::Enclosure
- ludus::foundation::math::Frustum
- ludus::foundation::math::GaussianAxes
- ludus::foundation::math::InversePolicy
- ludus::foundation::math::JumpRestoreRates
- ludus::foundation::math::LinearDragStep
- ludus::foundation::math::LinearlyTransformedCosine
- ludus::foundation::math::LinearlyTransformedCosinePolygon
- ludus::foundation::math::Matrix3
- ludus::foundation::math::Matrix4
- ludus::foundation::math::Matrix4d
- ludus::foundation::math::MetropolisTour
- ludus::foundation::math::PatchNormalPolicy
- ludus::foundation::math::PatchParameter
- ludus::foundation::math::PatchSample
- ludus::foundation::math::PatchSubdivision
- ludus::foundation::math::Plane
- ludus::foundation::math::PreparedBound32
- ludus::foundation::math::ProjectedPolygonInput
- ludus::foundation::math::ProjectedSolidAnglePolygon
- ludus::foundation::math::Quaternion
- ludus::foundation::math::RadialSweepContact
- ludus::foundation::math::RandomAddress
- ludus::foundation::math::RandomAddressInput
- ludus::foundation::math::RandomBlock
- ludus::foundation::math::RandomDomain
- ludus::foundation::math::RandomDomainCheck
- ludus::foundation::math::RandomKey
- ludus::foundation::math::RandomState
- ludus::foundation::math::RandomStream
- ludus::foundation::math::Ray3
- ludus::foundation::math::RayHit
- ludus::foundation::math::RayInterval
- ludus::foundation::math::RayOriginOffset
- ludus::foundation::math::ReservoirCandidate
- ludus::foundation::math::RotationExtractionPolicy
- ludus::foundation::math::SegmentClosest
- ludus::foundation::math::Sphere
- ludus::foundation::math::TransformTRS
- ludus::foundation::math::Vector2
- ludus::foundation::math::Vector3
- ludus::foundation::math::Vector3d
- ludus::foundation::math::Vector4
- ludus::foundation::math::Viewport
- ludus::foundation::math::WeightedRadiance
- ludus::foundation::math::WeightedReservoir
Enumerations¶
HitResult¶
enum class HitResult : uint8
Related types: uint8
Miss¶
Miss = 0
Hit¶
Hit = 1
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
FrustumMode¶
enum class FrustumMode : uint8
Related types: uint8
FinitePerspectiveOrOrthographic¶
FinitePerspectiveOrOrthographic = 0
InfiniteReverseZPerspective¶
InfiniteReverseZPerspective = 1
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
FrustumRelation¶
enum class FrustumRelation : uint8
Related types: uint8
Outside¶
Outside = 0
Intersecting¶
Intersecting = 1
Inside¶
Inside = 2
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
ProjectedEllipseKind¶
enum class ProjectedEllipseKind : core::uint8
Related types: core::uint8
Outer¶
Outer = 0
Inner¶
Inner = 1
Degenerate¶
Degenerate = 2
Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp
RandomDomainOwner¶
enum class RandomDomainOwner : core::uint8
Related types: core::uint8
Game¶
Game
Engine¶
Engine
Declared in modules/foundation/math/include/ludus/foundation/math/random_domains.hpp
MathStatus¶
enum class MathStatus : uint8
Related types: uint8
Success¶
Success = 0
NonFiniteInput¶
NonFiniteInput
InvalidArgument¶
InvalidArgument
Degenerate¶
Degenerate
IllConditioned¶
IllConditioned
OutOfRange¶
OutOfRange
SizeMismatch¶
SizeMismatch
Declared in modules/foundation/math/include/ludus/foundation/math/status.hpp
Constants and variables¶
RandomKeyDerivationVersion¶
constexpr uint32 ludus::foundation::math::RandomKeyDerivationVersion = 1
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
RandomAddressLayoutVersion¶
constexpr uint32 ludus::foundation::math::RandomAddressLayoutVersion = 1
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
RandomBoundedMappingVersion¶
constexpr uint32 ludus::foundation::math::RandomBoundedMappingVersion = 1
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
RandomMaxDimension¶
constexpr uint32 ludus::foundation::math::RandomMaxDimension = 0xffffu
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
RandomBoundedAttemptCount¶
constexpr uint32 ludus::foundation::math::RandomBoundedAttemptCount = 0x10000u
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
MIN_LINEARLY_TRANSFORMED_COSINE_DETERMINANT¶
constexpr float32 ludus::foundation::math::MIN_LINEARLY_TRANSFORMED_COSINE_DETERMINANT = 2.3283064365386963e-10F
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/linearly_transformed_cosine.hpp
METROPOLIS_VERSION¶
constexpr uint32 ludus::foundation::math::METROPOLIS_VERSION = 1
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/metropolis.hpp
MIN_PROJECTED_POLYGON_VERTICES¶
constexpr uint32 ludus::foundation::math::MIN_PROJECTED_POLYGON_VERTICES = 3
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp
MAX_PROJECTED_POLYGON_INPUT_VERTICES¶
constexpr uint32 ludus::foundation::math::MAX_PROJECTED_POLYGON_INPUT_VERTICES = 7
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp
MAX_PROJECTED_POLYGON_VERTICES¶
constexpr uint32 ludus::foundation::math::MAX_PROJECTED_POLYGON_VERTICES = MAX_PROJECTED_POLYGON_INPUT_VERTICES + 1
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp
PROJECTED_POLYGON_ITERATION_COUNT¶
constexpr uint32 ludus::foundation::math::PROJECTED_POLYGON_ITERATION_COUNT = 2
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp
RANDOM_GAME_DOMAIN_FIRST¶
constexpr uint32 ludus::foundation::math::RANDOM_GAME_DOMAIN_FIRST = 1u
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/random_domains.hpp
RANDOM_GAME_DOMAIN_LAST¶
constexpr uint32 ludus::foundation::math::RANDOM_GAME_DOMAIN_LAST = 0x00ffffffu
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/random_domains.hpp
RANDOM_ENGINE_DOMAIN_FIRST¶
constexpr uint32 ludus::foundation::math::RANDOM_ENGINE_DOMAIN_FIRST = 0x01000000u
BAKE. Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/random_domains.hpp
kPi¶
constexpr float64 ludus::foundation::math::kPi = 3.14159265358979323846
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
kTau¶
constexpr float64 ludus::foundation::math::kTau = 6.28318530717958647692
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
kHalfPi¶
constexpr float64 ludus::foundation::math::kHalfPi = 1.57079632679489661923
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
kPiF¶
constexpr float32 ludus::foundation::math::kPiF = 3.14159265358979323846f
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
kTauF¶
constexpr float32 ludus::foundation::math::kTauF = 6.28318530717958647692f
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
kHalfPiF¶
constexpr float32 ludus::foundation::math::kHalfPiF = 1.57079632679489661923f
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
SHADING_NORMAL_MINIMUM_OUTGOING_COSINE¶
constexpr float32 ludus::foundation::math::SHADING_NORMAL_MINIMUM_OUTGOING_COSINE = 0.01F
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/shading_normal.hpp
STOCHASTIC_PAIRWISE_MIS_VERSION¶
constexpr uint32 ludus::foundation::math::STOCHASTIC_PAIRWISE_MIS_VERSION = 1
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/stochastic_pairwise_mis.hpp
WEIGHTED_RESERVOIR_SELECTION_VERSION¶
constexpr uint32 ludus::foundation::math::WEIGHTED_RESERVOIR_SELECTION_VERSION = 1
Related types: uint32
Declared in modules/foundation/math/include/ludus/foundation/math/weighted_reservoir.hpp
WEIGHTED_RESERVOIR_MINIMUM_WEIGHT¶
constexpr float32 ludus::foundation::math::WEIGHTED_RESERVOIR_MINIMUM_WEIGHT = 0x1p-102f
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/weighted_reservoir.hpp
Functions¶
TryMakeRandomKey¶
MathStatus ludus::foundation::math::TryMakeRandomKey(uint64 rootSeed, uint32 domainId, RandomKey &out) noexcept
Related types: uint64 · uint32 · MathStatus · RandomKey
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
TryMakeRandomAddress¶
MathStatus ludus::foundation::math::TryMakeRandomAddress(RandomAddressInput input, RandomAddress &out) noexcept
Related types: MathStatus · RandomAddress · RandomAddressInput
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
SampleUInt32¶
uint32 ludus::foundation::math::SampleUInt32(RandomKey key, RandomAddress address) noexcept
Related types: uint32 · RandomAddress · RandomKey
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
SampleFloat01¶
float32 ludus::foundation::math::SampleFloat01(RandomKey key, RandomAddress address) noexcept
Related types: float32 · RandomAddress · RandomKey
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
TrySampleBlock¶
MathStatus ludus::foundation::math::TrySampleBlock(RandomKey key, RandomAddress address, RandomBlock &out) noexcept
Related types: MathStatus · RandomAddress · RandomBlock · RandomKey
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
TryPrepareBound32¶
MathStatus ludus::foundation::math::TryPrepareBound32(uint32 bound, PreparedBound32 &out)
Related types: PreparedBound32 · uint32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
TrySampleBounded¶
MathStatus ludus::foundation::math::TrySampleBounded(RandomKey key, RandomAddress address, uint32 bound, uint32 &out) noexcept
Related types: uint32 · MathStatus · RandomAddress · RandomKey
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
TrySampleBounded¶
MathStatus ludus::foundation::math::TrySampleBounded(RandomKey key, RandomAddress address, PreparedBound32 bound, uint32 &out) noexcept
Related types: PreparedBound32 · uint32 · MathStatus · RandomAddress · RandomKey
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
TryTransformPoints¶
MathStatus ludus::foundation::math::TryTransformPoints(const Affine3 &transform, std::span< const Vector3 > input, std::span< Vector3 > output) noexcept
Related types: MathStatus · Affine3 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/batch.hpp
TryClassifySpheres¶
MathStatus ludus::foundation::math::TryClassifySpheres(const Frustum &frustum, std::span< const Sphere > input, float32 margin, std::span< FrustumRelation > output) noexcept
Related types: float32 · MathStatus · FrustumRelation · Frustum · Sphere
Declared in modules/foundation/math/include/ludus/foundation/math/batch.hpp
TryEvaluateCubic¶
MathStatus ludus::foundation::math::TryEvaluateCubic(const CubicBezier1 &curve, float64 u, float32 &out) noexcept
Related types: float32 · float64 · MathStatus · CubicBezier1
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TryEvaluateCubic¶
MathStatus ludus::foundation::math::TryEvaluateCubic(const CubicBezier2 &curve, float64 u, Vector2 &out) noexcept
Returns
Related types: float64 · MathStatus · CubicBezier2 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TryEvaluateCubic¶
MathStatus ludus::foundation::math::TryEvaluateCubic(const CubicBezier3 &curve, float64 u, Vector3 &out) noexcept
Returns
Related types: float64 · MathStatus · CubicBezier3 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TryEvaluateCubic¶
MathStatus ludus::foundation::math::TryEvaluateCubic(const CubicBezier1 &curve, float64 u, CubicSample1 &out) noexcept
Returns
Related types: float64 · MathStatus · CubicBezier1 · CubicSample1
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TryEvaluateCubic¶
MathStatus ludus::foundation::math::TryEvaluateCubic(const CubicBezier2 &curve, float64 u, CubicSample2 &out) noexcept
Returns
Related types: float64 · MathStatus · CubicBezier2 · CubicSample2
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TryEvaluateCubic¶
MathStatus ludus::foundation::math::TryEvaluateCubic(const CubicBezier3 &curve, float64 u, CubicSample3 &out) noexcept
Returns
Related types: float64 · MathStatus · CubicBezier3 · CubicSample3
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TryFromHermite¶
MathStatus ludus::foundation::math::TryFromHermite(const CubicHermite1 &hermite, float64 domainWidth, CubicBezier1 &out) noexcept
Related types: float64 · MathStatus · CubicBezier1 · CubicHermite1
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TryFromHermite¶
MathStatus ludus::foundation::math::TryFromHermite(const CubicHermite2 &hermite, float64 domainWidth, CubicBezier2 &out) noexcept
Returns
Related types: float64 · MathStatus · CubicBezier2 · CubicHermite2
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TryFromHermite¶
MathStatus ludus::foundation::math::TryFromHermite(const CubicHermite3 &hermite, float64 domainWidth, CubicBezier3 &out) noexcept
Returns
Related types: float64 · MathStatus · CubicBezier3 · CubicHermite3
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TrySplitCubic¶
MathStatus ludus::foundation::math::TrySplitCubic(const CubicBezier1 &curve, float64 u, CubicBezier1 &outLeft, CubicBezier1 &outRight) noexcept
Related types: float64 · MathStatus · CubicBezier1
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TrySplitCubic¶
MathStatus ludus::foundation::math::TrySplitCubic(const CubicBezier2 &curve, float64 u, CubicBezier2 &outLeft, CubicBezier2 &outRight) noexcept
Returns
Related types: float64 · MathStatus · CubicBezier2
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TrySplitCubic¶
MathStatus ludus::foundation::math::TrySplitCubic(const CubicBezier3 &curve, float64 u, CubicBezier3 &outLeft, CubicBezier3 &outRight) noexcept
Returns
Related types: float64 · MathStatus · CubicBezier3
Declared in modules/foundation/math/include/ludus/foundation/math/cubic.hpp
TryComputeLinearDragStep¶
MathStatus ludus::foundation::math::TryComputeLinearDragStep(float64 rate, float64 dt, LinearDragStep &out) noexcept
Related types: float64 · MathStatus · LinearDragStep
Declared in modules/foundation/math/include/ludus/foundation/math/dynamics.hpp
TrySweepRadialBand¶
MathStatus ludus::foundation::math::TrySweepRadialBand(Vector3d start, Vector3d end, Vector3d origin, float64 radiusStart, float64 radiusEnd, float64 halfWidth, RadialSweepContact &out) noexcept
Related types: float64 · MathStatus · RadialSweepContact · Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/dynamics.hpp
TryIntersectEllipticalConeTriangle¶
bool ludus::foundation::math::TryIntersectEllipticalConeTriangle(const EllipticalCone &cone, const ConeTriangle &triangle, ConeTriangleIntersection &outIntersection) noexcept
Returns
Related types: ConeTriangle · ConeTriangleIntersection · EllipticalCone
Declared in modules/foundation/math/include/ludus/foundation/math/elliptical_cone.hpp
TryTestEllipticalConeBounds¶
bool ludus::foundation::math::TryTestEllipticalConeBounds(const EllipticalCone &cone, Vector3d minimumWorld, Vector3d maximumWorld, bool &outMayIntersect) noexcept
Returns
Related types: EllipticalCone · Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/elliptical_cone.hpp
MakePointEnclosure¶
constexpr Enclosure ludus::foundation::math::MakePointEnclosure(float64 value) noexcept
| Parameter | Description |
|---|---|
value |
Finite value; the result is valid only when it is finite.
|
Related types: float64 · Enclosure
Declared in modules/foundation/math/include/ludus/foundation/math/enclosure.hpp
IsValidEnclosure¶
bool ludus::foundation::math::IsValidEnclosure(Enclosure enclosure) noexcept
Related types: Enclosure
Declared in modules/foundation/math/include/ludus/foundation/math/enclosure.hpp
NextFloat64Up¶
float64 ludus::foundation::math::NextFloat64Up(float64 value) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/enclosure.hpp
NextFloat64Down¶
float64 ludus::foundation::math::NextFloat64Down(float64 value) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/enclosure.hpp
TryAddOutward¶
MathStatus ludus::foundation::math::TryAddOutward(Enclosure left, Enclosure right, Enclosure &outEnclosure) noexcept
Returns
Related types: MathStatus · Enclosure
Declared in modules/foundation/math/include/ludus/foundation/math/enclosure.hpp
TrySubtractOutward¶
MathStatus ludus::foundation::math::TrySubtractOutward(Enclosure left, Enclosure right, Enclosure &outEnclosure) noexcept
Related types: MathStatus · Enclosure
Declared in modules/foundation/math/include/ludus/foundation/math/enclosure.hpp
TryMultiplyOutward¶
MathStatus ludus::foundation::math::TryMultiplyOutward(Enclosure left, Enclosure right, Enclosure &outEnclosure) noexcept
Returns
Related types: MathStatus · Enclosure
Declared in modules/foundation/math/include/ludus/foundation/math/enclosure.hpp
TrySquareOutward¶
MathStatus ludus::foundation::math::TrySquareOutward(Enclosure value, Enclosure &outEnclosure) noexcept
Returns
Related types: MathStatus · Enclosure
Declared in modules/foundation/math/include/ludus/foundation/math/enclosure.hpp
TrySquareRootOutward¶
MathStatus ludus::foundation::math::TrySquareRootOutward(Enclosure value, Enclosure &outEnclosure) noexcept
Returns
Related types: MathStatus · Enclosure
Declared in modules/foundation/math/include/ludus/foundation/math/enclosure.hpp
TryComputeGaussianAxes¶
bool ludus::foundation::math::TryComputeGaussianAxes(Vector3 diagonal, Vector3 cross, GaussianAxes &outAxes) noexcept
| Parameter | Description |
|---|---|
diagonal |
Variances XX, YY, ZZ in squared input units.
|
cross |
Covariances XY, XZ, YZ in squared input units.
|
outAxes |
Written only on success; unchanged for nonfinite or indefinite inputs.
|
Returns
Note
Related types: GaussianAxes · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/gaussian.hpp
EmptyAabb2¶
constexpr Aabb2 ludus::foundation::math::EmptyAabb2() noexcept
Related types: Aabb2
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
EmptyAabb3¶
constexpr Aabb3 ludus::foundation::math::EmptyAabb3() noexcept
Related types: Aabb3
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
IsEmpty¶
constexpr bool ludus::foundation::math::IsEmpty(const Aabb2 &b) noexcept
Related types: Aabb2
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
IsEmpty¶
constexpr bool ludus::foundation::math::IsEmpty(const Aabb3 &b) noexcept
Related types: Aabb3
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(const Aabb2 &b) noexcept
Related types: Aabb2
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(const Aabb3 &b) noexcept
Related types: Aabb3
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
TryMakeLinearlyTransformedCosine¶
MathStatus ludus::foundation::math::TryMakeLinearlyTransformedCosine(const Matrix3 &inverseTransform, LinearlyTransformedCosine &outDistribution) noexcept
| Parameter | Description |
|---|---|
inverseTransform |
M^-1, with a positive determinant (Peters 2021, section 4.1, requires |M| > 0).
|
outDistribution |
The scaled representation; written only on success.
|
Returns
Related types: MathStatus · LinearlyTransformedCosine · Matrix3
Declared in modules/foundation/math/include/ludus/foundation/math/linearly_transformed_cosine.hpp
EvaluateLinearlyTransformedCosine¶
float32 ludus::foundation::math::EvaluateLinearlyTransformedCosine(const LinearlyTransformedCosine &distribution, Vector3 directionTangent) noexcept
| Parameter | Description |
|---|---|
distribution |
Output of TryMakeLinearlyTransformedCosine.
|
directionTangent |
Unit tangent-space direction.
|
Returns
Related types: float32 · LinearlyTransformedCosine · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/linearly_transformed_cosine.hpp
TryPrepareLinearlyTransformedCosinePolygon¶
MathStatus ludus::foundation::math::TryPrepareLinearlyTransformedCosinePolygon(const ProjectedPolygonInput &polygon, const LinearlyTransformedCosine &distribution, LinearlyTransformedCosinePolygon &outPolygon) noexcept
| Parameter | Description |
|---|---|
polygon |
Convex polygon in tangent space; see ProjectedPolygonInput.
|
distribution |
Output of TryMakeLinearlyTransformedCosine.
|
outPolygon |
Prepared state; written only on success.
|
Returns
Related types: MathStatus · LinearlyTransformedCosine · LinearlyTransformedCosinePolygon · ProjectedPolygonInput
Declared in modules/foundation/math/include/ludus/foundation/math/linearly_transformed_cosine.hpp
GetLinearlyTransformedCosinePolygonIntegral¶
float32 ludus::foundation::math::GetLinearlyTransformedCosinePolygonIntegral(const LinearlyTransformedCosinePolygon &polygon) noexcept
| Parameter | Description |
|---|---|
polygon |
Output of TryPrepareLinearlyTransformedCosinePolygon.
|
Returns
Related types: float32 · LinearlyTransformedCosinePolygon
Declared in modules/foundation/math/include/ludus/foundation/math/linearly_transformed_cosine.hpp
TryApproximateClampedCosinePolygonIntegral¶
MathStatus ludus::foundation::math::TryApproximateClampedCosinePolygonIntegral(const ProjectedPolygonInput &polygon, ApproximatePolygonIntegral &outIntegral) noexcept
| Parameter | Description |
|---|---|
polygon |
Convex polygon in tangent space; see ProjectedPolygonInput.
|
outIntegral |
The approximation; written only on success.
|
Returns
Related types: MathStatus · ApproximatePolygonIntegral · ProjectedPolygonInput
Declared in modules/foundation/math/include/ludus/foundation/math/linearly_transformed_cosine.hpp
TryApproximateLinearlyTransformedCosinePolygonIntegral¶
MathStatus ludus::foundation::math::TryApproximateLinearlyTransformedCosinePolygonIntegral(const ProjectedPolygonInput &polygon, const LinearlyTransformedCosine &distribution, ApproximatePolygonIntegral &outIntegral) noexcept
| Parameter | Description |
|---|---|
polygon |
Convex polygon in tangent space; see ProjectedPolygonInput.
|
distribution |
Output of TryMakeLinearlyTransformedCosine.
|
outIntegral |
The approximation in the LTC's cosine space; written only on success.
|
Returns
Related types: MathStatus · ApproximatePolygonIntegral · LinearlyTransformedCosine · ProjectedPolygonInput
Declared in modules/foundation/math/include/ludus/foundation/math/linearly_transformed_cosine.hpp
TrySampleLinearlyTransformedCosinePolygon¶
MathStatus ludus::foundation::math::TrySampleLinearlyTransformedCosinePolygon(const LinearlyTransformedCosinePolygon &polygon, Vector2 randomNumbers, Vector3 &outDirectionTangent) noexcept
Warning
| Parameter | Description |
|---|---|
polygon |
Output of TryPrepareLinearlyTransformedCosinePolygon.
|
randomNumbers |
Uniform random numbers, each in [0, 1].
|
outDirectionTangent |
Unit tangent-space direction; written only on success.
|
Returns
Related types: MathStatus · LinearlyTransformedCosinePolygon · Vector2 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/linearly_transformed_cosine.hpp
EvaluateLinearlyTransformedCosinePolygonDensity¶
float32 ludus::foundation::math::EvaluateLinearlyTransformedCosinePolygonDensity(const LinearlyTransformedCosinePolygon &polygon, Vector3 directionTangent) noexcept
| Parameter | Description |
|---|---|
polygon |
Output of TryPrepareLinearlyTransformedCosinePolygon.
|
directionTangent |
Unit tangent-space direction.
|
Returns
Related types: float32 · LinearlyTransformedCosinePolygon · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/linearly_transformed_cosine.hpp
operator*¶
constexpr Vector3 ludus::foundation::math::operator*(const Matrix3 &m, Vector3 v) noexcept
Related types: Matrix3 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
operator*¶
constexpr Matrix3 ludus::foundation::math::operator*(const Matrix3 &a, const Matrix3 &b) noexcept
Related types: Matrix3
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
Transpose¶
constexpr Matrix3 ludus::foundation::math::Transpose(const Matrix3 &m) noexcept
Related types: Matrix3
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(const Matrix3 &m) noexcept
Related types: Matrix3
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
operator*¶
constexpr Vector4 ludus::foundation::math::operator*(const Matrix4 &m, Vector4 v) noexcept
Related types: Matrix4 · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
operator*¶
constexpr Matrix4 ludus::foundation::math::operator*(const Matrix4 &a, const Matrix4 &b) noexcept
Related types: Matrix4
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
Transpose¶
constexpr Matrix4 ludus::foundation::math::Transpose(const Matrix4 &m) noexcept
Related types: Matrix4
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(const Matrix4 &m) noexcept
Related types: Matrix4
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
ToMatrix3¶
Matrix3 ludus::foundation::math::ToMatrix3(Quaternion q) noexcept
Related types: Matrix3 · Quaternion
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
TryToRotation¶
MathStatus ludus::foundation::math::TryToRotation(const Matrix3 &basis, RotationExtractionPolicy policy, Quaternion &out) noexcept
Related types: MathStatus · Matrix3 · Quaternion · RotationExtractionPolicy
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
TryToRotation¶
MathStatus ludus::foundation::math::TryToRotation(const Matrix3 &basis, Quaternion &out) noexcept
Related types: MathStatus · Matrix3 · Quaternion
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
TryInverse¶
MathStatus ludus::foundation::math::TryInverse(const Matrix3 &m, InversePolicy policy, Matrix3 &out) noexcept
Related types: MathStatus · InversePolicy · Matrix3
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
TryInverse¶
MathStatus ludus::foundation::math::TryInverse(const Matrix4 &m, InversePolicy policy, Matrix4 &out) noexcept
Related types: MathStatus · InversePolicy · Matrix4
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
TryInverse¶
MathStatus ludus::foundation::math::TryInverse(const Matrix3 &m, Matrix3 &out) noexcept
Related types: MathStatus · Matrix3
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
TryInverse¶
MathStatus ludus::foundation::math::TryInverse(const Matrix4 &m, Matrix4 &out) noexcept
Related types: MathStatus · Matrix4
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
TryComputeSymmetricMetropolisAcceptance¶
MathStatus ludus::foundation::math::TryComputeSymmetricMetropolisAcceptance(float32 currentTarget, float32 proposedTarget, float32 &outAcceptance) noexcept
Returns
Related types: float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/metropolis.hpp
TryComputeJumpRestoreRates¶
MathStatus ludus::foundation::math::TryComputeJumpRestoreRates(float32 target, float32 restorationScale, JumpRestoreRates &outRates) noexcept
Returns
Related types: float32 · MathStatus · JumpRestoreRates
Declared in modules/foundation/math/include/ludus/foundation/math/metropolis.hpp
TrySampleJumpRestoreHoldingTime¶
MathStatus ludus::foundation::math::TrySampleJumpRestoreHoldingTime(float32 ticket, float32 meanHoldingTime, float32 &outTime) noexcept
Returns
Related types: float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/metropolis.hpp
TryMutateMetropolisPrimary¶
MathStatus ludus::foundation::math::TryMutateMetropolisPrimary(float32 current, float32 ticket, float32 radius, bool isLargeStep, float32 &outSample) noexcept
Returns
Related types: float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/metropolis.hpp
TryAdvanceMetropolisTour¶
MathStatus ludus::foundation::math::TryAdvanceMetropolisTour(float32 acceptance, MetropolisTour &inoutTour) noexcept
Returns
Related types: float32 · MathStatus · MetropolisTour
Declared in modules/foundation/math/include/ludus/foundation/math/metropolis.hpp
TryAddWeightedRadiance¶
MathStatus ludus::foundation::math::TryAddWeightedRadiance(Vector3 radiance, float32 weight, WeightedRadiance &inoutAccumulation) noexcept
Returns
Related types: float32 · MathStatus · Vector3 · WeightedRadiance
Declared in modules/foundation/math/include/ludus/foundation/math/metropolis.hpp
TryResolveWeightedRadiance¶
MathStatus ludus::foundation::math::TryResolveWeightedRadiance(const WeightedRadiance &accumulation, Vector3 &outRadiance) noexcept
Returns
Related types: MathStatus · Vector3 · WeightedRadiance
Declared in modules/foundation/math/include/ludus/foundation/math/metropolis.hpp
TryEvaluatePatch¶
MathStatus ludus::foundation::math::TryEvaluatePatch(const BicubicBezierPatch &patch, PatchParameter parameter, Vector3 &out) noexcept
Related types: MathStatus · BicubicBezierPatch · PatchParameter · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/patch.hpp
TryEvaluatePatch¶
MathStatus ludus::foundation::math::TryEvaluatePatch(const BicubicBezierPatch &patch, PatchParameter parameter, PatchSample &out) noexcept
Returns
Related types: MathStatus · BicubicBezierPatch · PatchParameter · PatchSample
Declared in modules/foundation/math/include/ludus/foundation/math/patch.hpp
TrySplitPatch¶
MathStatus ludus::foundation::math::TrySplitPatch(const BicubicBezierPatch &patch, PatchParameter parameter, PatchSubdivision &out) noexcept
Related types: MathStatus · BicubicBezierPatch · PatchParameter · PatchSubdivision
Declared in modules/foundation/math/include/ludus/foundation/math/patch.hpp
TryPatchNormal¶
MathStatus ludus::foundation::math::TryPatchNormal(const PatchSample &sample, PatchNormalPolicy policy, Vector3 &out) noexcept
Related types: MathStatus · PatchNormalPolicy · PatchSample · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/patch.hpp
TryMakeRelative¶
MathStatus ludus::foundation::math::TryMakeRelative(Vector3d position, Vector3d origin, float64 maxAbsComponent, Vector3 &out) noexcept
Related types: float64 · MathStatus · Vector3 · Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/precision.hpp
TryClipProjectedPolygonToUpperHemisphere¶
MathStatus ludus::foundation::math::TryClipProjectedPolygonToUpperHemisphere(const ProjectedPolygonInput &polygon, ProjectedPolygonInput &outPolygon) noexcept
| Parameter | Description |
|---|---|
polygon |
Three to MAX_PROJECTED_POLYGON_INPUT_VERTICES tangent-space vertices.
|
outPolygon |
Clipped directions with a positive common scale removed, or VertexCount zero for an empty/all-zero polygon. Absolute vertex distances are not retained.
|
Returns
Related types: MathStatus · ProjectedPolygonInput
Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp
TryPrepareProjectedSolidAnglePolygon¶
MathStatus ludus::foundation::math::TryPrepareProjectedSolidAnglePolygon(const ProjectedPolygonInput &polygon, ProjectedSolidAnglePolygon &outPolygon) noexcept
| Parameter | Description |
|---|---|
polygon |
Convex polygon in tangent space; see ProjectedPolygonInput.
|
outPolygon |
Prepared state; written only on success.
|
Returns
Related types: MathStatus · ProjectedPolygonInput · ProjectedSolidAnglePolygon
Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp
TrySampleProjectedSolidAnglePolygon¶
MathStatus ludus::foundation::math::TrySampleProjectedSolidAnglePolygon(const ProjectedSolidAnglePolygon &polygon, Vector2 randomNumbers, Vector3 &outDirectionTangent) noexcept
| Parameter | Description |
|---|---|
polygon |
Output of TryPrepareProjectedSolidAnglePolygon.
|
randomNumbers |
Uniform random numbers, each in [0, 1].
|
outDirectionTangent |
Unit tangent-space direction with z >= 0; written only on success.
|
Returns
Related types: MathStatus · ProjectedSolidAnglePolygon · Vector2 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp
EvaluateProjectedSolidAnglePolygonDensity¶
float32 ludus::foundation::math::EvaluateProjectedSolidAnglePolygonDensity(const ProjectedSolidAnglePolygon &polygon, Vector3 directionTangent) noexcept
| Parameter | Description |
|---|---|
polygon |
Output of TryPrepareProjectedSolidAnglePolygon.
|
directionTangent |
Unit tangent-space direction.
|
Returns
Related types: float32 · ProjectedSolidAnglePolygon · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp
TryLookAt¶
MathStatus ludus::foundation::math::TryLookAt(Vector3 eye, Vector3 target, Vector3 upHint, Matrix4 &outView) noexcept
Related types: MathStatus · Matrix4 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/projection.hpp
TryPerspectiveReverseZ¶
MathStatus ludus::foundation::math::TryPerspectiveReverseZ(float32 verticalFovRadians, float32 aspect, float32 nearPlane, float32 farPlane, Matrix4 &out) noexcept
Related types: float32 · MathStatus · Matrix4
Declared in modules/foundation/math/include/ludus/foundation/math/projection.hpp
TryPerspectiveReverseZInfinite¶
MathStatus ludus::foundation::math::TryPerspectiveReverseZInfinite(float32 verticalFovRadians, float32 aspect, float32 nearPlane, Matrix4 &out) noexcept
Related types: float32 · MathStatus · Matrix4
Declared in modules/foundation/math/include/ludus/foundation/math/projection.hpp
TryOrthographicReverseZ¶
MathStatus ludus::foundation::math::TryOrthographicReverseZ(float32 left, float32 right, float32 bottom, float32 top, float32 nearPlane, float32 farPlane, Matrix4 &out) noexcept
Related types: float32 · MathStatus · Matrix4
Declared in modules/foundation/math/include/ludus/foundation/math/projection.hpp
TryNdcToFramebuffer¶
MathStatus ludus::foundation::math::TryNdcToFramebuffer(Vector3 ndc, Viewport viewport, Vector2 &out) noexcept
Related types: MathStatus · Vector2 · Vector3 · Viewport
Declared in modules/foundation/math/include/ludus/foundation/math/projection.hpp
TryFramebufferToNdc¶
MathStatus ludus::foundation::math::TryFramebufferToNdc(Vector2 pixel, Viewport viewport, Vector2 &out) noexcept
Related types: MathStatus · Vector2 · Viewport
Declared in modules/foundation/math/include/ludus/foundation/math/projection.hpp
QuaternionIdentity¶
constexpr Quaternion ludus::foundation::math::QuaternionIdentity() noexcept
Related types: Quaternion
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
operator*¶
constexpr Quaternion ludus::foundation::math::operator*(Quaternion a, Quaternion b) noexcept
Related types: Quaternion
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
Conjugate¶
constexpr Quaternion ludus::foundation::math::Conjugate(Quaternion q) noexcept
Related types: Quaternion
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
Dot¶
constexpr float32 ludus::foundation::math::Dot(Quaternion a, Quaternion b) noexcept
Related types: float32 · Quaternion
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(Quaternion q) noexcept
Related types: Quaternion
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
TryNormalize¶
MathStatus ludus::foundation::math::TryNormalize(Quaternion q, Quaternion &out) noexcept
Related types: MathStatus · Quaternion
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
TryFromAxisAngle¶
MathStatus ludus::foundation::math::TryFromAxisAngle(Vector3 axis, float32 angleRadians, Quaternion &out) noexcept
Related types: float32 · MathStatus · Quaternion · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
Rotate¶
Vector3 ludus::foundation::math::Rotate(Quaternion q, Vector3 v) noexcept
Related types: Quaternion · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
TryRotationBetween¶
MathStatus ludus::foundation::math::TryRotationBetween(Vector3 from, Vector3 to, Quaternion &out) noexcept
Related types: MathStatus · Quaternion · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
NlerpShortest¶
Quaternion ludus::foundation::math::NlerpShortest(Quaternion a, Quaternion b, float32 t) noexcept
Related types: float32 · Quaternion
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
SlerpShortest¶
Quaternion ludus::foundation::math::SlerpShortest(Quaternion a, Quaternion b, float32 t) noexcept
Related types: float32 · Quaternion
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
SameRotation¶
bool ludus::foundation::math::SameRotation(Quaternion a, Quaternion b, float32 toleranceRadians) noexcept
Related types: float32 · Quaternion
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
TryMakePlane¶
MathStatus ludus::foundation::math::TryMakePlane(Vector3 normal, Vector3 point, Plane &out) noexcept
normal, D = -dot(normal, point), narrow-checked. Related types: MathStatus · Plane · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryPlaneSignedDistance¶
MathStatus ludus::foundation::math::TryPlaneSignedDistance(const Plane &plane, Vector3 p, float32 &out) noexcept
Related types: float32 · MathStatus · Plane · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryProjectOntoPlane¶
MathStatus ludus::foundation::math::TryProjectOntoPlane(const Plane &plane, Vector3 p, Vector3 &out) noexcept
Related types: MathStatus · Plane · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryReflectVector¶
MathStatus ludus::foundation::math::TryReflectVector(const Plane &plane, Vector3 v, Vector3 &out) noexcept
Related types: MathStatus · Plane · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
Merge¶
Aabb3 ludus::foundation::math::Merge(const Aabb3 &a, const Aabb3 &b) noexcept
Related types: Aabb3
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
Merge¶
Aabb2 ludus::foundation::math::Merge(const Aabb2 &a, const Aabb2 &b) noexcept
Related types: Aabb2
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
Contains¶
bool ludus::foundation::math::Contains(const Aabb3 &box, Vector3 point) noexcept
Related types: Aabb3 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
Contains¶
bool ludus::foundation::math::Contains(const Aabb2 &box, Vector2 point) noexcept
Related types: Aabb2 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryTransformAabb¶
MathStatus ludus::foundation::math::TryTransformAabb(const Affine3 &a, const Aabb3 &box, Aabb3 &out) noexcept
Related types: MathStatus · Aabb3 · Affine3
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryTransformAabb¶
MathStatus ludus::foundation::math::TryTransformAabb(const Affine2 &a, const Aabb2 &box, Aabb2 &out) noexcept
Related types: MathStatus · Aabb2 · Affine2
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryOffsetRayOrigin¶
MathStatus ludus::foundation::math::TryOffsetRayOrigin(const RayOriginOffset &, Vector3 &output) noexcept
Related types: MathStatus · RayOriginOffset · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
IsValidInterval¶
bool ludus::foundation::math::IsValidInterval(const RayInterval &interval) noexcept
Related types: RayInterval
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryRayAabb¶
MathStatus ludus::foundation::math::TryRayAabb(const Ray3 &ray, const Aabb3 &box, const RayInterval &interval, RayHit &out) noexcept
Related types: MathStatus · Aabb3 · Ray3 · RayHit · RayInterval
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryRaySphere¶
MathStatus ludus::foundation::math::TryRaySphere(const Ray3 &ray, const Sphere &sphere, const RayInterval &interval, RayHit &out) noexcept
Related types: MathStatus · Ray3 · RayHit · RayInterval · Sphere
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryClosestPointsSegments¶
MathStatus ludus::foundation::math::TryClosestPointsSegments(Vector3 p0, Vector3 p1, Vector3 q0, Vector3 q1, SegmentClosest &out) noexcept
Related types: MathStatus · SegmentClosest · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryExtractFrustum¶
MathStatus ludus::foundation::math::TryExtractFrustum(const Matrix4 &worldToClip, FrustumMode mode, Frustum &out) noexcept
Related types: MathStatus · FrustumMode · Frustum · Matrix4
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryClassifySphere¶
MathStatus ludus::foundation::math::TryClassifySphere(const Frustum &frustum, const Sphere &sphere, float32 margin, FrustumRelation &out) noexcept
Related types: float32 · MathStatus · FrustumRelation · Frustum · Sphere
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
TryClassifyAabb¶
MathStatus ludus::foundation::math::TryClassifyAabb(const Frustum &frustum, const Aabb3 &box, float32 margin, FrustumRelation &out) noexcept
Related types: float32 · MathStatus · FrustumRelation · Aabb3 · Frustum
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
IsRandomDomainInRange¶
constexpr bool ludus::foundation::math::IsRandomDomainInRange(uint32 id, RandomDomainOwner owner) noexcept
Related types: uint32 · RandomDomainOwner
Declared in modules/foundation/math/include/ludus/foundation/math/random_domains.hpp
CheckRandomDomains¶
template <usize Count>
constexpr RandomDomainCheck ludus::foundation::math::CheckRandomDomains(const RandomDomain(&domains)[Count], RandomDomainOwner owner) noexcept
static_assert(CheckRandomDomains(DOMAINS, RandomDomainOwner::Game).Status == MathStatus::Success). The comparison is quadratic in the entry count, which suits hand-maintained manifests. | Parameter | Description |
|---|---|
domains |
The manifest entries, in any order.
|
owner |
The range every entry must use.
|
Returns
Related types: RandomDomainOwner · RandomDomain · RandomDomainCheck
Declared in modules/foundation/math/include/ludus/foundation/math/random_domains.hpp
TryConvertToFloat32¶
bool ludus::foundation::math::TryConvertToFloat32(float64 value, float32 &outValue) noexcept
| Parameter | Description |
|---|---|
value |
Finite input to narrow; NaN, infinities and finite range overflow reject.
|
outValue |
Converted value on true; preserved on false.
|
Returns
Related types: float32 · float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
ComputeErrorFunction¶
float32 ludus::foundation::math::ComputeErrorFunction(float32 value) noexcept
Note
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
ComputeErrorFunction¶
float64 ludus::foundation::math::ComputeErrorFunction(float64 value) noexcept
Note
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
DegreesToRadians¶
constexpr float32 ludus::foundation::math::DegreesToRadians(float32 degrees) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
RadiansToDegrees¶
constexpr float32 ludus::foundation::math::RadiansToDegrees(float32 radians) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
DegreesToRadians¶
constexpr float64 ludus::foundation::math::DegreesToRadians(float64 degrees) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
RadiansToDegrees¶
constexpr float64 ludus::foundation::math::RadiansToDegrees(float64 radians) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Abs¶
constexpr float32 ludus::foundation::math::Abs(float32 value) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Abs¶
constexpr float64 ludus::foundation::math::Abs(float64 value) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Min¶
template <typename ScalarType>
constexpr ScalarType ludus::foundation::math::Min(ScalarType a, ScalarType b) noexcept
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Max¶
template <typename ScalarType>
constexpr ScalarType ludus::foundation::math::Max(ScalarType a, ScalarType b) noexcept
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Clamp¶
template <typename ScalarType>
constexpr ScalarType ludus::foundation::math::Clamp(ScalarType value, ScalarType lo, ScalarType hi) noexcept
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(float32 value) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(float64 value) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
IsNaN¶
constexpr bool ludus::foundation::math::IsNaN(float32 value) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
IsNaN¶
constexpr bool ludus::foundation::math::IsNaN(float64 value) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Sqrt¶
float32 ludus::foundation::math::Sqrt(float32 value) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Sqrt¶
float64 ludus::foundation::math::Sqrt(float64 value) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Sin¶
float32 ludus::foundation::math::Sin(float32 radians) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Sin¶
float64 ludus::foundation::math::Sin(float64 radians) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Cos¶
float32 ludus::foundation::math::Cos(float32 radians) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Cos¶
float64 ludus::foundation::math::Cos(float64 radians) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Atan2¶
float32 ludus::foundation::math::Atan2(float32 y, float32 x) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Atan2¶
float64 ludus::foundation::math::Atan2(float64 y, float64 x) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Exp¶
float64 ludus::foundation::math::Exp(float64 value) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Log¶
float64 ludus::foundation::math::Log(float64 value) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Floor¶
float64 ludus::foundation::math::Floor(float64 value) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Ceil¶
float64 ludus::foundation::math::Ceil(float64 value) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Pow¶
float64 ludus::foundation::math::Pow(float64 base, float64 exponent) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
DecodeSrgb¶
float32 ludus::foundation::math::DecodeSrgb(float32 value) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
EncodeSrgb¶
float32 ludus::foundation::math::EncodeSrgb(float32 value) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
NextFloatDown¶
float32 ludus::foundation::math::NextFloatDown(float32 value) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
ComputeStandardNormalQuantile¶
float64 ludus::foundation::math::ComputeStandardNormalQuantile(float64 probability) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
ComputeStandardNormalQuantile¶
float32 ludus::foundation::math::ComputeStandardNormalQuantile(float32 probability) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Lerp¶
float32 ludus::foundation::math::Lerp(float32 a, float32 b, float32 t) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
Lerp¶
float64 ludus::foundation::math::Lerp(float64 a, float64 b, float64 t) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
SmoothStep01¶
float32 ludus::foundation::math::SmoothStep01(float32 t) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
SmoothStep01¶
float64 ludus::foundation::math::SmoothStep01(float64 t) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
TrySmoothStep¶
MathStatus ludus::foundation::math::TrySmoothStep(float32 edge0, float32 edge1, float32 x, float32 &out) noexcept
Related types: float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
TrySmoothStep¶
MathStatus ludus::foundation::math::TrySmoothStep(float64 edge0, float64 edge1, float64 x, float64 &out) noexcept
Related types: float64 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
NearlyEqual¶
bool ludus::foundation::math::NearlyEqual(float32 a, float32 b, float32 absTol, float32 relTol) noexcept
Related types: float32
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
NearlyEqual¶
bool ludus::foundation::math::NearlyEqual(float64 a, float64 b, float64 absTol, float64 relTol) noexcept
Related types: float64
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
TryApproachExponential¶
MathStatus ludus::foundation::math::TryApproachExponential(float32 current, float32 target, float32 rate, float32 dt, float32 &out) noexcept
current toward a constant target over dt at the given rate. Related types: float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
TryApproachExponential¶
MathStatus ludus::foundation::math::TryApproachExponential(float64 current, float64 target, float64 rate, float64 dt, float64 &out) noexcept
current toward a constant target over dt at the given rate. Related types: float64 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
TryClipShadingNormalToOutgoingHemisphere¶
MathStatus ludus::foundation::math::TryClipShadingNormalToOutgoingHemisphere(Vector3 normal, Vector3 outgoingDirection, Vector3 &outNormal) noexcept
| Parameter | Description |
|---|---|
normal |
Unit shading normal, for example an interpolated or normal-mapped normal.
|
outgoingDirection |
Unit direction from the surface towards the viewer.
|
outNormal |
The clipped unit normal; unchanged on failure.
|
Returns
Note
Related types: MathStatus · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/shading_normal.hpp
IsSuccess¶
constexpr bool ludus::foundation::math::IsSuccess(MathStatus status) noexcept
Related types: MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/status.hpp
TryComputePairwiseConfidenceScale¶
MathStatus ludus::foundation::math::TryComputePairwiseConfidenceScale(uint32 drawCount, uint32 neighborCount, float32 &outScale) noexcept
| Parameter | Description |
|---|---|
drawCount |
Positive number of independent with-replacement draws.
|
neighborCount |
Number of noncanonical proposals in the reuse set; may be zero.
|
outScale |
Written on success; preserved on failure.
|
Returns
Related types: float32 · uint32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/stochastic_pairwise_mis.hpp
TryComputePairwiseCanonicalBase¶
MathStatus ludus::foundation::math::TryComputePairwiseCanonicalBase(float32 confidenceSum, float32 canonicalConfidence, float32 &outWeight) noexcept
| Parameter | Description |
|---|---|
confidenceSum |
Sum of all scaled noncanonical confidences; finite and nonnegative.
|
canonicalConfidence |
Finite positive confidence of the destination proposal.
|
outWeight |
Written on success; preserved on failure.
|
Returns
Related types: float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/stochastic_pairwise_mis.hpp
TryComputePairwiseNeighborMis¶
MathStatus ludus::foundation::math::TryComputePairwiseNeighborMis(float32 neighborConfidence, float32 confidenceSum, float32 canonicalConfidence, float32 sourceTargetInDestinationMeasure, float32 destinationTarget, float32 &outWeight) noexcept
| Parameter | Description |
|---|---|
neighborConfidence |
Scaled confidence of this noncanonical proposal in common confidence units.
|
confidenceSum |
Sum of all scaled noncanonical confidences; finite and nonnegative.
|
canonicalConfidence |
Finite positive confidence of the destination proposal.
|
sourceTargetInDestinationMeasure |
Finite nonnegative source target divided by its forward absolute Jacobian, including inverse proposal support.
|
destinationTarget |
Finite nonnegative destination density at this same shifted sample.
|
outWeight |
Written on success; preserved on failure.
|
Returns
Note
Related types: float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/stochastic_pairwise_mis.hpp
TryComputePairwiseCanonicalTerm¶
MathStatus ludus::foundation::math::TryComputePairwiseCanonicalTerm(float32 neighborConfidence, float32 confidenceSum, float32 canonicalConfidence, float32 sourceTargetInDestinationMeasure, float32 destinationTarget, float32 &outWeight) noexcept
| Parameter | Description |
|---|---|
neighborConfidence |
Scaled confidence of this noncanonical proposal in common confidence units.
|
confidenceSum |
Sum of all scaled noncanonical confidences; finite and nonnegative.
|
canonicalConfidence |
Finite positive confidence of the destination proposal.
|
sourceTargetInDestinationMeasure |
Finite nonnegative source target divided by its forward absolute Jacobian, including inverse proposal support.
|
destinationTarget |
Finite nonnegative destination density at this same shifted sample.
|
outWeight |
Written on success; preserved on failure.
|
Returns
Related types: float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/stochastic_pairwise_mis.hpp
TryComputeStochasticMisWeight¶
MathStatus ludus::foundation::math::TryComputeStochasticMisWeight(float32 misWeight, float32 selectionPmf, uint32 drawCount, float32 &outWeight) noexcept
| Parameter | Description |
|---|---|
misWeight |
Finite nonnegative MIS weight.
|
selectionPmf |
Actual probability of this drawn proposal in (0,1].
|
drawCount |
Positive number of independent with-replacement draws.
|
outWeight |
Written on success; preserved on failure.
|
Returns
Note
Related types: float32 · uint32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/stochastic_pairwise_mis.hpp
TryComputePairwiseShiftedTarget¶
MathStatus ludus::foundation::math::TryComputePairwiseShiftedTarget(float32 sourceTarget, float32 forwardJacobian, float32 &outTarget) noexcept
| Parameter | Description |
|---|---|
sourceTarget |
Finite nonnegative density in the source measure.
|
forwardJacobian |
Finite nonnegative absolute Jacobian from source to destination; zero denotes failed shift.
|
outTarget |
Written on success; preserved on failure.
|
Returns
Related types: float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/stochastic_pairwise_mis.hpp
TryComputePairwiseResamplingWeight¶
MathStatus ludus::foundation::math::TryComputePairwiseResamplingWeight(float32 misWeight, float32 destinationTarget, float32 sourceContributionWeight, float32 forwardJacobian, float32 &outWeight) noexcept
| Parameter | Description |
|---|---|
misWeight |
Finite nonnegative MIS weight, stochastically corrected when used for resampling.
|
destinationTarget |
Finite nonnegative destination density at this same shifted sample.
|
sourceContributionWeight |
Finite nonnegative input UCW in the source measure.
|
forwardJacobian |
Finite nonnegative absolute Jacobian from source to destination; zero denotes failed shift.
|
outWeight |
Written on success; preserved on failure.
|
Returns
Related types: float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/stochastic_pairwise_mis.hpp
TryComputePairwiseContributionWeight¶
MathStatus ludus::foundation::math::TryComputePairwiseContributionWeight(float32 weightSum, float32 selectedTarget, float32 &outWeight) noexcept
| Parameter | Description |
|---|---|
weightSum |
Finite nonnegative sum of streamed candidate resampling weights.
|
selectedTarget |
Selected density in the destination measure; positive for a nonempty sum.
|
outWeight |
Written on success; preserved on failure.
|
Returns
Related types: float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/stochastic_pairwise_mis.hpp
CompensatedDot¶
float64 ludus::foundation::math::CompensatedDot(Vector3d a, Vector3d b) noexcept
Related types: float64 · Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/summation.hpp
TransformPoint¶
constexpr Vector2 ludus::foundation::math::TransformPoint(const Affine2 &a, Vector2 p) noexcept
Related types: Affine2 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TransformVector¶
constexpr Vector2 ludus::foundation::math::TransformVector(const Affine2 &a, Vector2 v) noexcept
Related types: Affine2 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
Compose¶
constexpr Affine2 ludus::foundation::math::Compose(const Affine2 &a, const Affine2 &b) noexcept
Related types: Affine2
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(const Affine2 &a) noexcept
Related types: Affine2
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TransformPoint¶
constexpr Vector3 ludus::foundation::math::TransformPoint(const Affine3 &a, Vector3 p) noexcept
Related types: Affine3 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TransformVector¶
constexpr Vector3 ludus::foundation::math::TransformVector(const Affine3 &a, Vector3 v) noexcept
Related types: Affine3 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
Compose¶
constexpr Affine3 ludus::foundation::math::Compose(const Affine3 &a, const Affine3 &b) noexcept
Related types: Affine3
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(const Affine3 &a) noexcept
Related types: Affine3
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
LinearBlock¶
constexpr Matrix3 ludus::foundation::math::LinearBlock(const Affine3 &a) noexcept
Related types: Affine3 · Matrix3
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TryInverse¶
MathStatus ludus::foundation::math::TryInverse(const Affine2 &a, InversePolicy policy, Affine2 &out) noexcept
Related types: MathStatus · Affine2 · InversePolicy
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TryInverse¶
MathStatus ludus::foundation::math::TryInverse(const Affine3 &a, InversePolicy policy, Affine3 &out) noexcept
Related types: MathStatus · Affine3 · InversePolicy
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TryInverse¶
MathStatus ludus::foundation::math::TryInverse(const Affine2 &a, Affine2 &out) noexcept
Related types: MathStatus · Affine2
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TryInverse¶
MathStatus ludus::foundation::math::TryInverse(const Affine3 &a, Affine3 &out) noexcept
Related types: MathStatus · Affine3
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TryNormalMatrix¶
MathStatus ludus::foundation::math::TryNormalMatrix(const Affine3 &a, InversePolicy policy, Matrix3 &out) noexcept
Related types: MathStatus · Affine3 · InversePolicy · Matrix3
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TryTransformNormal¶
MathStatus ludus::foundation::math::TryTransformNormal(const Affine3 &a, Vector3 normal, Vector3 &out) noexcept
Related types: MathStatus · Affine3 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
ToAffine3¶
Affine3 ludus::foundation::math::ToAffine3(const TransformTRS &trs) noexcept
Related types: Affine3 · TransformTRS
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TryToAffine3¶
MathStatus ludus::foundation::math::TryToAffine3(const TransformTRS &trs, float32 rotationUnitTol, Affine3 &out) noexcept
Related types: float32 · MathStatus · Affine3 · TransformTRS
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
ToMatrix4¶
constexpr Matrix4 ludus::foundation::math::ToMatrix4(const Affine3 &a) noexcept
Related types: Affine3 · Matrix4
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TransformHomogeneous¶
constexpr Vector4 ludus::foundation::math::TransformHomogeneous(const Matrix4 &m, Vector4 p) noexcept
Related types: Matrix4 · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
TryPerspectiveDivide¶
MathStatus ludus::foundation::math::TryPerspectiveDivide(Vector4 clip, float32 minAbsW, Vector3 &out) noexcept
Related types: float32 · MathStatus · Vector3 · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
operator+¶
constexpr Vector2 ludus::foundation::math::operator+(Vector2 a, Vector2 b) noexcept
Related types: Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator-¶
constexpr Vector2 ludus::foundation::math::operator-(Vector2 a, Vector2 b) noexcept
Related types: Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator-¶
constexpr Vector2 ludus::foundation::math::operator-(Vector2 v) noexcept
Related types: Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator*¶
constexpr Vector2 ludus::foundation::math::operator*(Vector2 v, float32 s) noexcept
Related types: float32 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator*¶
constexpr Vector2 ludus::foundation::math::operator*(float32 s, Vector2 v) noexcept
Related types: float32 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator/¶
constexpr Vector2 ludus::foundation::math::operator/(Vector2 v, float32 s) noexcept
Related types: float32 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Dot¶
constexpr float32 ludus::foundation::math::Dot(Vector2 a, Vector2 b) noexcept
Related types: float32 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Cross¶
constexpr float32 ludus::foundation::math::Cross(Vector2 a, Vector2 b) noexcept
Related types: float32 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Hadamard¶
constexpr Vector2 ludus::foundation::math::Hadamard(Vector2 a, Vector2 b) noexcept
Related types: Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator+¶
constexpr Vector3 ludus::foundation::math::operator+(Vector3 a, Vector3 b) noexcept
Related types: Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator-¶
constexpr Vector3 ludus::foundation::math::operator-(Vector3 a, Vector3 b) noexcept
Related types: Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator-¶
constexpr Vector3 ludus::foundation::math::operator-(Vector3 v) noexcept
Related types: Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator*¶
constexpr Vector3 ludus::foundation::math::operator*(Vector3 v, float32 s) noexcept
Related types: float32 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator*¶
constexpr Vector3 ludus::foundation::math::operator*(float32 s, Vector3 v) noexcept
Related types: float32 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator/¶
constexpr Vector3 ludus::foundation::math::operator/(Vector3 v, float32 s) noexcept
Related types: float32 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Dot¶
constexpr float32 ludus::foundation::math::Dot(Vector3 a, Vector3 b) noexcept
Related types: float32 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Cross¶
constexpr Vector3 ludus::foundation::math::Cross(Vector3 a, Vector3 b) noexcept
Related types: Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Hadamard¶
constexpr Vector3 ludus::foundation::math::Hadamard(Vector3 a, Vector3 b) noexcept
Related types: Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator+¶
constexpr Vector4 ludus::foundation::math::operator+(Vector4 a, Vector4 b) noexcept
Related types: Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator-¶
constexpr Vector4 ludus::foundation::math::operator-(Vector4 a, Vector4 b) noexcept
Related types: Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator-¶
constexpr Vector4 ludus::foundation::math::operator-(Vector4 v) noexcept
Related types: Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator*¶
constexpr Vector4 ludus::foundation::math::operator*(Vector4 v, float32 s) noexcept
Related types: float32 · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator*¶
constexpr Vector4 ludus::foundation::math::operator*(float32 s, Vector4 v) noexcept
Related types: float32 · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator/¶
constexpr Vector4 ludus::foundation::math::operator/(Vector4 v, float32 s) noexcept
Related types: float32 · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Dot¶
constexpr float32 ludus::foundation::math::Dot(Vector4 a, Vector4 b) noexcept
Related types: float32 · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Hadamard¶
constexpr Vector4 ludus::foundation::math::Hadamard(Vector4 a, Vector4 b) noexcept
Related types: Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator+¶
constexpr Vector3d ludus::foundation::math::operator+(Vector3d a, Vector3d b) noexcept
Related types: Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator-¶
constexpr Vector3d ludus::foundation::math::operator-(Vector3d a, Vector3d b) noexcept
Related types: Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator-¶
constexpr Vector3d ludus::foundation::math::operator-(Vector3d v) noexcept
Related types: Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator*¶
constexpr Vector3d ludus::foundation::math::operator*(Vector3d v, float64 s) noexcept
Related types: float64 · Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
operator*¶
constexpr Vector3d ludus::foundation::math::operator*(float64 s, Vector3d v) noexcept
Related types: float64 · Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Hadamard¶
constexpr Vector3d ludus::foundation::math::Hadamard(Vector3d first, Vector3d second) noexcept
Related types: Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Dot¶
constexpr float64 ludus::foundation::math::Dot(Vector3d a, Vector3d b) noexcept
Related types: float64 · Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Cross¶
constexpr Vector3d ludus::foundation::math::Cross(Vector3d a, Vector3d b) noexcept
Related types: Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(Vector2 v) noexcept
Related types: Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(Vector3 v) noexcept
Related types: Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(Vector4 v) noexcept
Related types: Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
IsFinite¶
constexpr bool ludus::foundation::math::IsFinite(Vector3d v) noexcept
Related types: Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Lerp¶
Vector2 ludus::foundation::math::Lerp(Vector2 a, Vector2 b, float32 t) noexcept
Related types: float32 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Lerp¶
Vector3 ludus::foundation::math::Lerp(Vector3 a, Vector3 b, float32 t) noexcept
Related types: float32 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Lerp¶
Vector4 ludus::foundation::math::Lerp(Vector4 a, Vector4 b, float32 t) noexcept
Related types: float32 · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
LengthSquared¶
constexpr float32 ludus::foundation::math::LengthSquared(Vector2 v) noexcept
Related types: float32 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
LengthSquared¶
constexpr float32 ludus::foundation::math::LengthSquared(Vector3 v) noexcept
Related types: float32 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
LengthSquared¶
constexpr float32 ludus::foundation::math::LengthSquared(Vector4 v) noexcept
Related types: float32 · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
LengthSquared¶
constexpr float64 ludus::foundation::math::LengthSquared(Vector3d v) noexcept
Related types: float64 · Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Length¶
float32 ludus::foundation::math::Length(Vector2 v) noexcept
Related types: float32 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Length¶
float32 ludus::foundation::math::Length(Vector3 v) noexcept
Related types: float32 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Length¶
float32 ludus::foundation::math::Length(Vector4 v) noexcept
Related types: float32 · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Length¶
float64 ludus::foundation::math::Length(Vector3d v) noexcept
Related types: float64 · Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Distance¶
float32 ludus::foundation::math::Distance(Vector2 a, Vector2 b) noexcept
Related types: float32 · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Distance¶
float32 ludus::foundation::math::Distance(Vector3 a, Vector3 b) noexcept
Related types: float32 · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
Distance¶
float64 ludus::foundation::math::Distance(Vector3d a, Vector3d b) noexcept
Related types: float64 · Vector3d
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
TryNormalize¶
MathStatus ludus::foundation::math::TryNormalize(Vector2 v, float32 minLength, Vector2 &out) noexcept
Related types: float32 · MathStatus · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
TryNormalize¶
MathStatus ludus::foundation::math::TryNormalize(Vector3 v, float32 minLength, Vector3 &out) noexcept
Related types: float32 · MathStatus · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
TryNormalize¶
MathStatus ludus::foundation::math::TryNormalize(Vector4 v, float32 minLength, Vector4 &out) noexcept
Related types: float32 · MathStatus · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
TryNormalize¶
MathStatus ludus::foundation::math::TryNormalize(Vector2 v, Vector2 &out) noexcept
Related types: MathStatus · Vector2
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
TryNormalize¶
MathStatus ludus::foundation::math::TryNormalize(Vector3 v, Vector3 &out) noexcept
Related types: MathStatus · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
TryNormalize¶
MathStatus ludus::foundation::math::TryNormalize(Vector4 v, Vector4 &out) noexcept
Related types: MathStatus · Vector4
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
TryNormalizeOr¶
MathStatus ludus::foundation::math::TryNormalizeOr(Vector3 v, float32 minLength, Vector3 fallback, float32 unitTol, Vector3 &out) noexcept
fallback (which must itself be a finite unit vector within unitTol, else InvalidArgument). Related types: float32 · MathStatus · Vector3
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
TryAddReservoirCandidate¶
MathStatus ludus::foundation::math::TryAddReservoirCandidate(ReservoirCandidate candidate, WeightedReservoir &inoutReservoir, bool &outIsSelected)
| Parameter | Description |
|---|---|
candidate |
Weight and ticket of the candidate at stream position GetCandidateCount().
|
inoutReservoir |
Reservoir updated on success and left unchanged on failure.
|
outIsSelected |
Written on success: true when this candidate replaced the selection.
|
Returns
Related types: WeightedReservoir · MathStatus · ReservoirCandidate
Declared in modules/foundation/math/include/ludus/foundation/math/weighted_reservoir.hpp
TryComputeReservoirContributionWeight¶
MathStatus ludus::foundation::math::TryComputeReservoirContributionWeight(const WeightedReservoir &reservoir, float32 selectedTarget, float32 &outWeight) noexcept
| Parameter | Description |
|---|---|
reservoir |
Reservoir after the caller streamed all of its candidates.
|
selectedTarget |
Unnormalized target density of the selected candidate, as used in its weight. It must be a finite, positive, normal FP32 value when the reservoir has a selection.
|
outWeight |
Written on success with W, or with zero for an empty reservoir.
|
Returns
Related types: WeightedReservoir · float32 · MathStatus
Declared in modules/foundation/math/include/ludus/foundation/math/weighted_reservoir.hpp
Aliases¶
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
uint16¶
using ludus::foundation::core::uint16 = std::uint16_t
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
uint32¶
using ludus::foundation::core::uint32 = std::uint32_t
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
uint64¶
using ludus::foundation::core::uint64 = std::uint64_t
Declared in modules/foundation/math/include/ludus/foundation/math/addressed_random.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/batch.hpp
float64¶
using ludus::foundation::core::float64 = double
Declared in modules/foundation/math/include/ludus/foundation/math/enclosure.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
float64¶
using ludus::foundation::core::float64 = double
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
uint8¶
using ludus::foundation::core::uint8 = std::uint8_t
Declared in modules/foundation/math/include/ludus/foundation/math/geometry.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/linearly_transformed_cosine.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
float64¶
using ludus::foundation::core::float64 = double
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
usize¶
using ludus::foundation::core::usize = std::size_t
Declared in modules/foundation/math/include/ludus/foundation/math/matrix.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/precision.hpp
float64¶
using ludus::foundation::core::float64 = double
Declared in modules/foundation/math/include/ludus/foundation/math/precision.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp
uint32¶
using ludus::foundation::core::uint32 = std::uint32_t
Declared in modules/foundation/math/include/ludus/foundation/math/projected_solid_angle.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/projection.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/quaternion.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
float64¶
using ludus::foundation::core::float64 = double
Declared in modules/foundation/math/include/ludus/foundation/math/queries.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/random.hpp
uint32¶
using ludus::foundation::core::uint32 = std::uint32_t
Declared in modules/foundation/math/include/ludus/foundation/math/random.hpp
uint64¶
using ludus::foundation::core::uint64 = std::uint64_t
Declared in modules/foundation/math/include/ludus/foundation/math/random.hpp
uint32¶
using ludus::foundation::core::uint32 = std::uint32_t
Declared in modules/foundation/math/include/ludus/foundation/math/random_domains.hpp
usize¶
using ludus::foundation::core::usize = std::size_t
Declared in modules/foundation/math/include/ludus/foundation/math/random_domains.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
float64¶
using ludus::foundation::core::float64 = double
Declared in modules/foundation/math/include/ludus/foundation/math/scalar.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/shading_normal.hpp
uint8¶
using ludus::foundation::core::uint8 = std::uint8_t
Declared in modules/foundation/math/include/ludus/foundation/math/status.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/stochastic_pairwise_mis.hpp
uint32¶
using ludus::foundation::core::uint32 = std::uint32_t
Declared in modules/foundation/math/include/ludus/foundation/math/stochastic_pairwise_mis.hpp
float64¶
using ludus::foundation::core::float64 = double
Declared in modules/foundation/math/include/ludus/foundation/math/summation.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/transform.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
float64¶
using ludus::foundation::core::float64 = double
Declared in modules/foundation/math/include/ludus/foundation/math/vector.hpp
float32¶
using ludus::foundation::core::float32 = float
Declared in modules/foundation/math/include/ludus/foundation/math/weighted_reservoir.hpp
uint32¶
using ludus::foundation::core::uint32 = std::uint32_t
Declared in modules/foundation/math/include/ludus/foundation/math/weighted_reservoir.hpp