|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.Grid
public class Grid
A square grid in space, defined as an origin and rectangular cell size. Coordinates are stored as two UInt16s stored in a single UInt32. x
| Field Summary | |
|---|---|
double |
cellHeight
|
double |
cellWidth
|
double |
minim_height
|
double |
minim_width
|
double |
originX
|
double |
originY
|
| Constructor Summary | |
|---|---|
Grid()
|
|
Grid(double originX,
double originY,
double cellSize)
|
|
Grid(double originX,
double originY,
double cellWidth,
double cellHeight)
|
|
| Method Summary | |
|---|---|
double |
cellToX(int cellX)
|
double |
cellToY(int cellY)
|
java.util.Map |
chop(DoubleBuffer coords)
Chops up a Polyline into multiple cells. |
java.util.Map |
chop(Polygon shape)
Chops up a Polygon into multiple cells. |
static int |
packGridCoordinate(int x,
int y)
Converts a grid coordinate (x, y) into a single int. |
void |
throwInSoup(java.util.Map results,
double x1,
double y1,
double x2,
double y2)
Adds to cell in results. |
java.lang.String |
toString()
|
static int[] |
unpackGridCoordinate(int packedCoord)
Unpacks a grid coordinate into an int array. |
int |
xToCell(double x)
|
int |
yToCell(double y)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double originX
public double originY
public double cellWidth
public double cellHeight
public double minim_width
public double minim_height
| Constructor Detail |
|---|
public Grid()
public Grid(double originX,
double originY,
double cellSize)
public Grid(double originX,
double originY,
double cellWidth,
double cellHeight)
| Method Detail |
|---|
public static final int packGridCoordinate(int x,
int y)
public static final int[] unpackGridCoordinate(int packedCoord)
public final int xToCell(double x)
public final int yToCell(double y)
public final double cellToX(int cellX)
public final double cellToY(int cellY)
public java.util.Map chop(Polygon shape)
public java.util.Map chop(DoubleBuffer coords)
public java.lang.String toString()
toString in class java.lang.Object
public final void throwInSoup(java.util.Map results,
double x1,
double y1,
double x2,
double y2)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||