com.jme.util
Class AreaUtils

java.lang.Object
  extended by com.jme.util.AreaUtils

public class AreaUtils
extends java.lang.Object

AreaUtils is used to calculate the area of various objects, such as bounding volumes. These functions are very loose approximations.

Version:
$Id: AreaUtils.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Joshua Slack

Constructor Summary
AreaUtils()
           
 
Method Summary
static float calcScreenArea(BoundingVolume bound, float distance, float screenWidth)
          calcScreenArea -- in Pixels Aproximates the screen area of a bounding volume.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AreaUtils

public AreaUtils()
Method Detail

calcScreenArea

public static float calcScreenArea(BoundingVolume bound,
                                   float distance,
                                   float screenWidth)
calcScreenArea -- in Pixels Aproximates 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.