Package gov.nasa.worldwind.render
Class BasicAnnotationRenderer
- java.lang.Object
-
- gov.nasa.worldwind.render.BasicAnnotationRenderer
-
- All Implemented Interfaces:
AnnotationRenderer
public class BasicAnnotationRenderer extends java.lang.Object implements AnnotationRenderer
Basic implementation of AnnotationRenderer. Process Annotation rendering as OrderedRenderable objects batch.- See Also:
AbstractAnnotation
,AnnotationAttributes
,AnnotationLayer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
BasicAnnotationRenderer.OrderedAnnotation
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashSet<Annotation>
currentDrawAnnotations
protected long
currentFrameTime
protected java.util.HashSet<Annotation>
currentPickAnnotations
protected PickSupport
pickSupport
-
Constructor Summary
Constructors Constructor Description BasicAnnotationRenderer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
beginDrawAnnotations(DrawContext dc, OGLStackHandler stackHandler)
protected void
drawMany(DrawContext dc, java.lang.Iterable<Annotation> annotations, Layer layer)
protected void
drawOne(DrawContext dc, Annotation annotation, Vec4 annotationPoint, Layer layer)
protected void
endDrawAnnotations(DrawContext dc, OGLStackHandler stackHandler)
protected Vec4
getAnnotationDrawPoint(DrawContext dc, Annotation annotation)
Get the final Vec4 point at which an annotation will be drawn.protected static boolean
isAnnotationValid(Annotation annotation, boolean checkPosition)
protected boolean
isAtPickRange(DrawContext dc, Annotation annotation)
void
pick(DrawContext dc, Annotation annotation, Vec4 annotationPoint, java.awt.Point pickPoint, Layer layer)
void
pick(DrawContext dc, java.lang.Iterable<Annotation> annotations, java.awt.Point pickPoint, Layer layer)
void
render(DrawContext dc, Annotation annotation, Vec4 annotationPoint, Layer layer)
void
render(DrawContext dc, java.lang.Iterable<Annotation> annotations, Layer layer)
-
-
-
Field Detail
-
pickSupport
protected PickSupport pickSupport
-
currentFrameTime
protected long currentFrameTime
-
currentPickAnnotations
protected java.util.HashSet<Annotation> currentPickAnnotations
-
currentDrawAnnotations
protected java.util.HashSet<Annotation> currentDrawAnnotations
-
-
Method Detail
-
isAnnotationValid
protected static boolean isAnnotationValid(Annotation annotation, boolean checkPosition)
-
pick
public void pick(DrawContext dc, java.lang.Iterable<Annotation> annotations, java.awt.Point pickPoint, Layer layer)
- Specified by:
pick
in interfaceAnnotationRenderer
-
pick
public void pick(DrawContext dc, Annotation annotation, Vec4 annotationPoint, java.awt.Point pickPoint, Layer layer)
- Specified by:
pick
in interfaceAnnotationRenderer
-
render
public void render(DrawContext dc, java.lang.Iterable<Annotation> annotations, Layer layer)
- Specified by:
render
in interfaceAnnotationRenderer
-
render
public void render(DrawContext dc, Annotation annotation, Vec4 annotationPoint, Layer layer)
- Specified by:
render
in interfaceAnnotationRenderer
-
drawMany
protected void drawMany(DrawContext dc, java.lang.Iterable<Annotation> annotations, Layer layer)
-
drawOne
protected void drawOne(DrawContext dc, Annotation annotation, Vec4 annotationPoint, Layer layer)
-
isAtPickRange
protected boolean isAtPickRange(DrawContext dc, Annotation annotation)
-
getAnnotationDrawPoint
protected 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.- Parameters:
dc
- the current DrawContext.annotation
- the annotation- Returns:
- the annotation draw cartesian point
-
beginDrawAnnotations
protected void beginDrawAnnotations(DrawContext dc, OGLStackHandler stackHandler)
-
endDrawAnnotations
protected void endDrawAnnotations(DrawContext dc, OGLStackHandler stackHandler)
-
-