Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions JoltC/Functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -513,15 +513,15 @@
} JPC_ShapeCastSettings;

ENSURE_SIZE_ALIGN(JPC_ShapeCastSettings, JPH::ShapeCastSettings)
ENSURE_NORMAL_FIELD( ShapeCastSettings, ActiveEdgeMode)

Check warning on line 516 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DDOUBLE_PRECISION=ON

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 516 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DOBJECT_LAYER_BITS=32

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 516 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]
ENSURE_NORMAL_FIELD( ShapeCastSettings, CollectFacesMode)

Check warning on line 517 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DDOUBLE_PRECISION=ON

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 517 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DOBJECT_LAYER_BITS=32

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 517 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]
ENSURE_NORMAL_FIELD( ShapeCastSettings, CollisionTolerance)

Check warning on line 518 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DDOUBLE_PRECISION=ON

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 518 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DOBJECT_LAYER_BITS=32

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 518 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]
ENSURE_NORMAL_FIELD( ShapeCastSettings, PenetrationTolerance)

Check warning on line 519 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DDOUBLE_PRECISION=ON

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 519 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DOBJECT_LAYER_BITS=32

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 519 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]
ENSURE_NORMAL_FIELD( ShapeCastSettings, ActiveEdgeMovementDirection)

Check warning on line 520 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DDOUBLE_PRECISION=ON

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 520 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DOBJECT_LAYER_BITS=32

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 520 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]
ENSURE_NORMAL_FIELD( ShapeCastSettings, BackFaceModeTriangles)

Check warning on line 521 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DDOUBLE_PRECISION=ON

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 521 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DOBJECT_LAYER_BITS=32

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 521 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]
ENSURE_NORMAL_FIELD( ShapeCastSettings, BackFaceModeConvex)

Check warning on line 522 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DDOUBLE_PRECISION=ON

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 522 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DOBJECT_LAYER_BITS=32

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 522 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]
ENSURE_NORMAL_FIELD( ShapeCastSettings, UseShrunkenShapeAndConvexRadius)

Check warning on line 523 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DDOUBLE_PRECISION=ON

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 523 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DOBJECT_LAYER_BITS=32

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 523 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]
ENSURE_NORMAL_FIELD( ShapeCastSettings, ReturnDeepestPoint)

Check warning on line 524 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DDOUBLE_PRECISION=ON

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 524 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug -DOBJECT_LAYER_BITS=32

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

Check warning on line 524 in JoltC/Functions.h

View workflow job for this annotation

GitHub Actions / Tests - ubuntu-latest Debug

offset of on non-standard-layout type 'JPH::ShapeCastSettings' [-Winvalid-offsetof]

typedef struct JPC_CollideShapeSettings {
// CollideSettingsBase
Expand Down Expand Up @@ -1624,6 +1624,9 @@
JPC_API void JPC_PhysicsSystem_AddConstraint(JPC_PhysicsSystem* self, JPC_Constraint* constraint);
JPC_API void JPC_PhysicsSystem_RemoveConstraint(JPC_PhysicsSystem* self, JPC_Constraint* constraint);

JPC_API void JPC_PhysicsSystem_SetGravity(JPC_PhysicsSystem* self, JPC_Vec3 inGravity);
JPC_API JPC_Vec3 JPC_PhysicsSystem_GetGravity(const JPC_PhysicsSystem* self);

JPC_API JPC_BodyInterface* JPC_PhysicsSystem_GetBodyInterface(JPC_PhysicsSystem* self);
JPC_API const JPC_BodyLockInterface* JPC_PhysicsSystem_GetBodyLockInterface(JPC_PhysicsSystem* self);

Expand Down
8 changes: 8 additions & 0 deletions JoltCImpl/JoltC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3024,6 +3024,14 @@ JPC_API void JPC_PhysicsSystem_RemoveConstraint(JPC_PhysicsSystem* self, JPC_Con
to_jph(self)->RemoveConstraint(to_jph(constraint));
}

JPC_API void JPC_PhysicsSystem_SetGravity(JPC_PhysicsSystem* self, JPC_Vec3 inGravity) {
to_jph(self)->SetGravity(to_jph(inGravity));
}

JPC_API JPC_Vec3 JPC_PhysicsSystem_GetGravity(const JPC_PhysicsSystem* self) {
return to_jpc(to_jph(self)->GetGravity());
}

JPC_API JPC_BodyInterface* JPC_PhysicsSystem_GetBodyInterface(JPC_PhysicsSystem* self) {
return to_jpc(&to_jph(self)->GetBodyInterface());
}
Expand Down
Loading