NASA World Wind

gov.nasa.worldwind.symbology.milstd2525
Class MilStd2525Util

java.lang.Object
  extended by gov.nasa.worldwind.symbology.milstd2525.MilStd2525Util

public class MilStd2525Util
extends Object


Nested Class Summary
static class MilStd2525Util.SymbolInfo
           
 
Field Summary
protected static Offset ARCH_DOWN_OFFSET
           
protected static Size ARCH_DOWN_SIZE
           
protected static Offset ARCH_UP_OFFSET
           
protected static Size ARCH_UP_SIZE
           
protected static Offset CIRCLE_OFFSET
           
protected static Size CIRCLE_SIZE
           
protected static Offset CLOVER_C2_HQ_OFFSET
           
protected static Offset CLOVER_DOWN_OFFSET
           
protected static Size CLOVER_DOWN_SIZE
           
protected static Offset CLOVER_OFFSET
           
protected static Size CLOVER_SIZE
           
protected static Offset CLOVER_UP_OFFSET
           
protected static Size CLOVER_UP_SIZE
           
protected static Offset DIAMOND_C2_HQ_OFFSET
           
protected static Offset DIAMOND_OFFSET
           
protected static Size DIAMOND_SIZE
           
protected static Offset HAT_DOWN_OFFSET
           
protected static Size HAT_DOWN_SIZE
           
protected static Offset HAT_UP_OFFSET
           
protected static Size HAT_UP_SIZE
           
protected static Offset RECTANGLE_C2_HQ_OFFSET
           
protected static Offset RECTANGLE_OFFSET
           
protected static Size RECTANGLE_SIZE
           
protected static Offset SQUARE_C2_HQ_OFFSET
           
protected static Offset SQUARE_OFFSET
           
protected static Size SQUARE_SIZE
           
protected static Offset TENT_DOWN_OFFSET
           
protected static Size TENT_DOWN_SIZE
           
protected static Offset TENT_UP_OFFSET
           
protected static Size TENT_UP_SIZE
           
 
Constructor Summary
MilStd2525Util()
           
 
Method Summary
static List<? extends Point2D> computeCenterHeadingIndicatorPoints(DrawContext dc, Vec4 symbolPoint, Angle heading, double length)
          Compute screen points required to draw a leader line on a tactical symbol.
protected static Vec4 computeDirectionOfMovement(DrawContext dc, Vec4 symbolPoint, Angle heading, double length)
          Compute a vector in the direction that a symbol is moving.
static List<? extends Point2D> computeGroundHeadingIndicatorPoints(DrawContext dc, Vec4 symbolPoint, Angle heading, double length, double frameHeight)
          Compute screen points required to draw a leader line on a tactical ground symbol.
static MilStd2525Util.SymbolInfo computeTacticalSymbolInfo(String symbolId)
           
static Material getDefaultGraphicMaterial(SymbolCode symbolCode)
          Determines a default color to apply to a symbol.
protected static boolean isObstacle(SymbolCode symbolCode)
          Indicates whether or not a symbol code identifiers an Obstacle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARCH_DOWN_OFFSET

protected static final Offset ARCH_DOWN_OFFSET

ARCH_DOWN_SIZE

protected static final Size ARCH_DOWN_SIZE

ARCH_UP_OFFSET

protected static final Offset ARCH_UP_OFFSET

ARCH_UP_SIZE

protected static final Size ARCH_UP_SIZE

CIRCLE_OFFSET

protected static final Offset CIRCLE_OFFSET

CIRCLE_SIZE

protected static final Size CIRCLE_SIZE

CLOVER_C2_HQ_OFFSET

protected static final Offset CLOVER_C2_HQ_OFFSET

CLOVER_DOWN_OFFSET

protected static final Offset CLOVER_DOWN_OFFSET

CLOVER_DOWN_SIZE

protected static final Size CLOVER_DOWN_SIZE

CLOVER_OFFSET

protected static final Offset CLOVER_OFFSET

CLOVER_SIZE

protected static final Size CLOVER_SIZE

CLOVER_UP_OFFSET

protected static final Offset CLOVER_UP_OFFSET

CLOVER_UP_SIZE

protected static final Size CLOVER_UP_SIZE

DIAMOND_C2_HQ_OFFSET

protected static final Offset DIAMOND_C2_HQ_OFFSET

DIAMOND_OFFSET

protected static final Offset DIAMOND_OFFSET

DIAMOND_SIZE

protected static final Size DIAMOND_SIZE

HAT_DOWN_OFFSET

protected static final Offset HAT_DOWN_OFFSET

HAT_DOWN_SIZE

protected static final Size HAT_DOWN_SIZE

HAT_UP_OFFSET

protected static final Offset HAT_UP_OFFSET

HAT_UP_SIZE

protected static final Size HAT_UP_SIZE

RECTANGLE_C2_HQ_OFFSET

protected static final Offset RECTANGLE_C2_HQ_OFFSET

RECTANGLE_OFFSET

protected static final Offset RECTANGLE_OFFSET

RECTANGLE_SIZE

protected static final Size RECTANGLE_SIZE

SQUARE_C2_HQ_OFFSET

protected static final Offset SQUARE_C2_HQ_OFFSET

SQUARE_OFFSET

protected static final Offset SQUARE_OFFSET

SQUARE_SIZE

protected static final Size SQUARE_SIZE

TENT_DOWN_OFFSET

protected static final Offset TENT_DOWN_OFFSET

TENT_DOWN_SIZE

protected static final Size TENT_DOWN_SIZE

TENT_UP_OFFSET

protected static final Offset TENT_UP_OFFSET

TENT_UP_SIZE

protected static final Size TENT_UP_SIZE
Constructor Detail

MilStd2525Util

public MilStd2525Util()
Method Detail

computeCenterHeadingIndicatorPoints

public static List<? extends Point2D> computeCenterHeadingIndicatorPoints(DrawContext dc,
                                                                          Vec4 symbolPoint,
                                                                          Angle heading,
                                                                          double length)
Compute screen points required to draw a leader line on a tactical symbol. This method returns two points that will draw a line out from the center of the symbol.

Parameters:
dc - Current draw context.
symbolPoint - Symbol position in model coordinates.
heading - Direction of movement, as a bearing clockwise from North.
length - Length of the indicator line, in pixels.
Returns:
List of screen points that describe the speed leader line.

computeDirectionOfMovement

protected static Vec4 computeDirectionOfMovement(DrawContext dc,
                                                 Vec4 symbolPoint,
                                                 Angle heading,
                                                 double length)
Compute a vector in the direction that a symbol is moving.

Parameters:
dc - Current draw context.
symbolPoint - Symbol position in model coordinates.
heading - Heading as a bearing clockwise from North.
length - Length of the leader line, in pixels. The computed vector will have magnitude equal to this distance in pixels multiplied by the size of a pixel (in meters) at the position of the symbol relative to the current view.
Returns:
A vector that points in the direction of a symbol's movement.

computeGroundHeadingIndicatorPoints

public static List<? extends Point2D> computeGroundHeadingIndicatorPoints(DrawContext dc,
                                                                          Vec4 symbolPoint,
                                                                          Angle heading,
                                                                          double length,
                                                                          double frameHeight)
Compute screen points required to draw a leader line on a tactical ground symbol. This method returns three points that will draw a line down from the base of the symbol and then out in the direction of movement.

Parameters:
dc - Current draw context.
symbolPoint - Symbol position in model coordinates.
heading - Direction of movement, as a bearing clockwise from North.
length - Length of the indicator line, in pixels.
frameHeight - Height of the symbol's bounding rectangle, in pixels.
Returns:
List of screen points that describe the speed leader line.

computeTacticalSymbolInfo

public static MilStd2525Util.SymbolInfo computeTacticalSymbolInfo(String symbolId)

getDefaultGraphicMaterial

public static Material getDefaultGraphicMaterial(SymbolCode symbolCode)
Determines a default color to apply to a symbol. MIL-STD-2525C section 5.5.1.1 (pg. 37) states that obstacles should be displayed in green, friendly entities in black or blue, and hostile entities in red. This method return green for obstacles and neutral entities, black for friendly entities, red for hostile entities, and yellow for unknown and pending entities.

Parameters:
symbolCode - Symbol for which to determine color.
Returns:
Default material for the specified symbol.

isObstacle

protected static boolean isObstacle(SymbolCode symbolCode)
Indicates whether or not a symbol code identifiers an Obstacle. Obstacles defined in the Mobility and Survivability category of MIL-STD-2525C Appendix B.

Parameters:
symbolCode - Symbol code to test.
Returns:
True if the symbol code represents an obstacle, otherwise false.

NASA World Wind