Skip to main content

Crate concinnity_physics

Crate concinnity_physics 

Source
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§

BodyHandle
Opaque handle to a body inside a simulation.
CharacterCapsule
A character’s collision capsule: a cylinder of 2 * half_height capped by hemispheres of radius, standing on the y axis.
CharacterMove
Result of moving a character capsule for one tick.
CharacterMoveInput
One character-capsule move request.
ContactHit
One contact strong enough to pass the simulation’s force threshold.
DynamicParams
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.
JointMotor
Velocity-driven motor parameters for a revolute or prismatic joint.
LayerMask
Membership and filter bits applied to a collider or query.
PhysicsBudget
The reservation a world’s physics content implies.
PhysicsCounts
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.
SensorCrossing
One boundary crossing of a sensor region recorded during a step: something began or stopped overlapping the sensor tagged tag.
ShapeCast
A shape swept through the world along a straight line.
ShapeCastHit
What a ShapeCast ran into.
SimConfig
Tuning for one simulation.
Simulation
A rigid-body simulation: bodies fall under gravity, collide, and come to rest.

Enums§

ColliderShape
A collision shape, in the body’s local space.
JointSpec
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.