WINDAGE ENGINE v1.0.0
Contents

Docs / Reference

Reference

Every public type in the WindageEngine module, with the first line of its documentation and the guide that explains it.

Types

TypeKindWhat it isGuide
AnimationBindingstructWhich of a rig's joints each of a clip's joints drives, worked out once.Skeletons and clips
AnimationClipstructA named stretch of animation: what each joint does, and for how long.Skeletons and clips
AnimationClipErrorenumWhy a JointTrack or an AnimationClip could not be made from the data it was given.—
AnimationPlayheadstructWhere a character is in a clip: the clip, its mapping onto a rig, and the time.Skeletons and clips
AssetOrientationstructWhat space an asset was authored in, and the one matrix that brings it into this engine's.Loading meshes
AudioEngineclassPositional one-shot audio.Audio
AudioEngineErrorenumWhy an AudioEngine could not be made, or a sound could not be loaded into one.—
BindingOutcomeenumWhat putting an action on a key or a button did — see InputBindings/bind(_:to:reserving:) and PadBindings/bind(_:to:reserving:).—
BoundingBoxstructAn axis-aligned box, and the ray test that goes with it.Culling
CamerastructA first-person camera, in meters.Camera
CharacterControllerstructA body with feet: walking across the ground, standing on things, stepping up, falling off, and crouching.CharacterController
ClusteredLightsstructWhich lights reach each cluster, as the two arrays a shader reads.Clustered lights
ClusterGridstructThe 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
EngineenumIdentifying information for the engine itself.Your first game
EngineMarkenumThe engine's own mark: the Drift W — the initial, with the windage dialled in.The mark
EnvironmentMapclassThe lighting an environment contributes: what it looks like reflected, and what it looks like scattered.Sky and environment
EnvironmentMapErrorenumWhy an EnvironmentMap could not be made: which of its two cube textures the device would not create.—
FixedTimestepstructAdvances simulation in fixed increments, independently of how often — or how irregularly — frames arrive.Fixed timestep
FontAtlasclassA rasterized glyph sheet, built at launch from an installed font.The HUD
FontAtlasErrorenumWhy a FontAtlas could not be built.The HUD
FrameRendererclassDrives frames, owns the Metal 4 objects every renderer needs, and enforces the engine's reversed-Z depth convention.GameLoop
FrameRendererErrorenumWhy a FrameRenderer could not be made.GameLoop
FrustumstructThe planes of a view-projection, and whether a box is worth drawing.Culling
GameLoopprotocolWhat a game supplies to the engine's frame loop.GameLoop
HUDRendererclass—The HUD
HUDRendererErrorenumDraws the interface, after the scene has been tone mapped.The HUD
InputActionstructSomething a player does, which a key or a pad button can be bound to.—
InputBindingsstructWhich key does what, and the rules for changing it.Input and settings
InputStateclassCollects keyboard, mouse and gamepad into something the simulation can read.Input and settings
InstanceBatchesstructMany copies of the same meshes, grouped so each mesh is drawn once with an instance count.Many copies
InstanceBufferclassThe GPU half: a frame's instance transforms, in a buffer a vertex shader indexes with [[instance_id]].Many copies
InterfaceColorstructA color authored for the interface, not for the scene.The HUD
JointTrackstructKeyframes for one channel across every joint the clip touches.Skeletons and clips
JointTransformstructOne joint's placement relative to its parent, kept as translation, rotation and scale rather than as a matrix.Skeletons and clips
KeyCodestructA physical key, by its macOS virtual key code.Input and settings
LevelstructA level, as data rather than code.Levels and the editor
LevelEditorstructEditing a level, without a window.Levels and the editor
LevelErrorenumWhy a level could not be loaded.—
LightSetstructWhich lights reach a point, when there is more than one and it is not the sun.Clustered lights
LoadedMeshstructA mesh, the box that contains it in its own space, and what its surfaces are made of.Loading meshes
MaterialstructHow a surface responds to light: the metallic-roughness parameter set.Materials and textures
MeshDetailenumLevel 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
MeshLoaderenumLoads geometry from disk.Loading meshes
MeshLoaderErrorenum—Loading meshes
MovementInputstructWhat the player is asking the camera to do this step.CharacterController
PadBindingsstructWhich controller button does what.Input and settings
PadButtonenumA 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
ParticleEmitterstructParticles at a steady rate rather than in a burst.Particles
ParticleRecipestructWhat 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
ParticleRendererclass—Particles
ParticleRendererErrorenumDraws whatever a ParticleSystem says is alive, as camera-facing quads, into the scene.—
ParticleSystemstructDust, sparks and embers: the things that say something just happened.Particles
PlayerSettingsstructWhat a player sets once and expects to find set again.Input and settings
ProceduralSkystructA sky as a function of direction: radiance arriving from anywhere you point.Sky and environment
PunctualLightstructA light at a point, radiating in every direction.Clustered lights
RigstructA rig and everything it can do: one skeleton, and the clips authored against it.Skeletons and clips
RigLoaderenumReads a skeleton and its clips out of a USD file.Skeletons and clips
RigLoaderErrorenum—Skeletons and clips
SaveStorestructSomewhere to keep what a game remembers between runs.Saving
SceneObjectstructOne thing to draw: a mesh and where it sits.Hanging things off joints
SemanticVersionstructA semantic version, comparable so a consumer can check what it is building against.Saving
ShaderLibraryenumGets a Metal library, whether or not anything compiled one at build time.Your first game
ShaderLibraryErrorenumWhy ShaderLibrary could not supply a library.Your first game
ShadowAtlasclassShadow maps for the lights that are not the sun, packed into one texture.Shadows
ShadowAtlasErrorenumWhy a ShadowAtlas could not be made: which of its objects the device would not create.—
ShadowBatchstructOne kind of geometry for a shadow pass: a pipeline, and how to reach each thing drawn with it.—
ShadowBiasstructThe rasterizer's depth bias for a shadow pass: a constant part and a part scaled by the surface's slope to the light.—
ShadowBufferIndexenumWhere a shadow pass's argument table puts each thing, and therefore what a game's shadow vertex function must declare.—
ShadowCascadesstructWhere the shadow cascades begin, end, and hand over to each other.Shadows
ShadowCubesclassShadow maps for lights that radiate in every direction: a cube per light, six faces each.Shadows
ShadowCubesErrorenumWhy a ShadowCubes could not be made: which of its objects the device would not create.—
ShadowMapclassThe sun's shadow pass: the scene recorded from the light's point of view, once per cascade.Shadows
ShadowMapErrorenumWhy a ShadowMap could not be made: which of its objects the device would not create.—
ShadowPassstructWhich 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.—
SkeletonstructA rig: named joints, who each joint hangs off, and where the mesh was bound to them.Skeletons and clips
SkeletonErrorenum—Skeletons and clips
SkeletonPosestructA rig with a pose on it, and the matrices a vertex shader needs to wear it.Skeletons and clips
SplashScreenstructThe 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
StickResponseenumTurns a raw thumbstick reading into something usable.Input and settings
TextureOriginenumWhich corner of the image the mesh's v = 0 is meant to land on.Materials and textures
TextureSlotenumWhich map a texture is, and therefore how it must be read.Materials and textures
TextureSourceenumWhere a texture comes from, before anything has loaded it.Materials and textures
TextureStoreclassLoads textures once and hands the same one back after that.Materials and textures
TextureStoreErrorenum—Materials and textures
ToneMappingstructHow 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
TransformHierarchystructThings that hang off other things: a lamp on a hand, a turret on a hull, a sight on a rifle.Hanging things off joints
TransformHierarchyErrorenumWhat is wrong with a TransformHierarchy that could not be built, or with local transforms it was given.—
VolumestructSomething a round can hit: an extent, and where it currently is.Hanging things off joints