@@ -436,26 +436,35 @@ pub const CharacterContactListener = extern struct {
436
436
437
437
pub const VTable = extern struct {
438
438
__header : VTableHeader = .{},
439
- OnAdjustBodyVelocity : * const fn (
439
+ onAdjustBodyVelocity : * const fn (
440
440
self : * CharacterContactListener ,
441
441
character : * const CharacterVirtual ,
442
442
body : * const Body ,
443
443
io_linear_velocity : * [3 ]f32 ,
444
444
io_angular_velocity : * [3 ]f32 ,
445
445
) callconv (.c ) void ,
446
- OnContactValidate : * const fn (
446
+ onContactValidate : * const fn (
447
447
self : * CharacterContactListener ,
448
448
character : * const CharacterVirtual ,
449
449
body : * const Body ,
450
450
sub_shape_id : * const SubShapeId ,
451
451
) callconv (.c ) bool ,
452
- OnCharacterContactValidate : * const fn (
452
+ onCharacterContactValidate : * const fn (
453
453
self : * CharacterContactListener ,
454
454
character : * const CharacterVirtual ,
455
455
other_character : * const CharacterVirtual ,
456
456
sub_shape_id : * const SubShapeId ,
457
457
) 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 (
459
468
self : * CharacterContactListener ,
460
469
character : * const CharacterVirtual ,
461
470
body : * const Body ,
@@ -464,7 +473,13 @@ pub const CharacterContactListener = extern struct {
464
473
contact_normal : * const [3 ]f32 ,
465
474
io_settings : * CharacterContactSettings ,
466
475
) 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 (
468
483
self : * CharacterContactListener ,
469
484
character : * const CharacterVirtual ,
470
485
other_character : * const CharacterVirtual ,
@@ -473,7 +488,22 @@ pub const CharacterContactListener = extern struct {
473
488
contact_normal : * const [3 ]f32 ,
474
489
io_settings : * CharacterContactSettings ,
475
490
) 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 (
477
507
self : * CharacterContactListener ,
478
508
character : * const CharacterVirtual ,
479
509
body : * const Body ,
@@ -485,7 +515,7 @@ pub const CharacterContactListener = extern struct {
485
515
character_velocity : * const [3 ]f32 ,
486
516
character_velocity_out : * [3 ]f32 ,
487
517
) callconv (.c ) void ,
488
- OnCharacterContactSolve : * const fn (
518
+ onCharacterContactSolve : * const fn (
489
519
self : * CharacterContactListener ,
490
520
character : * const CharacterVirtual ,
491
521
other_character : * const CharacterVirtual ,
@@ -501,8 +531,8 @@ pub const CharacterContactListener = extern struct {
501
531
502
532
comptime {
503
533
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" ));
506
536
}
507
537
};
508
538
@@ -3540,11 +3570,7 @@ pub const ConstraintSettings = opaque {
3540
3570
//
3541
3571
//--------------------------------------------------------------------------------------------------
3542
3572
pub 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 {
3548
3574
return @ptrCast (self );
3549
3575
}
3550
3576
@@ -3566,6 +3592,14 @@ pub const TwoBodyConstraintSettings = opaque {
3566
3592
//
3567
3593
//--------------------------------------------------------------------------------------------------
3568
3594
pub 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
+
3569
3603
pub fn create () ! * FixedConstraintSettings {
3570
3604
return @ptrCast (c .JPC_FixedConstraintSettings_Create () orelse
3571
3605
return error .FailedToCreateFixedConstraintSettings );
0 commit comments