nl.tudelft.simulation.language.d2
Class Shape

java.lang.Object
  extended by nl.tudelft.simulation.language.d2.Shape

public final class Shape
extends Object

Shape utilities.

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.

See for project information www.simulation.tudelft.nl/language
License of use: Lesser General Public License (LGPL) , no warranty

Since:
1.4
Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:25:55 $
Author:
Peter Jacobs

Method Summary
static boolean contains(Rectangle2D r1, Rectangle2D r2)
          is r1 completely in r2
static boolean intersects(Rectangle2D r1, Rectangle2D r2)
           
static boolean overlaps(Rectangle2D extent, Rectangle2D shape)
          overlaps extent and shape.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

overlaps

public static boolean overlaps(Rectangle2D extent,
                               Rectangle2D shape)
overlaps extent and shape. Overlap = Intersect + Contain

Parameters:
extent - the extent
shape - the shape
Returns:
whether extent overlaps shape

intersects

public static boolean intersects(Rectangle2D r1,
                                 Rectangle2D r2)
Parameters:
r1 - the first rectangle
r2 - the second rectangle
Returns:
whether r1 intersects r2

contains

public static boolean contains(Rectangle2D r1,
                               Rectangle2D r2)
is r1 completely in r2

Parameters:
r1 - the first rectangle
r2 - the second rectangle
Returns:
whether r1 in r2


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.