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. CARDINALS
An array which holds only the four cardinal directions.static Direction[]
Direction. CARDINALS_CLOCKWISE
An array which holds only the four cardinal directions in clockwise order.static Direction[]
Direction. CARDINALS_COUNTERCLOCKWISE
An array which holds only the four cardinal directions in counter-clockwise order.protected static Direction[]
FOV. ccw
protected static Direction[]
FOV. ccw_full
static Direction[]
Direction. CLOCKWISE
An array which holds all eight OUTWARDS directions in clockwise order.static Direction[]
Direction. COUNTERCLOCKWISE
An array which holds all eight OUTWARDS directions in counter-clockwise order.static Direction[]
Direction. DIAGONALS
An array which holds only the four diagonal directions.Direction[]
Adjacency. directions
The array of all possible directions this allows, regardless of cost.static Direction[]
Direction. OUTWARDS
An array which holds all eight OUTWARDS directions.Methods in squidpony.squidgrid that return Direction Modifier and Type Method Description Direction
Direction. clockwise()
Returns the Direction one step clockwise including diagonals.Direction
Direction. counterClockwise()
Returns the Direction one step counterclockwise including diagonals.static Direction
Direction. getCardinalDirection(int x, int y)
Returns the direction that most closely matches the input.static Direction
Direction. getDirection(int x, int y)
Returns the direction that most closely matches the input.static Direction
Direction. 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.Direction
Direction. opposite()
Returns the direction directly opposite of this one.static Direction
Direction. toGoTo(Coord from, Coord to)
static Direction
Direction. 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 double
Measurement. heuristic(Direction target)
-
Uses of Direction in squidpony.squidgrid.iterator
Fields in squidpony.squidgrid.iterator declared as Direction Modifier and Type Field Description protected Direction
SquidIterators.Linear. direction
protected Direction
SquidIterators.AroundCounterClockWise. prev
Constructors 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 Rectangle
Rectangle.Utils. extend(Rectangle r, Direction d)
protected Rectangle
RectangleRoomFinder. extendRoom(boolean[][] assigneds, Rectangle r, Direction d)
protected Rectangle
RectangleRoomFinder. extendRoomOnce(boolean[][] assigneds, Rectangle r, Direction d)
static List<Coord>
Rectangle.Utils. getBorder(Rectangle r, Direction cardinal, List<Coord> buf)
static Coord
Rectangle.Utils. getCorner(Rectangle r, Direction dir)
-
Uses of Direction in squidpony.squidmath
Methods in squidpony.squidmath that return Direction Modifier and Type Method Description Direction
Coord. toGoTo(Coord target)
Gets theDirection
needed to get totarget
from 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 Coord
Coord. translate(Direction d)