java.lang.Object
com.github.stephengold.joltjni.JoltPhysicsObject
com.github.stephengold.joltjni.NonCopyable
com.github.stephengold.joltjni.BroadPhaseQuery
- All Implemented Interfaces:
ConstJoltPhysicsObject
,AutoCloseable
,Comparable<JoltPhysicsObject>
- Direct Known Subclasses:
BroadPhase
Interface for crude collision detection against the bounding boxes in a
PhysicsSystem
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
castAaBox
(AaBoxCast boxCast, CastShapeBodyCollector collector) Cast a box along a line segment and collect the resulting hits.void
castAaBox
(AaBoxCast boxCast, CastShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Cast a box along a line segment and collect the resulting hits.void
castAaBox
(AaBoxCast boxCast, CastShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a box along a line segment and collect the resulting hits.void
castRay
(RayCast raycast, RayCastBodyCollector collector) Cast a ray and collect the resulting hits.void
castRay
(RayCast raycast, RayCastBodyCollector collector, BroadPhaseLayerFilter bplFilter) Cast a ray and collect the resulting hits.void
castRay
(RayCast raycast, RayCastBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a ray and collect the resulting hits.void
collideAaBox
(ConstAaBox box, CollideShapeBodyCollector collector) Collect bodies whose bounding boxes overlap with the specified test box.void
collideAaBox
(ConstAaBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes overlap with the specified test box.void
collideAaBox
(ConstAaBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes overlap with the specified test box.void
collideOrientedBox
(ConstOrientedBox box, CollideShapeBodyCollector collector) Collect bodies whose bounding boxes intersect the specified oriented box.void
collideOrientedBox
(ConstOrientedBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified oriented box.void
collideOrientedBox
(ConstOrientedBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes intersect the specified oriented box.void
collidePoint
(Vec3Arg point, CollideShapeBodyCollector collector) Collect bodies whose bounding boxes intersect the specified point.void
collidePoint
(Vec3Arg point, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified point.void
collidePoint
(Vec3Arg point, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes intersect the specified point.void
collideSphere
(Vec3Arg center, float radius, CollideShapeBodyCollector collector) Collect bodies whose bounding boxes intersect the specified test sphere.void
collideSphere
(Vec3Arg center, float radius, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified test sphere.void
collideSphere
(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, va
-
Method Details
-
castAaBox
Cast a box along a line segment and collect the resulting hits.- Parameters:
boxCast
- the test box and route (not null, unaffected)collector
- the hit collector to use (not null)
-
castAaBox
public void castAaBox(AaBoxCast boxCast, CastShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Cast a box along a line segment and collect the resulting hits.- Parameters:
boxCast
- the test box and route (not null, unaffected)collector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, 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.- Parameters:
boxCast
- the test box and route (not null, unaffected)collector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, unaffected)olFilter
- the object-layer filter to apply (not null, unaffected)
-
castRay
Cast a ray and collect the resulting hits.- Parameters:
raycast
- the test ray (not null, unaffected)collector
- the hit collector to use (not null)
-
castRay
public void castRay(RayCast raycast, RayCastBodyCollector collector, BroadPhaseLayerFilter bplFilter) Cast a ray and collect the resulting hits.- Parameters:
raycast
- the test ray (not null, unaffected)collector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, unaffected)
-
castRay
public void castRay(RayCast raycast, RayCastBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a ray and collect the resulting hits.- Parameters:
raycast
- the test ray (not null, unaffected)collector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, unaffected)olFilter
- the object-layer filter to apply (not null, unaffected)
-
collideAaBox
Collect bodies whose bounding boxes overlap with the specified test box.- Parameters:
box
- the test box (not null, unaffected)collector
- the hit collector to use (not null)
-
collideAaBox
public void collideAaBox(ConstAaBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes overlap with the specified test box.- Parameters:
box
- the test box (not null, unaffected)collector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, unaffected)
-
collideAaBox
public void collideAaBox(ConstAaBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes overlap with the specified test box.- Parameters:
box
- the test box (not null, unaffected)collector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, unaffected)olFilter
- the object-layer filter to apply (not null, unaffected)
-
collideOrientedBox
Collect bodies whose bounding boxes intersect the specified oriented box.- Parameters:
box
- the box to test (not null, unaffected)collector
- the hit collector to use (not null)
-
collideOrientedBox
public void collideOrientedBox(ConstOrientedBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified oriented box.- Parameters:
box
- the box to test (not null, unaffected)collector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, unaffected)
-
collideOrientedBox
public void collideOrientedBox(ConstOrientedBox box, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes intersect the specified oriented box.- Parameters:
box
- the box to test (not null, unaffected)collector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, unaffected)olFilter
- the object-layer filter to apply (not null, unaffected)
-
collidePoint
Collect bodies whose bounding boxes intersect the specified point.- Parameters:
point
- the location to test (not null, unaffected)collector
- the hit collector to use (not null)
-
collidePoint
public void collidePoint(Vec3Arg point, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified point.- Parameters:
point
- the location to test (not null, unaffected)collector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, unaffected)
-
collidePoint
public void collidePoint(Vec3Arg point, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect bodies whose bounding boxes intersect the specified point.- Parameters:
point
- the location to test (not null, unaffected)collector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, unaffected)olFilter
- the object-layer filter to apply (not null, unaffected)
-
collideSphere
Collect bodies whose bounding boxes intersect the specified test sphere.- Parameters:
center
- the center of the test sphere (not null, unaffected)radius
- the radius of the test spherecollector
- the hit collector to use (not null)
-
collideSphere
public void collideSphere(Vec3Arg center, float radius, CollideShapeBodyCollector collector, BroadPhaseLayerFilter bplFilter) Collect bodies whose bounding boxes intersect the specified test sphere.- Parameters:
center
- the center of the test sphere (not null, unaffected)radius
- the radius of the test spherecollector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, 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.- Parameters:
center
- the center of the test sphere (not null, unaffected)radius
- the radius of the test spherecollector
- the hit collector to use (not null)bplFilter
- the broadphase-layer filter to apply (not null, unaffected)olFilter
- the object-layer filter to apply (not null, unaffected)
-
getSystem
Access the underlyingPhysicsSystem
.- Returns:
- the pre-existing instance, or
null
if none
-