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.
|
Modifier and Type | Field and 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.
|
Modifier and Type | Method and 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(java.lang.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.
|
Modifier and Type | Method and Description |
---|---|
double |
Measurement.heuristic(Direction target) |
Modifier and Type | Field and Description |
---|---|
protected Direction |
SquidIterators.Linear.direction |
protected Direction |
SquidIterators.AroundCounterClockWise.prev |
Constructor and Description |
---|
Linear(Direction direction,
int startx,
int y,
int width,
int height) |
Modifier and Type | Method and 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 java.util.List<Coord> |
Rectangle.Utils.getBorder(Rectangle r,
Direction cardinal,
java.util.List<Coord> buf) |
static Coord |
Rectangle.Utils.getCorner(Rectangle r,
Direction dir) |
Modifier and Type | Method and Description |
---|---|
Direction |
Coord.toGoTo(Coord target)
Gets the
Direction needed to get to target from this; typically this is more useful when target
and this are adjacent (by Coord.isAdjacent(Coord) ) since that should make it possible to go to target. |
Modifier and Type | Method and Description |
---|---|
Coord |
Coord.translate(Direction d) |
Copyright © Eben Howard 2012–2022. All rights reserved.