Package com.github.stephengold.joltjni
Class CollisionDispatch
java.lang.Object
com.github.stephengold.joltjni.CollisionDispatch
Utilities to collect collisions between shapes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
sCollideShapeVsShape
(ConstShape shape1, ConstShape shape2, Vec3Arg scale1, Vec3Arg scale2, Mat44Arg comTransform1, Mat44Arg comTransform2, SubShapeIdCreator creator1, SubShapeIdCreator creator2, CollideShapeSettings collideShapeSettings, CollideShapeCollector collector) Collide the specified shapes and pass collisions to the specified collector.static void
sCollideShapeVsShape
(ConstShape shape1, ConstShape shape2, Vec3Arg scale1, Vec3Arg scale2, Mat44Arg comTransform1, Mat44Arg comTransform2, SubShapeIdCreator creator1, SubShapeIdCreator creator2, CollideShapeSettings collideShapeSettings, CollideShapeCollector collector, ShapeFilter filter) Collide the specified shapes and pass collisions to the specified collector.
-
Method Details
-
sCollideShapeVsShape
public static void sCollideShapeVsShape(ConstShape shape1, ConstShape shape2, Vec3Arg scale1, Vec3Arg scale2, Mat44Arg comTransform1, Mat44Arg comTransform2, SubShapeIdCreator creator1, SubShapeIdCreator creator2, CollideShapeSettings collideShapeSettings, CollideShapeCollector collector) Collide the specified shapes and pass collisions to the specified collector.- Parameters:
shape1
- the first colliding shape (not null, unaffected)shape2
- the 2nd colliding shape (not null, unaffected)scale1
- the scale to be applied toshape1
(not null, unaffected)scale2
- the scale to be applied toshape2
(not null, unaffected)comTransform1
- from the center-of-mass ofshape1
to system coordinates (not null, unaffected)comTransform2
- from the center-of-mass ofshape2
to system coordinates (not null, unaffected)creator1
- to generate sub-shape IDsshape1
(not null)creator2
- to generate sub-shape IDsshape2
(not null)collideShapeSettings
- options for the test (not null, unaffected)collector
- to collect the results (not null, modified)
-
sCollideShapeVsShape
public static void sCollideShapeVsShape(ConstShape shape1, ConstShape shape2, Vec3Arg scale1, Vec3Arg scale2, Mat44Arg comTransform1, Mat44Arg comTransform2, SubShapeIdCreator creator1, SubShapeIdCreator creator2, CollideShapeSettings collideShapeSettings, CollideShapeCollector collector, ShapeFilter filter) Collide the specified shapes and pass collisions to the specified collector.- Parameters:
shape1
- the first colliding shape (not null, unaffected)shape2
- the 2nd colliding shape (not null, unaffected)scale1
- the scale to be applied toshape1
(not null, unaffected)scale2
- the scale to be applied toshape2
(not null, unaffected)comTransform1
- from the center-of-mass ofshape1
to system coordinates (not null, unaffected)comTransform2
- from the center-of-mass ofshape2
to system coordinates (not null, unaffected)creator1
- to generate sub-shape IDsshape1
(not null)creator2
- to generate sub-shape IDsshape2
(not null)collideShapeSettings
- options for the test (not null, unaffected)collector
- to collect the results (not null, modified)filter
- to selectively ignore collisions (not null, unaffected)
-