NASA World Wind

gov.nasa.worldwind.render
Class DeclutterableText

java.lang.Object
  extended by gov.nasa.worldwind.render.DeclutterableText
All Implemented Interfaces:
Declutterable, OrderedRenderable, Renderable

public class DeclutterableText
extends Object
implements Declutterable

A wrapper around GeographicText that allows provides participation in global text decluttering.


Field Summary
protected  Font boundsFont
           
protected  boolean enableDecluttering
           
protected  double eyeDistance
           
protected  Vec4 point
           
protected  GeographicText text
           
protected  Rectangle2D textBounds
           
protected  DeclutteringTextRenderer textRenderer
           
 
Method Summary
 Rectangle2D getBounds(DrawContext dc)
           
 double getDistanceFromEye()
          Returns the ordered renderable's distance from the current view's eye point.
 Vec4 getPoint()
           
 GeographicText getText()
           
 boolean isEnableDecluttering()
          Indicates whether this text should participate in decluttering.
 void pick(DrawContext dc, Point pickPoint)
          Executes a pick of the ordered renderable.
 void render(DrawContext dc)
          Causes this Renderable to render itself using the provided draw context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

boundsFont

protected Font boundsFont

enableDecluttering

protected boolean enableDecluttering

eyeDistance

protected double eyeDistance

point

protected Vec4 point

text

protected GeographicText text

textBounds

protected Rectangle2D textBounds

textRenderer

protected DeclutteringTextRenderer textRenderer
Method Detail

getBounds

public Rectangle2D getBounds(DrawContext dc)
Specified by:
getBounds in interface Declutterable

getDistanceFromEye

public double getDistanceFromEye()
Description copied from interface: OrderedRenderable
Returns the ordered renderable's distance from the current view's eye point. Intended to be used only to sort a list of ordered renderables according to eye distance, and only during frame generation when a view is active.

Specified by:
getDistanceFromEye in interface OrderedRenderable
Returns:
the distance of the ordered renderable from the current view's eye point.

getPoint

public Vec4 getPoint()

getText

public GeographicText getText()

isEnableDecluttering

public boolean isEnableDecluttering()
Indicates whether this text should participate in decluttering.

Specified by:
isEnableDecluttering in interface Declutterable
Returns:
true (the default) if it should participate, otherwise false.

pick

public void pick(DrawContext dc,
                 Point pickPoint)
Description copied from interface: OrderedRenderable
Executes a pick of the ordered renderable.

Specified by:
pick in interface OrderedRenderable
Parameters:
dc - the current draw context.
pickPoint - the pick point.

render

public void render(DrawContext dc)
Causes this Renderable to render itself using the provided draw context.

Specified by:
render in interface Renderable
Parameters:
dc - the DrawContext to be used
See Also:
DrawContext

NASA World Wind