register.h¶
| File Path | engine/include/conjure/physics/register.h |
| API ↗ | Bodies, colliders and characters, Physics |
Registration entry points the engine's physics_subsystem calls: the eight component types (startup step 12, after scene::register_components), the collision mesh asset type with its importer, and the four systems.
Constants¶
| Name | Type | Value | Description |
|---|---|---|---|
SYSTEM_CONTACT_EVENTS |
inline constexpr core:: |
{"physics.contact_ |
|
SYSTEM_PULL_TRANSFORMS |
inline constexpr core:: |
{"physics.pull_ |
|
SYSTEM_PUSH_TRANSFORMS |
inline constexpr core:: |
{"physics.push_ |
|
SYSTEM_STEP |
inline constexpr core:: |
{"physics.step"} |
Functions¶
Public¶
register_asset_types¶
register_asset_types¶[[nodiscard]] CONJURE_API core::result<void> register_asset_types(
assets::asset_type_registry &types,
assets::importer_registry &importers);Registers conjure.physics.collision_mesh (version 1) with its CPU-only loader and its importer, which claims .obj by extension and also reads a .gltf or .glb whose .meta names it.
register_components¶
register_components¶[[nodiscard]] CONJURE_API core::result<void> register_components(
ecs::component_registry ®istry);Registers rigid_body, the five colliders, physics_material and character_controller in a fixed order. Idempotent per registry; errors are the registry's (NAME_CONFLICT, ...).
register_systems¶
register_systems¶[[nodiscard]] CONJURE_API core::result<void> register_systems(
ecs::scheduler &scheduler,
physics_world &world);Adds physics.push_transforms and physics.step (PHYSICS_STEP, MAIN_THREAD) and physics.pull_transforms (FIXED_END, PARALLEL) and physics.contact_events (FIXED_END, MAIN_THREAD). None runs while paused. NOT_ATTACHED before physics_world::attach. The world must outlive the scheduler. Call once per scheduler: a second call returns NAME_CONFLICT from its first system and adds nothing.