Package com.jme3.util

Class AreaUtils

java.lang.Object
com.jme3.util.AreaUtils

public final class AreaUtils extends Object
AreaUtils is used to calculate the area of various objects, such as bounding volumes. These functions are very loose approximations.
  • Method Details

    • calcScreenArea

      public static float calcScreenArea(BoundingVolume bound, float distance, float screenWidth)
      Estimate the screen area of a bounding volume. If the volume isn't a BoundingSphere, BoundingBox, or OrientedBoundingBox, 0 is returned.
      Parameters:
      bound - The bounds to calculate the volume from.
      distance - The distance from camera to object.
      screenWidth - The width of the screen.
      Returns:
      The area in pixels on the screen of the bounding volume.