@@ -436,26 +436,35 @@ pub const CharacterContactListener = extern struct {
436436
437437 pub const VTable = extern struct {
438438 __header : VTableHeader = .{},
439- OnAdjustBodyVelocity : * const fn (
439+ onAdjustBodyVelocity : * const fn (
440440 self : * CharacterContactListener ,
441441 character : * const CharacterVirtual ,
442442 body : * const Body ,
443443 io_linear_velocity : * [3 ]f32 ,
444444 io_angular_velocity : * [3 ]f32 ,
445445 ) callconv (.c ) void ,
446- OnContactValidate : * const fn (
446+ onContactValidate : * const fn (
447447 self : * CharacterContactListener ,
448448 character : * const CharacterVirtual ,
449449 body : * const Body ,
450450 sub_shape_id : * const SubShapeId ,
451451 ) callconv (.c ) bool ,
452- OnCharacterContactValidate : * const fn (
452+ onCharacterContactValidate : * const fn (
453453 self : * CharacterContactListener ,
454454 character : * const CharacterVirtual ,
455455 other_character : * const CharacterVirtual ,
456456 sub_shape_id : * const SubShapeId ,
457457 ) callconv (.c ) bool ,
458- OnContactAdded : * const fn (
458+ onContactAdded : * const fn (
459+ self : * CharacterContactListener ,
460+ character : * const CharacterVirtual ,
461+ body : * const Body ,
462+ sub_shape_id : * const SubShapeId ,
463+ contact_position : * const [3 ]Real ,
464+ contact_normal : * const [3 ]f32 ,
465+ io_settings : * CharacterContactSettings ,
466+ ) callconv (.c ) void ,
467+ onContactPersisted : * const fn (
459468 self : * CharacterContactListener ,
460469 character : * const CharacterVirtual ,
461470 body : * const Body ,
@@ -464,7 +473,13 @@ pub const CharacterContactListener = extern struct {
464473 contact_normal : * const [3 ]f32 ,
465474 io_settings : * CharacterContactSettings ,
466475 ) callconv (.c ) void ,
467- OnCharacterContactAdded : * const fn (
476+ onContactRemoved : * const fn (
477+ self : * CharacterContactListener ,
478+ character : * const CharacterVirtual ,
479+ body : * const Body ,
480+ sub_shape_id : * const SubShapeId ,
481+ ) callconv (.c ) void ,
482+ onCharacterContactAdded : * const fn (
468483 self : * CharacterContactListener ,
469484 character : * const CharacterVirtual ,
470485 other_character : * const CharacterVirtual ,
@@ -473,7 +488,22 @@ pub const CharacterContactListener = extern struct {
473488 contact_normal : * const [3 ]f32 ,
474489 io_settings : * CharacterContactSettings ,
475490 ) callconv (.c ) void ,
476- OnContactSolve : * const fn (
491+ onCharacterContactPersisted : * const fn (
492+ self : * CharacterContactListener ,
493+ character : * const CharacterVirtual ,
494+ other_character : * const CharacterVirtual ,
495+ sub_shape_id : * const SubShapeId ,
496+ contact_position : * const [3 ]Real ,
497+ contact_normal : * const [3 ]f32 ,
498+ io_settings : * CharacterContactSettings ,
499+ ) callconv (.c ) void ,
500+ onCharacterContactRemoved : * const fn (
501+ self : * CharacterContactListener ,
502+ character : * const CharacterVirtual ,
503+ other_character : * const CharacterVirtual ,
504+ sub_shape_id : * const SubShapeId ,
505+ ) callconv (.c ) void ,
506+ onContactSolve : * const fn (
477507 self : * CharacterContactListener ,
478508 character : * const CharacterVirtual ,
479509 body : * const Body ,
@@ -485,7 +515,7 @@ pub const CharacterContactListener = extern struct {
485515 character_velocity : * const [3 ]f32 ,
486516 character_velocity_out : * [3 ]f32 ,
487517 ) callconv (.c ) void ,
488- OnCharacterContactSolve : * const fn (
518+ onCharacterContactSolve : * const fn (
489519 self : * CharacterContactListener ,
490520 character : * const CharacterVirtual ,
491521 other_character : * const CharacterVirtual ,
@@ -501,8 +531,8 @@ pub const CharacterContactListener = extern struct {
501531
502532 comptime {
503533 assert (@sizeOf (VTable ) == @sizeOf (c .JPC_CharacterContactListenerVTable ));
504- assert (@offsetOf (VTable , "OnAdjustBodyVelocity " ) == @offsetOf (c .JPC_CharacterContactListenerVTable , "OnAdjustBodyVelocity" ));
505- assert (@offsetOf (VTable , "OnContactSolve " ) == @offsetOf (c .JPC_CharacterContactListenerVTable , "OnContactSolve" ));
534+ assert (@offsetOf (VTable , "onAdjustBodyVelocity " ) == @offsetOf (c .JPC_CharacterContactListenerVTable , "OnAdjustBodyVelocity" ));
535+ assert (@offsetOf (VTable , "onContactSolve " ) == @offsetOf (c .JPC_CharacterContactListenerVTable , "OnContactSolve" ));
506536 }
507537};
508538
@@ -3540,11 +3570,7 @@ pub const ConstraintSettings = opaque {
35403570//
35413571//--------------------------------------------------------------------------------------------------
35423572pub const TwoBodyConstraintSettings = opaque {
3543- pub fn asConstraintSettings (self : * const TwoBodyConstraintSettings ) * const ConstraintSettings {
3544- return @ptrCast (self );
3545- }
3546-
3547- pub fn asConstraintSettingsMut (self : * TwoBodyConstraintSettings ) * ConstraintSettings {
3573+ pub fn asConstraintSettings (self : * TwoBodyConstraintSettings ) * ConstraintSettings {
35483574 return @ptrCast (self );
35493575 }
35503576
@@ -3566,6 +3592,14 @@ pub const TwoBodyConstraintSettings = opaque {
35663592//
35673593//--------------------------------------------------------------------------------------------------
35683594pub const FixedConstraintSettings = opaque {
3595+ pub fn asConstraintSettings (self : * FixedConstraintSettings ) * ConstraintSettings {
3596+ return @ptrCast (self );
3597+ }
3598+
3599+ pub fn asTwoBodyConstraintSettings (self : * FixedConstraintSettings ) * TwoBodyConstraintSettings {
3600+ return @ptrCast (self );
3601+ }
3602+
35693603 pub fn create () ! * FixedConstraintSettings {
35703604 return @ptrCast (c .JPC_FixedConstraintSettings_Create () orelse
35713605 return error .FailedToCreateFixedConstraintSettings );
0 commit comments