![]() |
CRM64Pro GDK v0.20.0
A free cross-platform game development kit built on top of SDL 3.0
|
Physics module for 2D overlap tests, swept collisions, collision sets and kinematic helpers [v26.08.00].
Physics provides broad-phase AABB checks, shape-aware and pixel-aware object overlap tests, swept point collision and simple motion helpers. It is a geometry service: it does not own a simulation world or apply forces.
Collision sets hold persistent world-space rectangles, circles, ellipses, segments and polygons. They accelerate swept collision through a spatial grid and return the collision-set and collider IDs in PhysicsSweepHit. Scene object layers compile opted-in c64scn_blocks_particles objects into this shared geometry for particle effects.
Public configuration, mutation and lifetime calls are main-thread operations. Particle workers can query a frozen collision set only during a synchronous particle update; do not modify or close a set while that update is running. See Threading conventions.
Use AABB mode for broad gameplay checks, shape or pixel mode only when precision is required, and collision sets for repeated particle/world sweeps. Use Main::getLogicDeltaTime() for motion helpers.
Classes | |
| struct | CRM64Pro::PhysicsSweepHit |
| Result from a swept Physics collision query. More... | |
| class | CRM64Pro::Physics |
| Physics module class. More... | |
Enumerations | |
| enum | CRM64Pro::ePhysicsCollisionMode : Uint32 { CRM64Pro::PCM_AABB = 0 , CRM64Pro::PCM_SHAPE , CRM64Pro::PCM_PIXEL } |
| Collision mode for Physics overlap checks. More... | |
| enum CRM64Pro::ePhysicsCollisionMode : Uint32 |
Collision mode for Physics overlap checks.