Package gov.nasa.worldwind.symbology
Class AbstractTacticalSymbol.OrderedSymbol
- java.lang.Object
-
- gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol
-
- All Implemented Interfaces:
OrderedRenderable
,Renderable
- Enclosing class:
- AbstractTacticalSymbol
protected class AbstractTacticalSymbol.OrderedSymbol extends java.lang.Object implements OrderedRenderable
-
-
Field Summary
Fields Modifier and Type Field Description double
dx
Per-frame screen offset indicating this symbol's x-offset relative to the screenPoint.double
dy
Per-frame screen offset indicating this symbol's y-offset relative to the screenPoint.double
eyeDistance
Per-frame distance corresponding to the distance between the placePoint and the View's eye point.java.awt.Rectangle
iconRectScaled
iconRect with scaling applied, used to lay out text.java.awt.Rectangle
layoutRect
java.awt.Rectangle
layoutRectScaled
layoutRect with scaling applied, used to lay out text.Vec4
placePoint
Per-frame Cartesian point corresponding to this symbol's position.Vec4
screenPoint
Per-frame screen point corresponding to the projection of the placePoint in the viewport (on the screen).java.awt.Rectangle
screenRect
double
sx
Per-frame screen scale indicating this symbol's x-scale relative to the screen offset.double
sy
Per-frame screen scale indicating this symbol's y-scale relative to the screen offset.
-
Constructor Summary
Constructors Modifier Constructor Description protected
OrderedSymbol()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doDrawOrderedRenderable(DrawContext dc, PickSupport pickCandidates)
double
getDistanceFromEye()
Returns the ordered renderable's distance from the current view's eye point.Layer
getPickLayer()
boolean
isEnableBatchPicking()
boolean
isEnableBatchRendering()
void
pick(DrawContext dc, java.awt.Point pickPoint)
Executes a pick of the ordered renderable.void
render(DrawContext dc)
Causes thisRenderable
to render itself using the provided draw context.
-
-
-
Field Detail
-
placePoint
public Vec4 placePoint
Per-frame Cartesian point corresponding to this symbol's position. Calculated each frame inAbstractTacticalSymbol.computeSymbolPoints(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
. Initiallynull
.
-
screenPoint
public Vec4 screenPoint
Per-frame screen point corresponding to the projection of the placePoint in the viewport (on the screen). Calculated each frame inAbstractTacticalSymbol.computeSymbolPoints(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
. Initiallynull
.
-
eyeDistance
public double eyeDistance
Per-frame distance corresponding to the distance between the placePoint and the View's eye point. Used to order the symbol as an ordered renderable, and is returned by getDistanceFromEye. Calculated each frame inAbstractTacticalSymbol.computeSymbolPoints(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
. Initially 0.
-
sx
public double sx
Per-frame screen scale indicating this symbol's x-scale relative to the screen offset. Calculated each frame inAbstractTacticalSymbol.computeTransform(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
. Initially 0.
-
sy
public double sy
Per-frame screen scale indicating this symbol's y-scale relative to the screen offset. Calculated each frame inAbstractTacticalSymbol.computeTransform(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
. Initially 0.
-
dx
public double dx
Per-frame screen offset indicating this symbol's x-offset relative to the screenPoint. Calculated each frame inAbstractTacticalSymbol.computeTransform(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
. Initially 0.
-
dy
public double dy
Per-frame screen offset indicating this symbol's y-offset relative to the screenPoint. Calculated each frame inAbstractTacticalSymbol.computeTransform(gov.nasa.worldwind.render.DrawContext, gov.nasa.worldwind.symbology.AbstractTacticalSymbol.OrderedSymbol)
. Initially 0.
-
layoutRect
public java.awt.Rectangle layoutRect
-
screenRect
public java.awt.Rectangle screenRect
-
iconRectScaled
public java.awt.Rectangle iconRectScaled
iconRect with scaling applied, used to lay out text.
-
layoutRectScaled
public java.awt.Rectangle layoutRectScaled
layoutRect with scaling applied, used to lay out text.
-
-
Method Detail
-
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 interfaceOrderedRenderable
- Returns:
- the distance of the ordered renderable from the current view's eye point.
-
pick
public void pick(DrawContext dc, java.awt.Point pickPoint)
Description copied from interface:OrderedRenderable
Executes a pick of the ordered renderable.- Specified by:
pick
in interfaceOrderedRenderable
- Parameters:
dc
- the current draw context.pickPoint
- the pick point.
-
render
public void render(DrawContext dc)
Description copied from interface:Renderable
Causes thisRenderable
to render itself using the provided draw context.- Specified by:
render
in interfaceRenderable
- Parameters:
dc
- theDrawContext
to be used- See Also:
DrawContext
-
isEnableBatchRendering
public boolean isEnableBatchRendering()
-
doDrawOrderedRenderable
protected void doDrawOrderedRenderable(DrawContext dc, PickSupport pickCandidates)
-
isEnableBatchPicking
public boolean isEnableBatchPicking()
-
getPickLayer
public Layer getPickLayer()
-
-