EPOK RUNTIME
epok::CollisionWorld2D
Class template
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.
Class template
Bounded 2D collision world mirroring the shape of epok::CollisionWorld: fixed capacity, no allocation, conservative world AABBs for the broad phase and for sweeps, exact shape tests for triggers.
Basic usage
This generated sketch illustrates syntax for reaching the type; adapt it to the actual API contract. Open a member below for an operation-specific example.
C++ example
#include "world2d.hpp"
epok::CollisionWorld2D& value = /* obtain a valid instance from your game */;Fields and constants
Public methods
boundsPerforms `bounds` as part of the world2d module.MethodclearClears clear as part of the world2d module.MethodcolliderPerforms `collider` as part of the world2d module.MethoddisablePerforms `disable` as part of the world2d module.MethodgenerationPerforms `generation` as part of the world2d module.MethodlivePerforms `live` as part of the world2d module.Methodmove_and_slide_2dAxis-separated resolution: X is applied first and clipped against every blocking box whose Y span overlaps, then Y is applied against the updated position.MethodoverlapReturns the total number of matches; only the first `output_capacity` are written.MethodpositionPerforms `position` as part of the world2d module.Methodraycast2d`displacement` is the complete segment, not a unit direction.MethodsetSets set as part of the world2d module.MethodshrinkDrops trailing disabled slots from the scanned range after a burst of temporary entries, so later queries do not walk them.MethodsyncReplaces the whole live set in one call; slots beyond `count` become disabled and therefore produce trigger exits on the next update_triggers().Methodupdate_triggersEnter/Stay/Exit per pair, exactly once each, using the exact shape tests.Function template