Module org.dyn4j

Class Collisions


  • public final class Collisions
    extends java.lang.Object
    Class used to estimate collision counts and other one-off collision methods and values.

    This class is transient and may get deprecated at any time.

    Since:
    3.1.1
    Version:
    3.2.0
    Author:
    William Bittle
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int getEstimatedCollisionPairs​(int n)
      Returns an estimate on the number of collision pairs based on the number objects being simulated.
      static int getEstimatedCollisionsPerObject()
      Returns an estimate on the number of collisions per object.
      static int getEstimatedRaycastCollisions​(int n)
      Returns an estimate on the number of raycast collisions given the total number of objects to collide with.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getEstimatedCollisionPairs

        public static final int getEstimatedCollisionPairs​(int n)
        Returns an estimate on the number of collision pairs based on the number objects being simulated.
        Parameters:
        n - the number of objects
        Returns:
        int
      • getEstimatedCollisionsPerObject

        public static final int getEstimatedCollisionsPerObject()
        Returns an estimate on the number of collisions per object.
        Returns:
        int
      • getEstimatedRaycastCollisions

        public static final int getEstimatedRaycastCollisions​(int n)
        Returns an estimate on the number of raycast collisions given the total number of objects to collide with.
        Parameters:
        n - the number of objects
        Returns:
        int
        Since:
        3.2.0