gov.nasa.worldwind.render
Class BasicAnnotationRenderer
java.lang.Object
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
|
Method Summary |
protected void |
beginDrawAnnotations(DrawContext dc,
OGLStackHandler stackHandler)
|
protected void |
drawMany(DrawContext dc,
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,
Point pickPoint,
Layer layer)
|
void |
pick(DrawContext dc,
Iterable<Annotation> annotations,
Point pickPoint,
Layer layer)
|
void |
render(DrawContext dc,
Annotation annotation,
Vec4 annotationPoint,
Layer layer)
|
void |
render(DrawContext dc,
Iterable<Annotation> annotations,
Layer layer)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
pickSupport
protected PickSupport pickSupport
BasicAnnotationRenderer
public BasicAnnotationRenderer()
beginDrawAnnotations
protected void beginDrawAnnotations(DrawContext dc,
OGLStackHandler stackHandler)
drawMany
protected void drawMany(DrawContext dc,
Iterable<Annotation> annotations,
Layer layer)
drawOne
protected void drawOne(DrawContext dc,
Annotation annotation,
Vec4 annotationPoint,
Layer layer)
endDrawAnnotations
protected void endDrawAnnotations(DrawContext dc,
OGLStackHandler stackHandler)
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
isAnnotationValid
protected static boolean isAnnotationValid(Annotation annotation,
boolean checkPosition)
isAtPickRange
protected boolean isAtPickRange(DrawContext dc,
Annotation annotation)
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,
Layer layer)
- Specified by:
render in interface AnnotationRenderer
render
public void render(DrawContext dc,
Iterable<Annotation> annotations,
Layer layer)
- Specified by:
render in interface AnnotationRenderer