uk.ac.leeds.ccg.andyt.projects.genesis.grids
Class StaticGrids

java.lang.Object
  extended by uk.ac.leeds.ccg.andyt.projects.genesis.grids.StaticGrids

public class StaticGrids
extends java.lang.Object

A class for holding static methods that might be best pushed into grids...


Constructor Summary
StaticGrids()
           
 
Method Summary
static int getCellBoundaryIntersect(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_LineSegment2D a_LineSegment2D, java.math.BigDecimal[] a_CellBounds, boolean ignore_a_LineSegment2D_Start_Point2D, int a_DecimalPlacePrecision)
           
static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getCellCentroid_Point2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D, java.math.BigDecimal toRoundToX_BigDecimal, java.math.BigDecimal toRoundToY_BigDecimal, boolean handleOutOfMemoryError)
           
static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getNextCentroid_Point2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D origin_Point2D, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D destination_Point2D)
           
static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getRandom_Point2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell, java.util.Random a_Random, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D, java.math.BigDecimal distance_BigDecimal, boolean handleOutOfMemoryError)
           
static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getRandom_Point2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell, java.util.Random a_Random, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D, double distance, boolean handleOutOfMemoryError)
           
static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getRandomCellCentroid_Point2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell, java.util.Random a_Random, int a_DecimalPlacePrecision, boolean handleOutOfMemoryError)
           
static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getRandomCellCentroid_Point2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell, java.util.Random a_Random, uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D, java.math.BigDecimal distance_BigDecimal, int a_DecimalPlacePrecision, java.math.BigDecimal toRoundToX_BigDecimal, java.math.BigDecimal toRoundToY_BigDecimal, boolean handleOutOfMemoryError)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticGrids

public StaticGrids()
Method Detail

getNextCentroid_Point2D

public static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getNextCentroid_Point2D(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D origin_Point2D,
                                                                                           uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D destination_Point2D)

getCellCentroid_Point2D

public static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getCellCentroid_Point2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
                                                                                           uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D,
                                                                                           java.math.BigDecimal toRoundToX_BigDecimal,
                                                                                           java.math.BigDecimal toRoundToY_BigDecimal,
                                                                                           boolean handleOutOfMemoryError)

getRandom_Point2D

public static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getRandom_Point2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
                                                                                     java.util.Random a_Random,
                                                                                     uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D,
                                                                                     double distance,
                                                                                     boolean handleOutOfMemoryError)
Returns:
a Vector_Point2D within distance of a_Point2D using double precision arithmetic.

getRandom_Point2D

public static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getRandom_Point2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
                                                                                     java.util.Random a_Random,
                                                                                     uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D,
                                                                                     java.math.BigDecimal distance_BigDecimal,
                                                                                     boolean handleOutOfMemoryError)
Returns:
a Vector_Point2D within distance of a_Point2D using double precision arithmetic.

getRandomCellCentroid_Point2D

public static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getRandomCellCentroid_Point2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
                                                                                                 java.util.Random a_Random,
                                                                                                 uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D a_Point2D,
                                                                                                 java.math.BigDecimal distance_BigDecimal,
                                                                                                 int a_DecimalPlacePrecision,
                                                                                                 java.math.BigDecimal toRoundToX_BigDecimal,
                                                                                                 java.math.BigDecimal toRoundToY_BigDecimal,
                                                                                                 boolean handleOutOfMemoryError)
Parameters:
a_Grid2DSquareCell -
a_Random -
decimalPlacePrecision -
handleOutOfMemoryError -
Returns:
A randomly selected cell centroid in a_Grid2DSquareCell

getRandomCellCentroid_Point2D

public static uk.ac.leeds.ccg.andyt.vector.geometry.Vector_Point2D getRandomCellCentroid_Point2D(uk.ac.leeds.ccg.andyt.grids.core.AbstractGrid2DSquareCell a_Grid2DSquareCell,
                                                                                                 java.util.Random a_Random,
                                                                                                 int a_DecimalPlacePrecision,
                                                                                                 boolean handleOutOfMemoryError)
Parameters:
a_Grid2DSquareCell -
a_Random -
a_MathContext -
handleOutOfMemoryError -
Returns:

getCellBoundaryIntersect

public static int getCellBoundaryIntersect(uk.ac.leeds.ccg.andyt.vector.geometry.Vector_LineSegment2D a_LineSegment2D,
                                           java.math.BigDecimal[] a_CellBounds,
                                           boolean ignore_a_LineSegment2D_Start_Point2D,
                                           int a_DecimalPlacePrecision)
Parameters:
a_LineSegment2D -
a_CellBounds -
Returns:
0 if no intersection; +---+---+---+ | 7 | 8 | 1 | +---+---+---+ | 6 | 0 | 2 | +---+---+---+ | 5 | 4 | 3 | +---+---+---+