public class SquareGridTools
extends java.lang.Object
SquareGrid| Constructor and Description |
|---|
SquareGridTools() |
| Modifier and Type | Method and Description |
|---|---|
void |
boundingPolygonCCW(SquareGrid grid,
georegression.struct.shapes.Polygon2D_F64 bounding)
Get outside corner polygon around the grid.
|
boolean |
checkFlip(SquareGrid grid)
Checks to see if it needs to be flipped.
|
double |
computeSize(SquareGrid grid) |
protected int |
findIntersection(SquareNode target,
SquareNode node)
Finds the side which intersects the line segment from the center of target to center of node
|
void |
flipColumns(SquareGrid grid)
Flips the order of columns
|
void |
flipRows(SquareGrid grid)
Flips the order of rows
|
protected void |
orderNode(SquareNode target,
SquareNode node,
boolean pointingX)
Fills the ordered list with the corners in target node in canonical order.
|
protected void |
orderNodeGrid(SquareGrid grid,
int row,
int col)
Given the grid coordinate, order the corners for the node at that location.
|
boolean |
orderSquareCorners(SquareGrid grid)
Adjust the corners in the square's polygon so that they are aligned along the grids overall
length
|
void |
putIntoCanonical(SquareGrid grid)
There can be 2 or 4 possible orientations which are equally valid solutions.
|
void |
reverse(SquareGrid grid) |
void |
rotateCCW(SquareGrid grid) |
static int |
sign(georegression.struct.line.LineGeneral2D_F64 line,
georegression.struct.point.Point2D_F64 p) |
void |
transpose(SquareGrid grid)
Transposes the grid
|
public void putIntoCanonical(SquareGrid grid)
public void rotateCCW(SquareGrid grid)
public void reverse(SquareGrid grid)
public boolean checkFlip(SquareGrid grid)
public double computeSize(SquareGrid grid)
public void transpose(SquareGrid grid)
public void flipRows(SquareGrid grid)
public void flipColumns(SquareGrid grid)
public void boundingPolygonCCW(SquareGrid grid, georegression.struct.shapes.Polygon2D_F64 bounding)
protected void orderNodeGrid(SquareGrid grid, int row, int col)
protected void orderNode(SquareNode target, SquareNode node, boolean pointingX)
pointingX - true if 'node' is pointing along the x-axis from target. false for point along y-axisprotected int findIntersection(SquareNode target, SquareNode node)
public boolean orderSquareCorners(SquareGrid grid)
public static int sign(georegression.struct.line.LineGeneral2D_F64 line,
georegression.struct.point.Point2D_F64 p)