Package armyc2.c5isr.RenderMultipoints
Class clsUtilityCPOF
java.lang.Object
armyc2.c5isr.RenderMultipoints.clsUtilityCPOF
CPOF utility functions taken from JavaLineArrayCPOF
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClips a ShapeSpec.static BooleancanClipPoints(TGLight tg) returns true if the line type can be clipped before calculating the shapesprotected static booleanChange1TacticalAreas(TGLight tg, int lineType, IPointConversion converter, ArrayList<Shape2> shapes) protected static voidafter filtering pixels it needs to reinitialize the style to 0 or it causes CELineArraydotNet to build wrong shapesprotected static voidFilterPoints2(TGLight tg, IPointConversion converter) Filters too close points after segmenting and clippingprotected static TGLightCreate a tg with a new line type to used for circular range fan fillprotected static voidGetFarPixels(TGLight tg, IPointConversion converter, ArrayList farLeftPixels, ArrayList farRightPixels) Do a 360 degree horizontal shift for points on either side of the midpoint of the display, if the MBR for the pixels is greater than 180 degrees wide.protected static booleanLinesWithSeparateFill(int linetype, ArrayList<Shape2> shapes) These get clipped so the fill must be treated as a separate shape.Point2DtoPOINT2(ArrayList<Point2D> pts2d) uses a hash map to set the POINT2 style when creating tg.Pixels from Point2D ArrayListPOINT2toPoint2D(ArrayList<POINT2> pts) postClipShapes(TGLight tg, ArrayList<Shape2> shapeSpecsArray, Object clipArea) Currently assumes no MeTOC symbols are post clippedprotected static voidpostSegmentFSA(TGLight tg, IPointConversion converter) cannot pre-segment the fire support areas, must post segment them after the pixels were calculatedprotected static voidSegmentGeoPoints(TGLight tg, IPointConversion converter, double zoomFactor) Pre-segment the lines based on max or min latitude for the segment interval.
-
Constructor Details
-
clsUtilityCPOF
public clsUtilityCPOF()
-
-
Method Details
-
GetFarPixels
protected static void GetFarPixels(TGLight tg, IPointConversion converter, ArrayList farLeftPixels, ArrayList farRightPixels) Do a 360 degree horizontal shift for points on either side of the midpoint of the display, if the MBR for the pixels is greater than 180 degrees wide. Builds pixels for two symbols to draw a symbol flipped about the left edge and also a symbol flipped about the right edge. This function is typically used at world view. Caller must instantiate last two parameters.- Parameters:
tg-converter-farLeftPixels- - OUT - the resultant pixels for left shift symbolfarRightPixels- - OUT - the result pixels for the right shift symbol
-
Change1TacticalAreas
protected static boolean Change1TacticalAreas(TGLight tg, int lineType, IPointConversion converter, ArrayList<Shape2> shapes) - Parameters:
tg-lineType-converter-shapes-- Returns:
-
GetCircularRangeFanFillTG
Create a tg with a new line type to used for circular range fan fill- Parameters:
tg-- Returns:
-
ClearPixelsStyle
after filtering pixels it needs to reinitialize the style to 0 or it causes CELineArraydotNet to build wrong shapes- Parameters:
tg-
-
FilterPoints2
Filters too close points after segmenting and clipping- Parameters:
tg-converter-
-
canClipPoints
returns true if the line type can be clipped before calculating the shapes- Parameters:
tg- tactical graphic- Returns:
- true if can pre-clip points
-
LinesWithSeparateFill
These get clipped so the fill must be treated as a separate shape. Normally lines with fill do not have a separate shape for the fill.- Parameters:
linetype-- Returns:
-
Point2DtoPOINT2Mapped
protected static ArrayList<POINT2> Point2DtoPOINT2Mapped(ArrayList<Point2D> pts2d, Map<String, Object> hashMap) uses a hash map to set the POINT2 style when creating tg.Pixels from Point2D ArrayList- Parameters:
pts2d-hashMap-- Returns:
-
Point2DtoPOINT2
-
POINT2toPoint2D
-
buildShapeSpecFromPoints
protected static ArrayList<Shape2> buildShapeSpecFromPoints(TGLight tg0, Shape2 shapeSpec, ArrayList<POINT2> pts, Object clipArea) Clips a ShapeSpec. Assumes we are not post clipping splines, therefore all the operations are moveTo, lineTo. Each ShapeSpec is assumed to be: moveTo, lineTo ... lineTo, followed by another moveTo, lineTo, ... lineTo, followed by ...- Parameters:
shapeSpec-pts-clipArea-- Returns:
- a single clipped shapeSpec
-
postClipShapes
protected static ArrayList<Shape2> postClipShapes(TGLight tg, ArrayList<Shape2> shapeSpecsArray, Object clipArea) Currently assumes no MeTOC symbols are post clipped- Parameters:
tg-shapeSpecsArray-clipArea-- Returns:
-
postSegmentFSA
cannot pre-segment the fire support areas, must post segment them after the pixels were calculated- Parameters:
tg-converter-
-
SegmentGeoPoints
Pre-segment the lines based on max or min latitude for the segment interval. This is necessary because GeoPixelconversion does not work well over distance greater than 1M meters, especially at extreme latitudes.- Parameters:
tg-converter-
-