Package jolt.physics
Class PhysicsSystem
java.lang.Object
jolt.BaseJoltNative
jolt.AddressedJoltNative
jolt.DeletableJoltNative
jolt.physics.PhysicsSystem
- All Implemented Interfaces:
Deletable,JoltNative
PhysicsSystem relies on preview features of the Java platform:
PhysicsSystemrefers to one or more preview APIs:MemoryAddress.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
-
Field Summary
Fields inherited from class jolt.DeletableJoltNative
deletedFields inherited from class jolt.AddressedJoltNative
handle -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConstraint(Constraint constraint) voidaddConstraints(Collection<? extends Constraint> constraints) voidaddConstraints(Constraint[] constraints) voidaddStepListener(PhysicsStepListener listener) static PhysicsSystemat(MemoryAddressPREVIEW addr) protected voidint[]int[]voidgetGravity(FVec3 out) intintintvoidstatic PhysicsSystemof(int maxBodies, int numBodyMutexes, int maxBodyPairs, int maxContactConstraints, BroadPhaseLayerInterface broadPhaseLayerInterface, ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, ObjectLayerPairFilter objectLayerPairFilter) voidvoidremoveConstraint(Constraint constraint) voidremoveConstraints(Collection<? extends Constraint> constraints) voidremoveConstraints(Constraint[] constraints) voidremoveStepListener(PhysicsStepListener listener) voidvoidsetContactListener(ContactListener listener) voidsetGravity(FVec3 gravity) voidsetPhysicsSettings(PhysicsSettings settings) voidupdate(float deltaTime, int collisionSteps, int integrationSubSteps, TempAllocator tempAllocator, JobSystem jobSystem) booleanwereBodiesInContact(int bodyId1, int bodyId2) Methods inherited from class jolt.DeletableJoltNative
delete, isDeletedMethods inherited from class jolt.AddressedJoltNative
addressMethods inherited from class jolt.BaseJoltNative
equals, hashCode
-
Method Details
-
at
-
of
public static PhysicsSystem of(int maxBodies, int numBodyMutexes, int maxBodyPairs, int maxContactConstraints, BroadPhaseLayerInterface broadPhaseLayerInterface, ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, ObjectLayerPairFilter objectLayerPairFilter) -
deleteInternal
protected void deleteInternal()- Specified by:
deleteInternalin classDeletableJoltNative
-
setBodyActivationListener
-
getBodyActivationListener
-
setContactListener
-
getContactListener
-
setPhysicsSettings
-
getPhysicsSettings
-
getBodyInterface
-
getBodyInterfaceNoLock
-
getBroadPhaseQuery
-
getNarrowPhaseQuery
-
getNarrowPhaseQueryNoLock
-
addConstraint
-
addConstraints
-
addConstraints
-
removeConstraint
-
removeConstraints
-
removeConstraints
-
optimizeBroadPhase
public void optimizeBroadPhase() -
addStepListener
-
removeStepListener
-
setGravity
-
getGravity
-
getBodyLockInterfaceNoLock
-
getBodyLockInterface
-
getNumBodies
public int getNumBodies() -
getNumActiveBodies
public int getNumActiveBodies() -
getMaxBodies
public int getMaxBodies() -
getBodies
public int[] getBodies() -
getActiveBodies
public int[] getActiveBodies() -
wereBodiesInContact
public boolean wereBodiesInContact(int bodyId1, int bodyId2) -
update
public void update(float deltaTime, int collisionSteps, int integrationSubSteps, TempAllocator tempAllocator, JobSystem jobSystem)
-
PhysicsSystemwhen preview features are enabled.