Docs / Reference
Reference
Every public type in the WindageEngine module, with the first line of its documentation and the guide that explains it.
Types
| Type | Kind | What it is | Guide |
|---|---|---|---|
AnimationBinding | struct | Which of a rig's joints each of a clip's joints drives, worked out once. | Skeletons and clips |
AnimationClip | struct | A named stretch of animation: what each joint does, and for how long. | Skeletons and clips |
AnimationClipError | enum | Why a JointTrack or an AnimationClip could not be made from the data it was given. | — |
AnimationPlayhead | struct | Where a character is in a clip: the clip, its mapping onto a rig, and the time. | Skeletons and clips |
AssetOrientation | struct | What space an asset was authored in, and the one matrix that brings it into this engine's. | Loading meshes |
AudioEngine | class | Positional one-shot audio. | Audio |
AudioEngineError | enum | Why an AudioEngine could not be made, or a sound could not be loaded into one. | — |
BindingOutcome | enum | What putting an action on a key or a button did — see InputBindings/bind(_:to:reserving:) and PadBindings/bind(_:to:reserving:). | — |
BoundingBox | struct | An axis-aligned box, and the ray test that goes with it. | Culling |
Camera | struct | A first-person camera, in meters. | Camera |
CharacterController | struct | A body with feet: walking across the ground, standing on things, stepping up, falling off, and crouching. | CharacterController |
ClusteredLights | struct | Which lights reach each cluster, as the two arrays a shader reads. | Clustered lights |
ClusterGrid | struct | The view frustum cut into a grid of cells, so a fragment can ask which lights reach it rather than inheriting a list chosen for the whole mesh it belongs to. | Clustered lights |
Engine | enum | Identifying information for the engine itself. | Your first game |
EngineMark | enum | The engine's own mark: the Drift W — the initial, with the windage dialled in. | The mark |
EnvironmentMap | class | The lighting an environment contributes: what it looks like reflected, and what it looks like scattered. | Sky and environment |
EnvironmentMapError | enum | Why an EnvironmentMap could not be made: which of its two cube textures the device would not create. | — |
FixedTimestep | struct | Advances simulation in fixed increments, independently of how often — or how irregularly — frames arrive. | Fixed timestep |
FontAtlas | class | A rasterized glyph sheet, built at launch from an installed font. | The HUD |
FontAtlasError | enum | Why a FontAtlas could not be built. | The HUD |
FrameRenderer | class | Drives frames, owns the Metal 4 objects every renderer needs, and enforces the engine's reversed-Z depth convention. | GameLoop |
FrameRendererError | enum | Why a FrameRenderer could not be made. | GameLoop |
Frustum | struct | The planes of a view-projection, and whether a box is worth drawing. | Culling |
GameLoop | protocol | What a game supplies to the engine's frame loop. | GameLoop |
HUDRenderer | class | — | The HUD |
HUDRendererError | enum | Draws the interface, after the scene has been tone mapped. | The HUD |
InputAction | struct | Something a player does, which a key or a pad button can be bound to. | — |
InputBindings | struct | Which key does what, and the rules for changing it. | Input and settings |
InputState | class | Collects keyboard, mouse and gamepad into something the simulation can read. | Input and settings |
InstanceBatches | struct | Many copies of the same meshes, grouped so each mesh is drawn once with an instance count. | Many copies |
InstanceBuffer | class | The GPU half: a frame's instance transforms, in a buffer a vertex shader indexes with [[instance_id]]. | Many copies |
InterfaceColor | struct | A color authored for the interface, not for the scene. | The HUD |
JointTrack | struct | Keyframes for one channel across every joint the clip touches. | Skeletons and clips |
JointTransform | struct | One joint's placement relative to its parent, kept as translation, rotation and scale rather than as a matrix. | Skeletons and clips |
KeyCode | struct | A physical key, by its macOS virtual key code. | Input and settings |
Level | struct | A level, as data rather than code. | Levels and the editor |
LevelEditor | struct | Editing a level, without a window. | Levels and the editor |
LevelError | enum | Why a level could not be loaded. | — |
LightSet | struct | Which lights reach a point, when there is more than one and it is not the sun. | Clustered lights |
LoadedMesh | struct | A mesh, the box that contains it in its own space, and what its surfaces are made of. | Loading meshes |
Material | struct | How a surface responds to light: the metallic-roughness parameter set. | Materials and textures |
MeshDetail | enum | Level of detail: simpler versions of a mesh, made when it loads, and the rule that picks one for how far away a copy stands. | Level of detail |
MeshLoader | enum | Loads geometry from disk. | Loading meshes |
MeshLoaderError | enum | — | Loading meshes |
MovementInput | struct | What the player is asking the camera to do this step. | CharacterController |
PadBindings | struct | Which controller button does what. | Input and settings |
PadButton | enum | A button on a controller, by where it is rather than what it is called. The bottom face button is A on an Xbox pad, Cross on a DualSense and B on a Nintendo one — three names for the same thumb position, and the position is what a player's hand learned. | Input and settings |
ParticleEmitter | struct | Particles at a steady rate rather than in a burst. | Particles |
ParticleRecipe | struct | What one kind of particle is: how many a burst throws, how they move, how long they last and what they look like while they do. | Particles |
ParticleRenderer | class | — | Particles |
ParticleRendererError | enum | Draws whatever a ParticleSystem says is alive, as camera-facing quads, into the scene. | — |
ParticleSystem | struct | Dust, sparks and embers: the things that say something just happened. | Particles |
PlayerSettings | struct | What a player sets once and expects to find set again. | Input and settings |
ProceduralSky | struct | A sky as a function of direction: radiance arriving from anywhere you point. | Sky and environment |
PunctualLight | struct | A light at a point, radiating in every direction. | Clustered lights |
Rig | struct | A rig and everything it can do: one skeleton, and the clips authored against it. | Skeletons and clips |
RigLoader | enum | Reads a skeleton and its clips out of a USD file. | Skeletons and clips |
RigLoaderError | enum | — | Skeletons and clips |
SaveStore | struct | Somewhere to keep what a game remembers between runs. | Saving |
SceneObject | struct | One thing to draw: a mesh and where it sits. | Hanging things off joints |
SemanticVersion | struct | A semantic version, comparable so a consumer can check what it is building against. | Saving |
ShaderLibrary | enum | Gets a Metal library, whether or not anything compiled one at build time. | Your first game |
ShaderLibraryError | enum | Why ShaderLibrary could not supply a library. | Your first game |
ShadowAtlas | class | Shadow maps for the lights that are not the sun, packed into one texture. | Shadows |
ShadowAtlasError | enum | Why a ShadowAtlas could not be made: which of its objects the device would not create. | — |
ShadowBatch | struct | One kind of geometry for a shadow pass: a pipeline, and how to reach each thing drawn with it. | — |
ShadowBias | struct | The rasterizer's depth bias for a shadow pass: a constant part and a part scaled by the surface's slope to the light. | — |
ShadowBufferIndex | enum | Where a shadow pass's argument table puts each thing, and therefore what a game's shadow vertex function must declare. | — |
ShadowCascades | struct | Where the shadow cascades begin, end, and hand over to each other. | Shadows |
ShadowCubes | class | Shadow maps for lights that radiate in every direction: a cube per light, six faces each. | Shadows |
ShadowCubesError | enum | Why a ShadowCubes could not be made: which of its objects the device would not create. | — |
ShadowMap | class | The sun's shadow pass: the scene recorded from the light's point of view, once per cascade. | Shadows |
ShadowMapError | enum | Why a ShadowMap could not be made: which of its objects the device would not create. | — |
ShadowPass | struct | Which pass a self-encoding ShadowBatch is being asked to draw into: so it can draw only what that pass can see. A sun cascade near the eye covers a few meters; drawing a whole wood into it was three quarters of a measured frame. | — |
Skeleton | struct | A rig: named joints, who each joint hangs off, and where the mesh was bound to them. | Skeletons and clips |
SkeletonError | enum | — | Skeletons and clips |
SkeletonPose | struct | A rig with a pose on it, and the matrices a vertex shader needs to wear it. | Skeletons and clips |
SplashScreen | struct | The engine saying its own name: a lockup of EngineMark and the name over a ground, for as long as a game wants and no longer. | The splash |
StickResponse | enum | Turns a raw thumbstick reading into something usable. | Input and settings |
TextureOrigin | enum | Which corner of the image the mesh's v = 0 is meant to land on. | Materials and textures |
TextureSlot | enum | Which map a texture is, and therefore how it must be read. | Materials and textures |
TextureSource | enum | Where a texture comes from, before anything has loaded it. | Materials and textures |
TextureStore | class | Loads textures once and hands the same one back after that. | Materials and textures |
TextureStoreError | enum | — | Materials and textures |
ToneMapping | struct | How radiance becomes a picture: an exposure, and a curve that fits an unbounded range into the zero-to-one a display can show. | Tone mapping |
TransformHierarchy | struct | Things that hang off other things: a lamp on a hand, a turret on a hull, a sight on a rifle. | Hanging things off joints |
TransformHierarchyError | enum | What is wrong with a TransformHierarchy that could not be built, or with local transforms it was given. | — |
Volume | struct | Something a round can hit: an extent, and where it currently is. | Hanging things off joints |