Skip to content

ludus::gameplay::camera

Ludus Wiki · API overview · Browse API

Namespace

Declared in modules/gameplay/camera/include/ludus/gameplay/camera/camera.hpp

Enumerations

CameraStatus

enum class CameraStatus : foundation::uint8
Result of camera evaluation; failures preserve caller outputs.

Related types: foundation::uint8

Success

Success
Complete validated result was published.

InvalidInput

InvalidInput
Nonfinite, unordered, nonunit or unsupported input.

OutOfRange

OutOfRange
A finite calculation exceeded its representable range.

MissingTarget

MissingTarget
The follow recipe has no resolved target.

Declared in modules/gameplay/camera/include/ludus/gameplay/camera/camera.hpp

CameraProjection

enum class CameraProjection : foundation::uint8
Explicit reverse-Z [0,1] projection policy; infinity is a tag, never a sentinel.

Related types: foundation::uint8

PerspectiveFinite

PerspectiveFinite
Perspective with positive near and finite far greater than near.

PerspectiveInfinite

PerspectiveInfinite
Perspective with positive near and no far plane.

OrthographicFinite

OrthographicFinite
Orthographic with nonnegative near and finite far greater than near.

Declared in modules/gameplay/camera/include/ludus/gameplay/camera/camera.hpp

CameraRecipe

enum class CameraRecipe : foundation::uint8
Initial C0 recipes; time-dependent recipes are introduced in later phases.

Related types: foundation::uint8

Fixed

Fixed
Publish the authored rigid pose and lens.

OrthographicFollow

OrthographicFollow
Follow an already interpolated target on world XY with fixed eye Z.

Declared in modules/gameplay/camera/include/ludus/gameplay/camera/evaluation.hpp

Functions

ValidateCameraSample

CameraStatus ludus::gameplay::camera::ValidateCameraSample(const CameraSample &sample) noexcept
Check finite pose, unit orientation, active lens fields and sample metadata. No allocation or thread affinity. Inactive lens fields are ignored.

Related types: CameraStatus · CameraSample

Declared in modules/gameplay/camera/include/ludus/gameplay/camera/camera.hpp

TryEvaluateCamera

CameraStatus ludus::gameplay::camera::TryEvaluateCamera(const CameraRigDefinition &definition, const CameraUpdateContext &context, const CameraTargetSample *target, CameraSample &output, CameraTrace *trace=nullptr) noexcept
Evaluate fixed or immediate XY orthographic follow, without allocations.
ParameterDescription
definition
Immutable authored recipe and nonzero revision, borrowed for this call.
context
Presentation metadata from the same target extraction.
target
Required only for follow; borrowed for this call, already interpolated.
output
Replaced only on Success, including when trace is omitted.
trace
Optional checkpoint, replaced only on Success; no diagnostic failure path.

Returns

Explicit validation/range/missing-target result; failure preserves both outputs.

Note

Stateless and thread independent. Follow requires identity rotation (either sign), has no dead zone, look-ahead, bounds or damping yet, and never changes simulation state.

Related types: CameraStatus · CameraRigDefinition · CameraSample · CameraTargetSample · CameraTrace · CameraUpdateContext

Declared in modules/gameplay/camera/include/ludus/gameplay/camera/evaluation.hpp