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 voidsCollideShapeVsShape(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 voidsCollideShapeVsShape(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 (notnull, unaffected)shape2- the 2nd colliding shape (notnull, unaffected)scale1- the scale to be applied toshape1(notnull, unaffected)scale2- the scale to be applied toshape2(notnull, unaffected)comTransform1- from the center-of-mass ofshape1to system coordinates (notnull, unaffected)comTransform2- from the center-of-mass ofshape2to system coordinates (notnull, unaffected)creator1- to generate sub-shape IDsshape1(notnull)creator2- to generate sub-shape IDsshape2(notnull)collideShapeSettings- options for the test (notnull, unaffected)collector- to collect the results (notnull, 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 (notnull, unaffected)shape2- the 2nd colliding shape (notnull, unaffected)scale1- the scale to be applied toshape1(notnull, unaffected)scale2- the scale to be applied toshape2(notnull, unaffected)comTransform1- from the center-of-mass ofshape1to system coordinates (notnull, unaffected)comTransform2- from the center-of-mass ofshape2to system coordinates (notnull, unaffected)creator1- to generate sub-shape IDsshape1(notnull)creator2- to generate sub-shape IDsshape2(notnull)collideShapeSettings- options for the test (notnull, unaffected)collector- to collect the results (notnull, modified)filter- to selectively ignore collisions (notnull, unaffected)
-