Epok Engine

EPOK RUNTIME

World2D Service

world2d_service.hpp · the world2d service module

Declarations are extracted from the pinned headers. Examples and general guidance are generated sketches, not verified complete programs; consult the linked source and guides for the actual contract.

Module

the world2d service module.

Header
world2d_service.hpp
Include
#include "world2d_service.hpp"
Stability
Epok runtime API

Include this module

C++ include
#include "world2d_service.hpp"

Types

Functions and methods

active_cameraPerforms `active camera` as part of the world2d service module.Methodactor_atPerforms `actor at` as part of the world2d service module.MethodbackgroundBackground colour of the active camera, or null to keep the engine default.Methodcollect_spritesPerforms `collect sprites` as part of the world2d service module.Function templateconstrainPerforms `constrain` as part of the world2d service module.Methoddepth_bucket_ofThe ordering-table bucket of a Depth2D: the bucket of its distance, or of its anchor's view depth when `anchor_depth(entity, z)` resolves one (Q12; false: no 3D position), moved by its bias.Function templatedispatchPerforms `dispatch` as part of the world2d service module.Function templateeach_line_quadThe quads of a Line2D entry, one per segment, extended by half the width at inner joints so corners close.Function templateeach_particleThe particles of an emitter entry as sprites (texel rectangle, colour, corners).Function templateeach_particle_ofVisits (position, age fraction) of every live particle of `emitter`, oldest slots first.Function templateeach_polygon_triangleThe triangles of a Polygon2D entry.Function templateeach_tileEvery visible tile of a tile-layer entry, in row order.Function templateedit_forgetPerforms `edit forget` as part of the world2d service module.Methodedit_lookup---- runtime tile edits ------------------------------------------------------------Methodedit_storePerforms `edit store` as part of the world2d service module.Methodentry_spaceThe projection an expanded entry draws through, and its owner's world matrix.FunctionexchangeA one-dimensional collision along `axis`, with the lower restitution of the two.Methodfloor_div64Performs `floor div64` as part of the world2d service module.FunctionfollowPerforms `follow` as part of the world2d service module.MethodinstallPerforms `install` as part of the world2d service module.Functionjoint_endsThe two ends of a joint: positions, bodies (null for a fixed end) and whether valid.MethodmagnitudePerforms `magnitude` as part of the world2d service module.MethodmixPerforms `mix` as part of the world2d service module.FunctionmovePerforms `move` as part of the world2d service module.Methodnavigate---- simulation step --------------------------------------------------------------- After the level tick: animate, resolve this step's colliders and triggers, move the cameras to where the actors ended up, then scroll the parallax layers after them.MethodnoticeWhether a notifier's rectangle is inside the view; reports changes and, when asked, deactivates its owner off screen.MethodofPerforms `of` as part of the world2d service module.MethodoverlapPerforms `overlap` as part of the world2d service module.Methodphase_rangeThe sorted entries of one phase: items [first, last).FunctionplanPerforms `plan` as part of the world2d service module.MethodpointPerforms `point` as part of the world2d service module.Methodposition_ofPerforms `position of` as part of the world2d service module.MethodProjectorConstructs `epok::world2d::Projector` for the world2d service module.constructorraycastPerforms `raycast` as part of the world2d service module.Methodrelease---- particles ---------------------------------------------------------------------Methodrepeat_copiesScreen copies of a drawable under a repeating Parallax2D: calls `visit(dx, dy)` for every shift (in screen pixels) whose copy of `bounds` (min x, min y, max x, max y) is on screen.Function templateresetResets reset as part of the world2d service module.Methodrigid_of---- rigid bodies --------------------------------------------------------------------MethodscreenA projection that maps world pixels straight to screen pixels (screen canvases).Methodscreen_pixelPerforms `screen pixel` as part of the world2d service module.Functionsimulate_bodiesPerforms `simulate bodies` as part of the world2d service module.Methodsort_draw_itemsPerforms `sort draw items` as part of the world2d service module.FunctionspringPerforms `spring` as part of the world2d service module.MethodstepPerforms `step` as part of the world2d service module.Function templatesync---- collision ---------------------------------------------------------------------Methodtile_atPerforms `tile at` as part of the world2d service module.Methodtile_boxWorld box of one tile's collision shape, honouring the cell's flip and transpose flags.FunctiontimesPerforms `times` as part of the world2d service module.MethodtintPerforms `tint` as part of the world2d service module.FunctionTintsConstructs `epok::world2d::Tints` for the world2d service module.constructorview_cameraResolves every visible sprite and tile layer through the active camera (or the screen, for a screen canvas) into `draws`, and writes the back-to-front order into `items` (`scratch` is sort workspace).Functionz_keyPerforms `z key` as part of the world2d service module.Function

Fields, variables and values

arena_bytesExposes `arena_bytes` on `epok::world2d::Stats` for the world2d service module.FieldblendExposes `blend` on `epok::world2d::SpriteDraw` for the world2d service module.FieldcameraExposes `camera` on `epok::world2d::Projector` for the world2d service module.FieldcenterExposes `center` on `epok::world2d::Projector` for the world2d service module.FieldcollidersExposes `colliders` on `epok::world2d::Stats` for the world2d service module.FieldcolorExposes `color` on `epok::world2d::ShapeQuad` for the world2d service module.FieldcolorExposes `color` on `epok::world2d::SpriteDraw` for the world2d service module.FieldcolorsExposes `colors` on `epok::world2d::Tints` for the world2d service module.FieldcomponentExposes `component` on `epok::world2d::SpriteDraw` for the world2d service module.FieldcosineExposes `cosine` on `epok::world2d::Projector` for the world2d service module.FieldcountExposes `count` on `epok::world2d::Tints` for the world2d service module.FieldculledExposes `culled` on `epok::world2d::Stats` for the world2d service module.FielddepthThe Depth2D placing a sprite or tile layer in the 3D ordering table (Depth3D phase).FielddrawnExposes `drawn` on `epok::world2d::Stats` for the world2d service module.FielddroppedExposes `dropped` on `epok::world2d::Stats` for the world2d service module.Fielddropped_collidersExposes `dropped_colliders` on `epok::world2d::Stats` for the world2d service module.Fielddropped_particlesExposes `dropped_particles` on `epok::world2d::Stats` for the world2d service module.Fielddropped_tile_editsExposes `dropped_tile_edits` on `epok::world2d::Stats` for the world2d service module.Fielddropped_tile_probesExposes `dropped_tile_probes` on `epok::world2d::Stats` for the world2d service module.Fielddropped_trigger_pairsExposes `dropped_trigger_pairs` on `epok::world2d::Stats` for the world2d service module.Fieldflip_hExposes `flip_h` on `epok::world2d::SpriteDraw` for the world2d service module.Fieldflip_hExposes `flip_h` on `epok::world2d::TileDraw` for the world2d service module.Fieldflip_vExposes `flip_v` on `epok::world2d::SpriteDraw` for the world2d service module.Fieldflip_vExposes `flip_v` on `epok::world2d::TileDraw` for the world2d service module.FieldhExposes `h` on `epok::world2d::TileDraw` for the world2d service module.FieldidentityExposes `identity` on `epok::world2d::Projector` for the world2d service module.Fieldin_3dEntries of the last collected view drawn under the 3D world and inside its table.FieldindexExposes `index` on `epok::world2d::DrawItem` for the world2d service module.FieldkeyExposes `key` on `epok::world2d::DrawItem` for the world2d service module.FieldkeyExposes `key` on `epok::world2d::SpriteDraw` for the world2d service module.FieldkindEntries the renderer expands (tile layers, lines, polygons, particles): the component, whether it is drawn in screen pixels, and the screen shift of a repeated parallax copy (plus a screen canvas offset).FieldlayerExposes `layer` on `epok::world2d::DrawItem` for the world2d service module.FieldlayersExposes `layers` on `epok::world2d::Tints` for the world2d service module.FieldLineNamed value `Line` in `epok::world2d::DrawKind`.Enum valuenav_costGrid A* scratch for navigation agents (see world2d_navigation.hpp).Fieldnav_heapExposes `nav_heap` on `epok::world2d::Service` for the world2d service module.Fieldnav_infoExposes `nav_info` on `epok::world2d::Service` for the world2d service module.FieldoriginExposes `origin` on `epok::world2d::Projector` for the world2d service module.FieldpagesExposes `pages` on `epok::world2d::Stats` for the world2d service module.FieldparticlesExposes `particles` on `epok::world2d::Stats` for the world2d service module.FieldParticlesNamed value `Particles` in `epok::world2d::DrawKind`.Enum valuephaseExposes `phase` on `epok::world2d::DrawItem` for the world2d service module.FieldPolygonNamed value `Polygon` in `epok::world2d::DrawKind`.Enum valuequadsExposes `quads` on `epok::world2d::Stats` for the world2d service module.FieldrectangleUnrotated, unscaled, unflipped at zoom 1: a GP0 rectangle reproduces it exactly.FieldrectangleUnflipped and drawn one texel per pixel: a GP0 rectangle reproduces it exactly.FieldrectanglesExposes `rectangles` on `epok::world2d::Stats` for the world2d service module.FieldscaleExposes `scale` on `epok::world2d::Projector` for the world2d service module.FieldscreenExposes `screen` on `epok::world2d::SpriteDraw` for the world2d service module.FieldserviceExposes `service` on the `epok::world2d` namespace for the world2d service module.VariableshapesExposes `shapes` on `epok::world2d::Stats` for the world2d service module.FieldshiftExposes `shift` on `epok::world2d::SpriteDraw` for the world2d service module.FieldsineExposes `sine` on `epok::world2d::Projector` for the world2d service module.FieldsourceExposes `source` on `epok::world2d::SpriteDraw` for the world2d service module.FieldSpriteNamed value `Sprite` in `epok::world2d::DrawKind`.Enum valuespritesExposes `sprites` on `epok::world2d::Stats` for the world2d service module.FieldstatsExposes `stats` on the `epok::world2d` namespace for the world2d service module.VariabletextureExposes `texture` on `epok::world2d::SpriteDraw` for the world2d service module.Fieldtile_editsExposes `tile_edits` on `epok::world2d::Stats` for the world2d service module.Fieldtile_layersExposes `tile_layers` on `epok::world2d::Stats` for the world2d service module.Fieldtile_probesExposes `tile_probes` on `epok::world2d::Stats` for the world2d service module.FieldtilesExposes `tiles` on `epok::world2d::Stats` for the world2d service module.FieldTilesNamed value `Tiles` in `epok::world2d::DrawKind`.Enum valuetransposeExposes `transpose` on `epok::world2d::TileDraw` for the world2d service module.Fieldtrigger_pairsExposes `trigger_pairs` on `epok::world2d::Stats` for the world2d service module.FielduExposes `u` on `epok::world2d::ShapeTriangle` for the world2d service module.FielduExposes `u` on `epok::world2d::TileDraw` for the world2d service module.Fieldunder_3dEntries of the last collected view drawn under the 3D world and inside its table.FieldvExposes `v` on `epok::world2d::ShapeTriangle` for the world2d service module.FieldvExposes `v` on `epok::world2d::TileDraw` for the world2d service module.FieldwExposes `w` on `epok::world2d::TileDraw` for the world2d service module.FieldxExposes `x` on `epok::world2d::ShapeQuad` for the world2d service module.FieldxExposes `x` on `epok::world2d::ShapeTriangle` for the world2d service module.FieldxExposes `x` on `epok::world2d::SpriteDraw` for the world2d service module.FieldxExposes `x` on `epok::world2d::TileDraw` for the world2d service module.FieldyExposes `y` on `epok::world2d::ShapeQuad` for the world2d service module.FieldyExposes `y` on `epok::world2d::ShapeTriangle` for the world2d service module.FieldyExposes `y` on `epok::world2d::SpriteDraw` for the world2d service module.FieldyExposes `y` on `epok::world2d::TileDraw` for the world2d service module.Field