Class CollisionDispatch

java.lang.Object
com.github.stephengold.joltjni.CollisionDispatch

public final class CollisionDispatch extends Object
Utilities to collect collisions between shapes.
  • 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 to shape1 (not null, unaffected)
      scale2 - the scale to be applied to shape2 (not null, unaffected)
      comTransform1 - from the center-of-mass of shape1 to system coordinates (not null, unaffected)
      comTransform2 - from the center-of-mass of shape2 to system coordinates (not null, unaffected)
      creator1 - to generate sub-shape IDs shape1 (not null)
      creator2 - to generate sub-shape IDs shape2 (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 to shape1 (not null, unaffected)
      scale2 - the scale to be applied to shape2 (not null, unaffected)
      comTransform1 - from the center-of-mass of shape1 to system coordinates (not null, unaffected)
      comTransform2 - from the center-of-mass of shape2 to system coordinates (not null, unaffected)
      creator1 - to generate sub-shape IDs shape1 (not null)
      creator2 - to generate sub-shape IDs shape2 (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)