com.planeth.common.geom
Class Shape.Bounds

java.lang.Object
  extended bycom.planeth.common.geom.Shape.Bounds
Enclosing class:
Shape

public static class Shape.Bounds
extends java.lang.Object

Calculates the bounds (boundary vertexes) of an Array of vertexes.
It stores the most north, east, south and west vertexes of an array of vertexes.

Author:
Andreas Grässer, gal@planet-h.com.
created 11.12.2005

Constructor Summary
Shape.Bounds(Shape shape)
          Constructor for Bounds.
 
Method Summary
 Vector2D getEast()
          Returns the east Vector
 double getHeight()
          Returns the height
 Vector2D getNorth()
          Returns the north Vector
 java.awt.Rectangle getRect()
          Returns a rectangle representing the Bounds object
 Vector2D getSouth()
          Returns the south Vector
 Vector2D getWest()
          Returns the west Vector
 double getWidth()
          Returns the with
 double getX()
          Returns the most west x-coordinate
 double getY()
          Returns the most north y-coordinate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shape.Bounds

public Shape.Bounds(Shape shape)
Constructor for Bounds.

Parameters:
shape - the Shape to calculates the bounds
Method Detail

getNorth

public Vector2D getNorth()
Returns the north Vector

Returns:
Returns the north Vector

getSouth

public Vector2D getSouth()
Returns the south Vector

Returns:
Returns the south Vector

getWest

public Vector2D getWest()
Returns the west Vector

Returns:
Returns the west Vector

getEast

public Vector2D getEast()
Returns the east Vector

Returns:
Returns the east Vector

getWidth

public double getWidth()
Returns the with

Returns:
Returns the with

getHeight

public double getHeight()
Returns the height

Returns:
Returns the height

getX

public double getX()
Returns the most west x-coordinate

Returns:
Returns the most west x-coordinate

getY

public double getY()
Returns the most north y-coordinate

Returns:
Returns the most north y-coordinate

getRect

public java.awt.Rectangle getRect()
Returns a rectangle representing the Bounds object

Returns:
Returns a rectangle representing the Bounds object