Skip to content

Commit af6d88d

Browse files
marijnfsCopilothazeycode
authored
Add missing bindings (#9)
Co-authored-by: Copilot <[email protected]> Co-authored-by: Chris Heyes <[email protected]>
1 parent a108639 commit af6d88d

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/zbullet.zig

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,6 +922,12 @@ const BodyImpl = opaque {
922922
pub const getRestitution = cbtBodyGetRestitution;
923923
extern fn cbtBodyGetRestitution(body: Body) f32;
924924

925+
pub const getTotalForce = cbtBodyGetTotalForce;
926+
extern fn cbtBodyGetTotalForce(body: Body, force: *[3]f32) void;
927+
928+
pub const getTotalTorque = cbtBodyGetTotalTorque;
929+
extern fn cbtBodyGetTotalTorque(body: Body, torque: *[3]f32) void;
930+
925931
pub const setFriction = cbtBodySetFriction;
926932
extern fn cbtBodySetFriction(body: Body, friction: f32) void;
927933

@@ -952,11 +958,23 @@ const BodyImpl = opaque {
952958
transform: *[12]f32,
953959
) void;
954960

961+
pub const applyCentralForce = cbtBodyApplyCentralForce;
962+
extern fn cbtBodyApplyCentralForce(body: Body, force: *const [3]f32) void;
963+
955964
pub const applyCentralImpulse = cbtBodyApplyCentralImpulse;
956965
extern fn cbtBodyApplyCentralImpulse(body: Body, impulse: *const [3]f32) void;
957966

967+
pub const applyForce = cbtBodyApplyForce;
968+
extern fn cbtBodyApplyForce(body: Body, force: *const [3]f32, rel_pos: *const [3]f32) void;
969+
970+
pub const applyImpulse = cbtBodyApplyImpulse;
971+
extern fn cbtBodyApplyImpulse(body: Body, impulse: *const [3]f32, rel_pos: *const [3]f32) void;
972+
958973
pub const applyBodyTorque = cbtBodyApplyTorque;
959-
extern fn cbtBodyApplyTorque(body: Body, impulse: *const [3]f32) void;
974+
extern fn cbtBodyApplyTorque(body: Body, torque: *const [3]f32) void;
975+
976+
pub const applyBodyTorqueImpulse = cbtBodyApplyTorqueImpulse;
977+
extern fn cbtBodyApplyTorqueImpulse(body: Body, impulse: *const [3]f32) void;
960978

961979
pub const setUserIndex = cbtBodySetUserIndex;
962980
extern fn cbtBodySetUserIndex(body: Body, slot: u32, index: i32) void;

0 commit comments

Comments
 (0)