Interface ConstNarrowPhaseQuery
- All Superinterfaces:
AutoCloseable,Comparable<JoltPhysicsObject>,ConstJoltPhysicsObject
- All Known Implementing Classes:
NarrowPhaseQuery
Read-only access to a
NarrowPhaseQuery. (native type:
const NarrowPhaseQuery)-
Method Summary
Modifier and TypeMethodDescriptionbooleancastRay(RRayCast raycast, RayCastResult hitResult) Cast a ray and obtain the nearest hit, if any.booleancastRay(RRayCast raycast, RayCastResult hitResult, BroadPhaseLayerFilter bplFilter) Cast a ray and obtain the nearest hit, if any.booleancastRay(RRayCast raycast, RayCastResult hitResult, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a ray and obtain the nearest hit, if any.booleancastRay(RRayCast raycast, RayCastResult hitResult, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Cast a ray and obtain the nearest hit, if any.voidcastRay(RRayCast raycast, RayCastSettings settings, CastRayCollector collector) Cast a ray and collect the resulting hits.voidcastRay(RRayCast raycast, RayCastSettings settings, CastRayCollector collector, BroadPhaseLayerFilter bplFilter) Cast a ray and collect the resulting hits.voidcastRay(RRayCast raycast, RayCastSettings settings, CastRayCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a ray and collect the resulting hits.voidcastRay(RRayCast raycast, RayCastSettings settings, CastRayCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Cast a ray and collect the resulting hits.voidcastRay(RRayCast raycast, RayCastSettings settings, CastRayCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter, ShapeFilter shapeFilter) Cast a ray and collect the resulting hits.voidcastShape(RShapeCast shapeCast, ShapeCastSettings settings, RVec3Arg base, CastShapeCollector collector) Cast a shape and collect the resulting hits.voidcastShape(RShapeCast shapeCast, ShapeCastSettings settings, RVec3Arg base, CastShapeCollector collector, BroadPhaseLayerFilter bplFilter) Cast a shape and collect the resulting hits.voidcastShape(RShapeCast shapeCast, ShapeCastSettings settings, RVec3Arg base, CastShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a shape and collect the resulting hits.voidcastShape(RShapeCast shapeCast, ShapeCastSettings settings, RVec3Arg base, CastShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Cast a shape and collect the resulting hits.voidcastShape(RShapeCast shapeCast, ShapeCastSettings settings, RVec3Arg base, CastShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter, ShapeFilter shapeFilter) Cast a shape and collect the resulting hits.voidcollectTransformedShapes(ConstAaBox box, TransformedShapeCollector collector) Collect leaf shapes that lie within the specified bounds.voidcollectTransformedShapes(ConstAaBox box, TransformedShapeCollector collector, BroadPhaseLayerFilter bplFilter) Collect leaf shapes that lie within the specified bounds.voidcollectTransformedShapes(ConstAaBox box, TransformedShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect leaf shapes that lie within the specified bounds.voidcollectTransformedShapes(ConstAaBox box, TransformedShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Collect leaf shapes that lie within the specified bounds.voidcollectTransformedShapes(ConstAaBox box, TransformedShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter, ShapeFilter shapeFilter) Collect leaf shapes that lie within the specified bounds.voidcollidePoint(RVec3Arg point, CollidePointCollector collector) Collect collisions with the specified point.voidcollidePoint(RVec3Arg point, CollidePointCollector collector, BroadPhaseLayerFilter bplFilter) Collect collisions with the specified point.voidcollidePoint(RVec3Arg point, CollidePointCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect collisions with the specified point.voidcollidePoint(RVec3Arg point, CollidePointCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Collect collisions with the specified point.voidcollidePoint(RVec3Arg point, CollidePointCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter, ShapeFilter shapeFilter) Collect collisions with the specified point.voidcollideShape(ConstShape shape, Vec3Arg shapeScale, RMat44Arg comTransform, CollideShapeSettings settings, RVec3Arg base, CollideShapeCollector collector) Collect collisions with the specified shape.voidcollideShape(ConstShape shape, Vec3Arg shapeScale, RMat44Arg comTransform, CollideShapeSettings settings, RVec3Arg base, CollideShapeCollector collector, BroadPhaseLayerFilter bplFilter) Collect collisions with the specified shape.voidcollideShape(ConstShape shape, Vec3Arg shapeScale, RMat44Arg comTransform, CollideShapeSettings settings, RVec3Arg base, CollideShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect collisions with the specified shape.voidcollideShape(ConstShape shape, Vec3Arg shapeScale, RMat44Arg comTransform, CollideShapeSettings settings, RVec3Arg base, CollideShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Collect collisions with the specified shape.voidcollideShape(ConstShape shape, Vec3Arg shapeScale, RMat44Arg comTransform, CollideShapeSettings settings, RVec3Arg base, CollideShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter, ShapeFilter shapeFilter) Collect collisions with the specified shape.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.github.stephengold.joltjni.readonly.ConstJoltPhysicsObject
close, hasAssignedNativeObject, ownsNativeObject, targetVa
-
Method Details
-
castRay
Cast a ray and obtain the nearest hit, if any.- Parameters:
raycast- the desired ray (notnull, unaffected)hitResult- storage for information about the hit, if any (notnull, may be modified)- Returns:
trueif a hit was found, otherwisefalse
-
castRay
Cast a ray and obtain the nearest hit, if any.- Parameters:
raycast- the desired ray (notnull, unaffected)hitResult- storage for information about the hit, if any (notnull, may be modified)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)- Returns:
trueif a hit was found, otherwisefalse
-
castRay
boolean castRay(RRayCast raycast, RayCastResult hitResult, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a ray and obtain the nearest hit, if any.- Parameters:
raycast- the desired ray (notnull, unaffected)hitResult- storage for information about the hit, if any (notnull, may be modified)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)olFilter- the object-layer filter to apply (notnull, unaffected)- Returns:
trueif a hit was found, otherwisefalse
-
castRay
boolean castRay(RRayCast raycast, RayCastResult hitResult, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Cast a ray and obtain the nearest hit, if any.- Parameters:
raycast- the desired ray (notnull, unaffected)hitResult- storage for information about the hit, if any (notnull, may be modified)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)olFilter- the object-layer filter to apply (notnull, unaffected)bodyFilter- the body filter to apply (notnull, unaffected)- Returns:
trueif a hit was found, otherwisefalse
-
castRay
Cast a ray and collect the resulting hits.- Parameters:
raycast- the desired ray (notnull, unaffected)settings- the raycast configuration options to use (notnull, unaffected)collector- the hit collector to use (notnull)
-
castRay
void castRay(RRayCast raycast, RayCastSettings settings, CastRayCollector collector, BroadPhaseLayerFilter bplFilter) Cast a ray and collect the resulting hits.- Parameters:
raycast- the desired ray (notnull, unaffected)settings- the raycast configuration options to use (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)
-
castRay
void castRay(RRayCast raycast, RayCastSettings settings, CastRayCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a ray and collect the resulting hits.- Parameters:
raycast- the desired ray (notnull, unaffected)settings- the raycast configuration options to use (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
void castRay(RRayCast raycast, RayCastSettings settings, CastRayCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Cast a ray and collect the resulting hits.- Parameters:
raycast- the desired ray (notnull, unaffected)settings- the raycast configuration options to use (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)bodyFilter- the body filter to apply (notnull, unaffected)
-
castRay
void castRay(RRayCast raycast, RayCastSettings settings, CastRayCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter, ShapeFilter shapeFilter) Cast a ray and collect the resulting hits.- Parameters:
raycast- the desired ray (notnull, unaffected)settings- the raycast configuration options to use (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)bodyFilter- the body filter to apply (notnull, unaffected)shapeFilter- the shape filter to apply (notnull, unaffected)
-
castShape
void castShape(RShapeCast shapeCast, ShapeCastSettings settings, RVec3Arg base, CastShapeCollector collector) Cast a shape and collect the resulting hits.- Parameters:
shapeCast- the desired shape cast (notnull, unaffected)settings- the shape-cast configuration options to use (notnull, unaffected)base- the base location for reporting hits (notnull, unaffected, (0,0,0)→world coordinates)collector- the hit collector to use (notnull)
-
castShape
void castShape(RShapeCast shapeCast, ShapeCastSettings settings, RVec3Arg base, CastShapeCollector collector, BroadPhaseLayerFilter bplFilter) Cast a shape and collect the resulting hits.- Parameters:
shapeCast- the desired shape cast (notnull, unaffected)settings- the shape-cast configuration options to use (notnull, unaffected)base- the base location for reporting hits (notnull, unaffected, (0,0,0)→world coordinates)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)
-
castShape
void castShape(RShapeCast shapeCast, ShapeCastSettings settings, RVec3Arg base, CastShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Cast a shape and collect the resulting hits.- Parameters:
shapeCast- the desired shape cast (notnull, unaffected)settings- the shape-cast configuration options to use (notnull, unaffected)base- the base location for reporting hits (notnull, unaffected, (0,0,0)→world coordinates)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)
-
castShape
void castShape(RShapeCast shapeCast, ShapeCastSettings settings, RVec3Arg base, CastShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Cast a shape and collect the resulting hits.- Parameters:
shapeCast- the desired shape cast (notnull, unaffected)settings- the shape-cast configuration options to use (notnull, unaffected)base- the base location for reporting hits (notnull, unaffected, (0,0,0)→world coordinates)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)bodyFilter- the body filter to apply (notnull, unaffected)
-
castShape
void castShape(RShapeCast shapeCast, ShapeCastSettings settings, RVec3Arg base, CastShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter, ShapeFilter shapeFilter) Cast a shape and collect the resulting hits.- Parameters:
shapeCast- the desired shape cast (notnull, unaffected)settings- the shape-cast configuration options to use (notnull, unaffected)base- the base location for reporting hits (notnull, unaffected, (0,0,0)→world coordinates)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)bodyFilter- the body filter to apply (notnull, unaffected)shapeFilter- the shape filter to apply (notnull, unaffected)
-
collectTransformedShapes
Collect leaf shapes that lie within the specified bounds.- Parameters:
box- the bounds (in system coordinates, notnull, unaffected)collector- the hit collector to use (notnull)
-
collectTransformedShapes
void collectTransformedShapes(ConstAaBox box, TransformedShapeCollector collector, BroadPhaseLayerFilter bplFilter) Collect leaf shapes that lie within the specified bounds.- Parameters:
box- the bounds (in system coordinates, notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)
-
collectTransformedShapes
void collectTransformedShapes(ConstAaBox box, TransformedShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect leaf shapes that lie within the specified bounds.- Parameters:
box- the bounds (in system coordinates, 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)
-
collectTransformedShapes
void collectTransformedShapes(ConstAaBox box, TransformedShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Collect leaf shapes that lie within the specified bounds.- Parameters:
box- the bounds (in system coordinates, 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)bodyFilter- the body filter to apply (notnull, unaffected)
-
collectTransformedShapes
void collectTransformedShapes(ConstAaBox box, TransformedShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter, ShapeFilter shapeFilter) Collect leaf shapes that lie within the specified bounds.- Parameters:
box- the bounds (in system coordinates, 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)bodyFilter- the body filter to apply (notnull, unaffected)shapeFilter- the shape filter to apply (notnull, unaffected)
-
collidePoint
Collect collisions with the specified point.- Parameters:
point- the location of the point to test (notnull, unaffected)collector- the hit collector to use (notnull)
-
collidePoint
Collect collisions with the specified point.- Parameters:
point- the location of the point to test (notnull, unaffected)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)
-
collidePoint
void collidePoint(RVec3Arg point, CollidePointCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect collisions with the specified point.- Parameters:
point- the location of the point 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
void collidePoint(RVec3Arg point, CollidePointCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Collect collisions with the specified point.- Parameters:
point- the location of the point 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)bodyFilter- the body filter to apply (notnull, unaffected)
-
collidePoint
void collidePoint(RVec3Arg point, CollidePointCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter, ShapeFilter shapeFilter) Collect collisions with the specified point.- Parameters:
point- the location of the point 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)bodyFilter- the body filter to apply (notnull, unaffected)shapeFilter- the shape filter to apply (notnull, unaffected)
-
collideShape
void collideShape(ConstShape shape, Vec3Arg shapeScale, RMat44Arg comTransform, CollideShapeSettings settings, RVec3Arg base, CollideShapeCollector collector) Collect collisions with the specified shape.- Parameters:
shape- the shape to test (notnull, unaffected)shapeScale- the scaling vector for the shape (notnull, unaffected)comTransform- the coordinate transform to apply to the shape's center of mass (notnull, unaffected)settings- the collision settings to use (notnull, unaffected)base- the base location for reporting hits (notnull, unaffected, (0,0,0)→world coordinates)collector- the hit collector to use (notnull)
-
collideShape
void collideShape(ConstShape shape, Vec3Arg shapeScale, RMat44Arg comTransform, CollideShapeSettings settings, RVec3Arg base, CollideShapeCollector collector, BroadPhaseLayerFilter bplFilter) Collect collisions with the specified shape.- Parameters:
shape- the shape to test (notnull, unaffected)shapeScale- the scaling vector for the shape (notnull, unaffected)comTransform- the coordinate transform to apply to the shape's center of mass (notnull, unaffected)settings- the collision settings to use (notnull, unaffected)base- the base location for reporting hits (notnull, unaffected, (0,0,0)→world coordinates)collector- the hit collector to use (notnull)bplFilter- the broadphase-layer filter to apply (notnull, unaffected)
-
collideShape
void collideShape(ConstShape shape, Vec3Arg shapeScale, RMat44Arg comTransform, CollideShapeSettings settings, RVec3Arg base, CollideShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter) Collect collisions with the specified shape.- Parameters:
shape- the shape to test (notnull, unaffected)shapeScale- the scaling vector for the shape (notnull, unaffected)comTransform- the coordinate transform to apply to the shape's center of mass (notnull, unaffected)settings- the collision settings to use (notnull, unaffected)base- the base location for reporting hits (notnull, unaffected, (0,0,0)→world coordinates)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)
-
collideShape
void collideShape(ConstShape shape, Vec3Arg shapeScale, RMat44Arg comTransform, CollideShapeSettings settings, RVec3Arg base, CollideShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter) Collect collisions with the specified shape.- Parameters:
shape- the shape to test (notnull, unaffected)shapeScale- the scaling vector for the shape (notnull, unaffected)comTransform- the coordinate transform to apply to the shape's center of mass (notnull, unaffected)settings- the collision settings to use (notnull, unaffected)base- the base location for reporting hits (notnull, unaffected, (0,0,0)→world coordinates)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)bodyFilter- the body filter to apply (notnull, unaffected)
-
collideShape
void collideShape(ConstShape shape, Vec3Arg shapeScale, RMat44Arg comTransform, CollideShapeSettings settings, RVec3Arg base, CollideShapeCollector collector, BroadPhaseLayerFilter bplFilter, ObjectLayerFilter olFilter, BodyFilter bodyFilter, ShapeFilter shapeFilter) Collect collisions with the specified shape.- Parameters:
shape- the shape to test (notnull, unaffected)shapeScale- the scaling vector for the shape (notnull, unaffected)comTransform- the coordinate transform to apply to the shape's center of mass (notnull, unaffected)settings- the collision settings to use (notnull, unaffected)base- the base location for reporting hits (notnull, unaffected, (0,0,0)→world coordinates)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)bodyFilter- the body filter to apply (notnull, unaffected)shapeFilter- the shape filter to apply (notnull, unaffected)
-