NASA World Wind

gov.nasa.worldwind.util
Class BasicClutterFilter

java.lang.Object
  extended by gov.nasa.worldwind.util.BasicClutterFilter
All Implemented Interfaces:
ClutterFilter

public class BasicClutterFilter
extends Object
implements ClutterFilter

A simple clutter filter that compares bounding rectangles to each other.


Field Summary
protected  List<Rectangle2D> rectList
           
 
Constructor Summary
BasicClutterFilter()
           
 
Method Summary
 void apply(DrawContext dc, List<Declutterable> shapes)
          Applies the filter for a specified list of Declutterable shapes.
protected  void clear()
           
protected  Rectangle2D intersects(Rectangle2D rectangle)
          Indicates whether a specified region intersects a region in the filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rectList

protected List<Rectangle2D> rectList
Constructor Detail

BasicClutterFilter

public BasicClutterFilter()
Method Detail

apply

public void apply(DrawContext dc,
                  List<Declutterable> shapes)
Description copied from interface: ClutterFilter
Applies the filter for a specified list of Declutterable shapes.

Specified by:
apply in interface ClutterFilter
Parameters:
dc - the current draw context.
shapes - the shapes to declutter.

clear

protected void clear()

intersects

protected Rectangle2D intersects(Rectangle2D rectangle)
Indicates whether a specified region intersects a region in the filter.

Parameters:
rectangle - the region to test.
Returns:
true if the region intersects one or more other regions in the filter, otherwise false.

NASA World Wind