NASA World Wind

gov.nasa.worldwind.render
Class BasicAnnotationRenderer

java.lang.Object
  extended by gov.nasa.worldwind.render.BasicAnnotationRenderer
All Implemented Interfaces:
AnnotationRenderer

public class BasicAnnotationRenderer
extends Object
implements AnnotationRenderer

Basic implementation of AnnotationRenderer. Process Annotation rendering as OrderedRenderable objects batch.

See Also:
AbstractAnnotation, AnnotationAttributes, AnnotationLayer

Constructor Summary
BasicAnnotationRenderer()
           
 
Method Summary
 Vec4 getAnnotationDrawPoint(DrawContext dc, Annotation annotation)
          Get the final Vec4 point at which an annotation will be drawn.
 void pick(DrawContext dc, Annotation annotation, Vec4 annotationPoint, Point pickPoint, Layer layer)
           
 void pick(DrawContext dc, Iterable<Annotation> annotations, Point pickPoint, Layer layer)
           
 void render(DrawContext dc, Annotation annotation, Vec4 annotationPoint)
           
 void render(DrawContext dc, Iterable<Annotation> annotations)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicAnnotationRenderer

public BasicAnnotationRenderer()
Method Detail

getAnnotationDrawPoint

public Vec4 getAnnotationDrawPoint(DrawContext dc,
                                   Annotation annotation)
Get the final Vec4 point at which an annotation will be drawn. If the annotation Position elevation is lower then the highest elevation on the globe, it will be drawn above the ground using its elevation as an offset. Otherwise, the original elevation will be used.

Specified by:
getAnnotationDrawPoint in interface AnnotationRenderer
Parameters:
dc - the current DrawContext.
annotation - the annotation
Returns:
the annotation draw cartesian point

pick

public void pick(DrawContext dc,
                 Annotation annotation,
                 Vec4 annotationPoint,
                 Point pickPoint,
                 Layer layer)
Specified by:
pick in interface AnnotationRenderer

pick

public void pick(DrawContext dc,
                 Iterable<Annotation> annotations,
                 Point pickPoint,
                 Layer layer)
Specified by:
pick in interface AnnotationRenderer

render

public void render(DrawContext dc,
                   Annotation annotation,
                   Vec4 annotationPoint)
Specified by:
render in interface AnnotationRenderer

render

public void render(DrawContext dc,
                   Iterable<Annotation> annotations)
Specified by:
render in interface AnnotationRenderer

NASA World Wind