Expand description
Joint builders and creation helpers (modularized).
Two creation styles are available:
- Scoped handles:
World::create_*_joint(&def) -> Jointreturning a scoped handle for immediate configuration/queries. Dropping the handle does not destroy the joint. - Owned handles:
World::create_*_joint_owned(&def) -> OwnedJointorWorld::*().build_owned() -> OwnedJointreturning a RAII handle that destroys the joint on drop. - ID style:
World::create_*_joint_id(&def) -> b2JointIdreturning the raw id for storage.
The World convenience builders (revolute, prismatic, wheel, distance, weld,
motor_joint, filter_joint) help compose joints in world space and build local frames
from world anchors/axes.
Structs§
- Constraint
Tuning - Shared constraint tuning (Hertz + damping ratio) used by Box2D joints.
- Distance
Joint Builder - Fluent builder for distance joints working in world space.
- Distance
Joint Def - Distance joint definition (maps to
b2DistanceJointDef). - Filter
Joint Builder - Builder for a filter joint that disables collision between two bodies while keeping them in the same island. Fluent builder for filter joints.
- Filter
Joint Def - Filter joint definition (maps to
b2FilterJointDef). A lightweight joint used primarily for contact filtering scenarios. - Joint
- A scoped joint handle tied to a mutable borrow of the world.
- Joint
Base - Base joint definition builder for common properties.
- Joint
Base Builder - Motor
Joint Builder - Fluent builder for motor joints.
- Motor
Joint Def - Motor joint definition (maps to
b2MotorJointDef). Drives relative motion between two bodies using linear and angular offsets with configurable maximum forces. - Owned
Joint - A RAII-owned joint that is destroyed on drop.
- Prismatic
Joint Builder - Builder for a prismatic joint in world space. Fluent builder for prismatic joints using world anchors and axis.
- Prismatic
Joint Def - Prismatic (slider) joint definition (maps to
b2PrismaticJointDef). - Revolute
Joint Builder - Builder for a revolute (hinge) joint in world space. Fluent builder for revolute joints using a world anchor.
- Revolute
Joint Def - Revolute (hinge) joint definition (maps to
b2RevoluteJointDef). - Weld
Joint Builder - Fluent builder for weld joints using a world anchor.
- Weld
Joint Def - Weld joint definition (maps to
b2WeldJointDef). Rigidly attaches two bodies at an anchor with optional soft-constraint tuning. - Wheel
Joint Builder - Fluent builder for wheel joints using world anchors and axis.
- Wheel
Joint Def - Wheel (suspension) joint definition (maps to
b2WheelJointDef).
Enums§
- Joint
Type - Joint kinds reported by Box2D.