Skip to main content

Module joint

Module joint 

Source

Structs§

DistanceJoint
(b2DistanceJoint)
Joint
Map from JointId to joint data in the solver sets. (b2Joint)
JointEdge
A joint edge connects bodies and joints together in a joint graph where each body is a node and each joint is an edge. (b2JointEdge)
JointSim
The base joint simulation data. (b2JointSim)
MotorJoint
(b2MotorJoint)
PrismaticJoint
(b2PrismaticJoint)
RevoluteJoint
(b2RevoluteJoint)
WeldJoint
(b2WeldJoint)
WheelJoint
(b2WheelJoint)

Enums§

JointPayload
The per-type joint payload. The C b2JointSim stores a b2JointType type tag plus a union; the Rust port stores this tagged enum. A filter joint has no simulation data.
JointType
Joint type enumeration. (types.h: b2JointType)

Functions§

create_distance_joint
(b2CreateDistanceJoint)
create_filter_joint
(b2CreateFilterJoint)
create_motor_joint
(b2CreateMotorJoint)
create_prismatic_joint
(b2CreatePrismaticJoint)
create_revolute_joint
(b2CreateRevoluteJoint)
create_weld_joint
(b2CreateWeldJoint)
create_wheel_joint
(b2CreateWheelJoint)
destroy_joint
(b2DestroyJoint)
destroy_joint_internal
Destroy a joint: unlink it from both bodies’ joint lists, the island graph, and the solver set or constraint graph that owns its sim, then free the id. (b2DestroyJointInternal — C takes the joint pointer; the Rust port takes the id.)
draw_joint
(b2DrawJoint)
get_joint_full_id
Validate a JointId and return the raw joint index. (b2GetJointFullId — C returns a pointer; Rust returns the index into world.joints)
get_joint_reaction
Reaction force/torque magnitudes for joint events. Returns (force, torque). (b2GetJointReaction — C returns through out-pointers)
get_joint_sim
Borrow a joint’s sim data mutably: constraint graph color for awake joints, otherwise the owning solver set. (b2GetJointSim)
get_joint_sim_check_type
(b2GetJointSimCheckType)
get_joint_sim_check_type_ref
Shared-reference variant of get_joint_sim_check_type.
get_joint_sim_ref
Shared-reference variant of get_joint_sim for read-only accessors. (The C b2GetJointSim is used for both; Rust needs the split.)
joint_get_angular_separation
(b2Joint_GetAngularSeparation)
joint_get_body_a
(b2Joint_GetBodyA)
joint_get_body_b
(b2Joint_GetBodyB)
joint_get_collide_connected
(b2Joint_GetCollideConnected)
joint_get_constraint_force
(b2Joint_GetConstraintForce)
joint_get_constraint_torque
(b2Joint_GetConstraintTorque)
joint_get_constraint_tuning
(b2Joint_GetConstraintTuning — C returns through out-pointers)
joint_get_force_threshold
(b2Joint_GetForceThreshold)
joint_get_linear_separation
(b2Joint_GetLinearSeparation)
joint_get_local_frame_a
(b2Joint_GetLocalFrameA)
joint_get_local_frame_b
(b2Joint_GetLocalFrameB)
joint_get_torque_threshold
(b2Joint_GetTorqueThreshold)
joint_get_type
(b2Joint_GetType)
joint_get_user_data
(b2Joint_GetUserData)
joint_is_valid
Joint id validity. (b2Joint_IsValid — the world-registry check collapses to the index/generation check in the registry-less port)
joint_set_collide_connected
(b2Joint_SetCollideConnected)
joint_set_constraint_tuning
(b2Joint_SetConstraintTuning)
joint_set_force_threshold
(b2Joint_SetForceThreshold)
joint_set_local_frame_a
(b2Joint_SetLocalFrameA)
joint_set_local_frame_b
(b2Joint_SetLocalFrameB)
joint_set_torque_threshold
(b2Joint_SetTorqueThreshold)
joint_set_user_data
(b2Joint_SetUserData)
joint_wake_bodies
(b2Joint_WakeBodies)
prepare_joint
(b2PrepareJoint)
solve_joint
(b2SolveJoint)
warm_start_joint
(b2WarmStartJoint)