EPOK RUNTIME
epok::CollisionWorld2D
Class template
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 minimal snippet shows the normal syntax for reaching the type. 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.MethoddisablePerforms `disable` 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.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