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 classBasicAnnotationRenderer.OrderedAnnotation
-
Field Summary
Fields Modifier and Type Field Description protected java.util.HashSet<Annotation>currentDrawAnnotationsprotected longcurrentFrameTimeprotected java.util.HashSet<Annotation>currentPickAnnotationsprotected PickSupportpickSupport
-
Constructor Summary
Constructors Constructor Description BasicAnnotationRenderer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbeginDrawAnnotations(DrawContext dc, OGLStackHandler stackHandler)protected voiddrawMany(DrawContext dc, java.lang.Iterable<Annotation> annotations, Layer layer)protected voiddrawOne(DrawContext dc, Annotation annotation, Vec4 annotationPoint, Layer layer)protected voidendDrawAnnotations(DrawContext dc, OGLStackHandler stackHandler)protected Vec4getAnnotationDrawPoint(DrawContext dc, Annotation annotation)Get the final Vec4 point at which an annotation will be drawn.protected static booleanisAnnotationValid(Annotation annotation, boolean checkPosition)protected booleanisAtPickRange(DrawContext dc, Annotation annotation)voidpick(DrawContext dc, Annotation annotation, Vec4 annotationPoint, java.awt.Point pickPoint, Layer layer)voidpick(DrawContext dc, java.lang.Iterable<Annotation> annotations, java.awt.Point pickPoint, Layer layer)voidrender(DrawContext dc, Annotation annotation, Vec4 annotationPoint, Layer layer)voidrender(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:
pickin interfaceAnnotationRenderer
-
pick
public void pick(DrawContext dc, Annotation annotation, Vec4 annotationPoint, java.awt.Point pickPoint, Layer layer)
- Specified by:
pickin interfaceAnnotationRenderer
-
render
public void render(DrawContext dc, java.lang.Iterable<Annotation> annotations, Layer layer)
- Specified by:
renderin interfaceAnnotationRenderer
-
render
public void render(DrawContext dc, Annotation annotation, Vec4 annotationPoint, Layer layer)
- Specified by:
renderin 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)
-
-