Class PickingUtil

java.lang.Object
com.ardor3d.intersection.PickingUtil

public abstract class PickingUtil extends Object
  • Constructor Details

    • PickingUtil

      public PickingUtil()
  • Method Details

    • findPick

      public static void findPick(Spatial spatial, Ray3 ray, PickResults results)
      Finds a pick using the given ray starting at the scenegraph given as spatial. Results are stored in the given results value. NB: Spatials with CullHint ALWAYS will be skipped.
      Parameters:
      spatial - the spatial
      ray - the ray
      results - the results
    • findPick

      public static void findPick(Spatial spatial, Ray3 ray, PickResults results, boolean ignoreCulled)
      Finds a pick using the given ray starting at the scenegraph given as spatial. Results are stored in the given results value.
      Parameters:
      spatial - the spatial
      ray - the ray
      results - the results
      ignoreCulled - if true, Spatials with CullHint ALWAYS will be skipped.
    • findCollisions

      public static void findCollisions(Spatial spatial, Spatial scene, CollisionResults results)
    • hasPrimitiveCollision

      public static boolean hasPrimitiveCollision(Mesh testMesh, Mesh toCheck)
      This function checks for intersection between this mesh and the given one. On the first intersection, true is returned.
      Parameters:
      testMesh - The mesh
      toCheck - The intersection testing mesh.
      Returns:
      true if they intersect.
    • findPrimitiveCollision

      public static void findPrimitiveCollision(Mesh testMesh, Mesh toCheck, List<PrimitiveKey> testIndex, List<PrimitiveKey> otherIndex)
      This function finds all intersections between this mesh and the checking one. The intersections are stored as PrimitiveKeys.
      Parameters:
      testMesh - The mesh
      toCheck - The Mesh to check.
      testIndex - The array of PrimitiveKeys intersecting in this mesh.
      otherIndex - The array of PrimitiveKeys intersecting in the given mesh.
    • hasCollision

      public static boolean hasCollision(Spatial spatial, Spatial scene, boolean checkPrimitives)