Uses of Class
squidpony.squidgrid.Direction
| Package | Description |
|---|---|
| squidpony.squidgrid |
Tools for working with data on a grid, including LOS and FOV; overlaps with geometry code in squidpony.squidmath .
|
| squidpony.squidgrid.iterator |
Iterators that allow traversal of
Coord points on a map's grid. |
| squidpony.squidgrid.mapping |
Tools specifically for generating maps and placing content in them, usually working with 2D char arrays.
|
| squidpony.squidmath |
A very broad package containing random number generators, geometry tools, data structures, and noise functions.
|
-
Uses of Direction in squidpony.squidgrid
Fields in squidpony.squidgrid declared as Direction Modifier and Type Field Description static Direction[]Direction. CARDINALSAn array which holds only the four cardinal directions.static Direction[]Direction. CARDINALS_CLOCKWISEAn array which holds only the four cardinal directions in clockwise order.static Direction[]Direction. CARDINALS_COUNTERCLOCKWISEAn array which holds only the four cardinal directions in counter-clockwise order.protected static Direction[]FOV. ccwprotected static Direction[]FOV. ccw_fullstatic Direction[]Direction. CLOCKWISEAn array which holds all eight OUTWARDS directions in clockwise order.static Direction[]Direction. COUNTERCLOCKWISEAn array which holds all eight OUTWARDS directions in counter-clockwise order.static Direction[]Direction. DIAGONALSAn array which holds only the four diagonal directions.Direction[]Adjacency. directionsThe array of all possible directions this allows, regardless of cost.static Direction[]Direction. OUTWARDSAn array which holds all eight OUTWARDS directions.Methods in squidpony.squidgrid that return Direction Modifier and Type Method Description DirectionDirection. clockwise()Returns the Direction one step clockwise including diagonals.DirectionDirection. counterClockwise()Returns the Direction one step counterclockwise including diagonals.static DirectionDirection. getCardinalDirection(int x, int y)Returns the direction that most closely matches the input.static DirectionDirection. getDirection(int x, int y)Returns the direction that most closely matches the input.static DirectionDirection. getRoughDirection(int x, int y)Gets an estimate at the correct direction that a position lies in given the distance towards it on the x and y axes.DirectionDirection. opposite()Returns the direction directly opposite of this one.static DirectionDirection. toGoTo(Coord from, Coord to)static DirectionDirection. valueOf(String name)Returns the enum constant of this type with the specified name.static Direction[]Direction. values()Returns an array containing the constants of this enum type, in the order they are declared.Methods in squidpony.squidgrid with parameters of type Direction Modifier and Type Method Description doubleMeasurement. heuristic(Direction target) -
Uses of Direction in squidpony.squidgrid.iterator
Fields in squidpony.squidgrid.iterator declared as Direction Modifier and Type Field Description protected DirectionSquidIterators.Linear. directionprotected DirectionSquidIterators.AroundCounterClockWise. prevConstructors in squidpony.squidgrid.iterator with parameters of type Direction Constructor Description Linear(Direction direction, int startx, int y, int width, int height) -
Uses of Direction in squidpony.squidgrid.mapping
Methods in squidpony.squidgrid.mapping with parameters of type Direction Modifier and Type Method Description static RectangleRectangle.Utils. extend(Rectangle r, Direction d)protected RectangleRectangleRoomFinder. extendRoom(boolean[][] assigneds, Rectangle r, Direction d)protected RectangleRectangleRoomFinder. extendRoomOnce(boolean[][] assigneds, Rectangle r, Direction d)static List<Coord>Rectangle.Utils. getBorder(Rectangle r, Direction cardinal, List<Coord> buf)static CoordRectangle.Utils. getCorner(Rectangle r, Direction dir) -
Uses of Direction in squidpony.squidmath
Methods in squidpony.squidmath that return Direction Modifier and Type Method Description DirectionCoord. toGoTo(Coord target)Gets theDirectionneeded to get totargetfrom this; typically this is more useful when target and this are adjacent (byCoord.isAdjacent(Coord)) since that should make it possible to go to target.Methods in squidpony.squidmath with parameters of type Direction Modifier and Type Method Description CoordCoord. translate(Direction d)