java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.BroadPhaseQuery
- All Implemented Interfaces:
ConstBroadPhaseQuery,ConstJoltPhysicsObject,AutoCloseable,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
BroadPhase
Interface for crude collision detection against the bounding boxes in a
PhysicsSystem.-
Method Summary
Modifier and TypeMethodDescriptionvoidcastAaBox(AaBoxCast boxCast, CastShapeBodyCollector collector) Cast a box along a line segment and collect the resulting hits.voidcastAaBox(AaBoxCast boxCast, CastShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Cast a box along a line segment and collect the resulting hits.voidcastAaBox(AaBoxCast boxCast, CastShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a box along a line segment and collect the resulting hits.voidcastRay(RayCast raycast, RayCastBodyCollector collector) Cast a ray and collect the resulting hits.voidcastRay(RayCast raycast, RayCastBodyCollector collector, BroadPhaseLayerFilter bplFilter) Cast a ray and collect the resulting hits.voidcastRay(RayCast raycast, RayCastBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a ray and collect the resulting hits.voidcollideAaBox(ConstAaBox box, CollideShapeBodyCollector collector) Collect bodies whose bounding boxes overlap with the specified test box.voidcollideAaBox(ConstAaBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes overlap with the specified test box.voidcollideAaBox(ConstAaBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes overlap with the specified test box.voidcollideOrientedBox(ConstOrientedBox box, CollideShapeBodyCollector collector) Collect bodies whose bounding boxes intersect the specified oriented box.voidcollideOrientedBox(ConstOrientedBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified oriented box.voidcollideOrientedBox(ConstOrientedBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes intersect the specified oriented box.voidcollidePoint(Vec3Arg point, CollideShapeBodyCollector collector) Collect bodies whose bounding boxes intersect the specified point.voidcollidePoint(Vec3Arg point, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified point.voidcollidePoint(Vec3Arg point, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes intersect the specified point.voidcollideSphere(Vec3Arg center, float radius, CollideShapeBodyCollector collector) Collect bodies whose bounding boxes intersect the specified test sphere.voidcollideSphere(Vec3Arg center, float radius, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified test sphere.voidcollideSphere(Vec3Arg center, float radius, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes intersect the specified test sphere.Access the underlyingPhysicsSystem.Methods inherited from class com.github.stephengold.joltjni.JoltPhysicsObject
close, compareTo, equals, getContainingObject, hasAssignedNativeObject, hashCode, isCleanerStarted, ownsNativeObject, setVirtualAddress, setVirtualAddress, startCleaner, targetVa, toString, vaMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
getSystem
Access the underlyingPhysicsSystem.- Returns:
- the pre-existing instance, or
nullif none
-
castAaBox
Cast a box along a line segment and collect the resulting hits.- Specified by:
castAaBoxin interfaceConstBroadPhaseQuery- Parameters:
boxCast- the test box and route (notnull, unaffected)collector- the hit collector to use (notnull)
-
castAaBox
public void castAaBox(AaBoxCast boxCast, CastShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Cast a box along a line segment and collect the resulting hits.- Specified by:
castAaBoxin interfaceConstBroadPhaseQuery- Parameters:
boxCast- the test box and route (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)
-
castAaBox
public void castAaBox(AaBoxCast boxCast, CastShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a box along a line segment and collect the resulting hits.- Specified by:
castAaBoxin interfaceConstBroadPhaseQuery- Parameters:
boxCast- the test box and route (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)olFilter- the object-layer filter to apply (notnull, unaffected)
-
castRay
Cast a ray and collect the resulting hits.- Specified by:
castRayin interfaceConstBroadPhaseQuery- Parameters:
raycast- the test ray (notnull, unaffected)collector- the hit collector to use (notnull)
-
castRay
public void castRay(RayCast raycast, RayCastBodyCollector collector, BroadPhaseLayerFilter bplFilter) Cast a ray and collect the resulting hits.- Specified by:
castRayin interfaceConstBroadPhaseQuery- Parameters:
raycast- the test ray (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)
-
castRay
public void castRay(RayCast raycast, RayCastBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a ray and collect the resulting hits.- Specified by:
castRayin interfaceConstBroadPhaseQuery- Parameters:
raycast- the test ray (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)olFilter- the object-layer filter to apply (notnull, unaffected)
-
collideAaBox
Collect bodies whose bounding boxes overlap with the specified test box.- Specified by:
collideAaBoxin interfaceConstBroadPhaseQuery- Parameters:
box- the test box (notnull, unaffected)collector- the hit collector to use (notnull)
-
collideAaBox
public void collideAaBox(ConstAaBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes overlap with the specified test box.- Specified by:
collideAaBoxin interfaceConstBroadPhaseQuery- Parameters:
box- the test box (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)
-
collideAaBox
public void collideAaBox(ConstAaBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes overlap with the specified test box.- Specified by:
collideAaBoxin interfaceConstBroadPhaseQuery- Parameters:
box- the test box (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)olFilter- the object-layer filter to apply (notnull, unaffected)
-
collideOrientedBox
Collect bodies whose bounding boxes intersect the specified oriented box.- Specified by:
collideOrientedBoxin interfaceConstBroadPhaseQuery- Parameters:
box- the box to test (notnull, unaffected)collector- the hit collector to use (notnull)
-
collideOrientedBox
public void collideOrientedBox(ConstOrientedBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified oriented box.- Specified by:
collideOrientedBoxin interfaceConstBroadPhaseQuery- Parameters:
box- the box to test (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)
-
collideOrientedBox
public void collideOrientedBox(ConstOrientedBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes intersect the specified oriented box.- Specified by:
collideOrientedBoxin interfaceConstBroadPhaseQuery- Parameters:
box- the box to test (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)olFilter- the object-layer filter to apply (notnull, unaffected)
-
collidePoint
Collect bodies whose bounding boxes intersect the specified point.- Specified by:
collidePointin interfaceConstBroadPhaseQuery- Parameters:
point- the location to test (notnull, unaffected)collector- the hit collector to use (notnull)
-
collidePoint
public void collidePoint(Vec3Arg point, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified point.- Specified by:
collidePointin interfaceConstBroadPhaseQuery- Parameters:
point- the location to test (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)
-
collidePoint
public void collidePoint(Vec3Arg point, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes intersect the specified point.- Specified by:
collidePointin interfaceConstBroadPhaseQuery- Parameters:
point- the location to test (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)olFilter- the object-layer filter to apply (notnull, unaffected)
-
collideSphere
Collect bodies whose bounding boxes intersect the specified test sphere.- Specified by:
collideSpherein interfaceConstBroadPhaseQuery- Parameters:
center- the center of the test sphere (notnull, unaffected)radius- the radius of the test spherecollector- the hit collector to use (notnull)
-
collideSphere
public void collideSphere(Vec3Arg center, float radius, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified test sphere.- Specified by:
collideSpherein interfaceConstBroadPhaseQuery- Parameters:
center- the center of the test sphere (notnull, unaffected)radius- the radius of the test spherecollector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)
-
collideSphere
public void collideSphere(Vec3Arg center, float radius, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes intersect the specified test sphere.- Specified by:
collideSpherein interfaceConstBroadPhaseQuery- Parameters:
center- the center of the test sphere (notnull, unaffected)radius- the radius of the test spherecollector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)olFilter- the object-layer filter to apply (notnull, unaffected)
-