Expand description
Concinnity physics: the engine’s rigid-body simulation and the vocabulary
it is driven through, in its own crate so it names no engine domain type.
It provides the shapes, body parameters, joints, layer masks, and step
results that cross the boundary between a caller and the Simulation,
and the PhysicsBudget a world reserves its bodies against.
Everything crossing that boundary is plain data in the engine’s [f32; 3]
and Euler-degree representation, addressed by an opaque BodyHandle.
That is what lets the simulation hold whatever math types it likes without
those types reaching a caller.
Structs§
- Body
Handle - Opaque handle to a body inside a simulation.
- Character
Capsule - A character’s collision capsule: a cylinder of
2 * half_heightcapped by hemispheres ofradius, standing on the y axis. - Character
Move - Result of moving a character capsule for one tick.
- Character
Move Input - One character-capsule move request.
- Contact
Hit - One contact strong enough to pass the simulation’s force threshold.
- Dynamic
Params - Physical parameters for a dynamic (freely simulated) body.
- Inline
- The fan-out for a caller that has no threads to lend: every unit runs on the calling thread, in order.
- Joint
Motor - Velocity-driven motor parameters for a revolute or prismatic joint.
- Layer
Mask - Membership and filter bits applied to a collider or query.
- Physics
Budget - The reservation a world’s physics content implies.
- Physics
Counts - Tallies of a world’s authored physics content.
- RayHit
- One raycast hit: the surface point, its outward normal, and the distance from the ray origin.
- Sensor
Crossing - One boundary crossing of a sensor region recorded during a step: something
began or stopped overlapping the sensor tagged
tag. - Shape
Cast - A shape swept through the world along a straight line.
- Shape
Cast Hit - What a
ShapeCastran into. - SimConfig
- Tuning for one simulation.
- Simulation
- A rigid-body simulation: bodies fall under gravity, collide, and come to rest.
Enums§
- Collider
Shape - A collision shape, in the body’s local space.
- Joint
Spec - Constraint shape connecting two bodies.
Constants§
- GRAVITY
- Acceleration due to gravity in world units per second squared. Shared with the third-person controller so its jump takeoff matches the rig’s fall.
Traits§
- Fanout
- A caller’s way of running independent work at the same time.
Functions§
- euler_
deg_ from_ quat - Engine Euler degrees
[pitch, yaw, roll]for an[x, y, z, w]rotation quaternion, which need not be normalised. - quat_
from_ euler_ deg - The
[x, y, z, w]rotation quaternion for engine Euler degrees[pitch, yaw, roll], applied in YXZ order.