Package | Description |
---|---|
squidpony.squidai |
Tools for finding paths, optimizing targets for area-of-effect (AOE) abilities, and evaluating influence on a grid.
|
squidpony.squidgrid |
Tools for working with data on a grid, including LOS and FOV; overlaps with geometry code in squidpony.squidmath .
|
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, and some classes for combinatorics.
|
Modifier and Type | Field and Description |
---|---|
Radius |
Reach.metric
Determines how distance will be measured.
|
Modifier and Type | Method and Description |
---|---|
static Radius |
DijkstraMap.findRadius(DijkstraMap.Measurement measurement)
Gets the appropriate Radius corresponding to a DijkstraMap.Measurement.
|
Radius |
PointAOE.getMetric() |
Radius |
LineAOE.getMetric() |
Radius |
ConeAOE.getMetric() |
Radius |
CloudAOE.getMetric() |
Radius |
BurstAOE.getMetric() |
Radius |
BlastAOE.getMetric() |
Radius |
BeamAOE.getMetric() |
Radius |
AOE.getMetric()
Used to determine distance from origin for the purposes of selecting a target location that is within the bounds
of minRange and maxRange.
|
Radius |
LineAOE.getRadiusType() |
Radius |
ConeAOE.getRadiusType() |
Radius |
CloudAOE.getRadiusType() |
Radius |
BurstAOE.getRadiusType() |
Radius |
BlastAOE.getRadiusType() |
Radius |
BeamAOE.getRadiusType() |
Modifier and Type | Method and Description |
---|---|
static DijkstraMap.Measurement |
DijkstraMap.findMeasurement(Radius radius)
Gets the appropriate DijkstraMap.Measurement to pass to a constructor if you already have a Radius.
|
void |
PointAOE.setMetric(Radius metric) |
void |
LineAOE.setMetric(Radius metric) |
void |
ConeAOE.setMetric(Radius metric) |
void |
CloudAOE.setMetric(Radius metric) |
void |
BurstAOE.setMetric(Radius metric) |
void |
BlastAOE.setMetric(Radius metric) |
void |
BeamAOE.setMetric(Radius metric) |
void |
AOE.setMetric(Radius metric)
Used to determine distance from origin for the purposes of selecting a target location that is within the bounds
of minRange and maxRange.
|
void |
LineAOE.setRadiusType(Radius radiusType) |
void |
ConeAOE.setRadiusType(Radius radiusType) |
void |
CloudAOE.setRadiusType(Radius radiusType) |
void |
BurstAOE.setRadiusType(Radius radiusType) |
void |
BlastAOE.setRadiusType(Radius radiusType) |
void |
BeamAOE.setRadiusType(Radius radiusType) |
Constructor and Description |
---|
BeamAOE(Coord origin,
Coord end,
int radius,
Radius radiusType) |
BeamAOE(Coord origin,
double angle,
int length,
int radius,
Radius radiusType) |
BlastAOE(Coord center,
int radius,
Radius radiusType) |
BlastAOE(Coord center,
int radius,
Radius radiusType,
int minRange,
int maxRange) |
BurstAOE(Coord center,
int radius,
Radius radiusType) |
BurstAOE(Coord center,
int radius,
Radius radiusType,
int minRange,
int maxRange) |
CloudAOE(Coord center,
int volume,
Radius radiusType) |
CloudAOE(Coord center,
int volume,
Radius radiusType,
int minRange,
int maxRange) |
CloudAOE(Coord center,
int volume,
Radius radiusType,
long rngSeed) |
CloudAOE(Coord center,
int volume,
Radius radiusType,
long rngSeed,
int minRange,
int maxRange) |
ConeAOE(Coord origin,
Coord endCenter,
double span,
Radius radiusType) |
ConeAOE(Coord origin,
int radius,
double angle,
double span,
Radius radiusType) |
LineAOE(Coord origin,
Coord end,
int radius,
Radius radiusType) |
LineAOE(Coord origin,
Coord end,
int radius,
Radius radiusType,
int minRange,
int maxRange) |
Reach(int minDistance,
int maxDistance,
Radius metric)
Constructs a Reach with the specified minDistance, to a minimum of 0, maxDistance, to a minimum equal to
minDistance (after factoring in any change to meet the minimum of 0), and distance calculation metric as a Radius
enum.
|
Reach(int minDistance,
int maxDistance,
Radius metric,
AimLimit limit)
Constructs a Reach with the specified minDistance, to a minimum of 0, maxDistance, to a minimum equal to
minDistance (after factoring in any change to meet the minimum of 0), and distance calculation metric as a Radius
enum.
|
Threat(Coord position,
int minThreatDistance,
int maxThreatDistance,
Radius measurement) |
Threat(Coord position,
int minThreatDistance,
int maxThreatDistance,
Radius measurement,
AimLimit limits) |
WaypointPathfinder(char[][] map,
Radius measurement,
RNG rng)
Calculates and stores the doors and doors-like connections ("chokepoints") on the given map as waypoints.
|
WaypointPathfinder(char[][] map,
Radius measurement,
RNG rng,
boolean thickCorridors)
Calculates and stores the doors and doors-like connections ("chokepoints") on the given map as waypoints.
|
WaypointPathfinder(char[][] map,
Radius measurement,
RNG rng,
int fraction)
Calculates and stores the specified fraction of walkable points from map as waypoints.
|
ZOI(Coord[][] influences,
char[][] map,
Radius measurement)
Constructs a Zone of Influence map.
|
ZOI(Coord[] influences,
char[][] map,
Radius measurement)
Constructs a Zone of Influence map.
|
Modifier and Type | Field and Description |
---|---|
protected Radius |
FOVCache.radiusKind |
Modifier and Type | Method and Description |
---|---|
Radius |
FOVCache.getRadiusKind() |
Radius |
LOS.getRadiusStrategy()
Gets the radius strategy this uses.
|
static Radius |
Radius.valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Radius[] |
Radius.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
double[][] |
FOVCache.calculateFOV(double[][] resistanceMap,
int startX,
int startY,
double radius,
Radius radiusTechnique)
Calculates the Field Of View for the provided map from the given x, y
coordinates.
|
double[][] |
FOV.calculateFOV(double[][] resistanceMap,
int startX,
int startY,
double radius,
Radius radiusTechnique)
Calculates the Field Of View for the provided map from the given x, y
coordinates.
|
double[][] |
FOVCache.calculateFOV(double[][] resistanceMap,
int startX,
int startY,
double radius,
Radius radiusTechnique,
double angle,
double span)
Calculates the conical Field Of View for the provided map from the given
x, y coordinates.
|
double[][] |
FOV.calculateFOV(double[][] resistanceMap,
int startX,
int startY,
double radius,
Radius radiusTechnique,
double angle,
double span)
Calculates the Field Of View for the provided map from the given x, y
coordinates.
|
boolean |
Radius.equals2D(Radius other)
Compares two Radius enums as if they are both in a 2D plane; that is, Radius.SPHERE is treated as equal to
Radius.CIRCLE, Radius.CUBE is equal to Radius.SQUARE, and Radius.OCTAHEDRON is equal to Radius.DIAMOND.
|
boolean |
LOS.isReachable(char[][] walls,
int startx,
int starty,
int targetx,
int targety,
Radius radiusStrategy)
Returns true if a line can be drawn from the start point to the target
point without intervening obstructions.
|
boolean |
LOS.isReachable(double[][] resistanceMap,
int startx,
int starty,
int targetx,
int targety,
Radius radiusStrategy)
Returns true if a line can be drawn from the start point to the target
point without intervening obstructions.
|
Iterator<Coord> |
SpatialMap.radiusPositionIterator(int x,
int y,
Radius measurement,
int distance)
Iterates through positions in a region defined by a Radius (starting at a minimum of x - distance, y - distance
and extending to x + distance, y + distance but skipping any positions where the Radius considers a position
further from x, y than distance) in left-to-right, then top-to-bottom order (the same as reading a page of text).
|
SpatialMap<I,E> |
SpatialMap.radiusSection(int x,
int y,
Radius measurement,
int distance)
Given the center position, Radius to determine measurement, and maximum distance from the center, creates a new
SpatialMap from this one that refers only to the subsection of this SpatialMap shared with the area within the
given distance from the center as measured by measurement.
|
void |
LOS.setRadiusStrategy(Radius radiusStrategy)
Set the radius strategy to the given Radius; the default is CIRCLE if this is not called.
|
boolean |
LOS.spreadReachable(char[][] walls,
int startx,
int starty,
int targetx,
int targety,
Radius radiusStrategy,
int spread)
Returns true if a line can be drawn from the any of the points within spread cells of the start point,
to any of the corresponding points at the same direction and distance from the target point, without
intervening obstructions.
|
boolean |
LOS.spreadReachable(double[][] resistanceMap,
int startx,
int starty,
int targetx,
int targety,
Radius radiusStrategy,
int spread)
Returns true if a line can be drawn from the any of the points within spread cells of the start point,
to any of the corresponding points at the same direction and distance from the target point, without
intervening obstructions.
|
Constructor and Description |
---|
FOVCache(char[][] map,
int maxRadius,
int maxLOSRadius,
Radius radiusKind,
int threadCount)
Create an FOVCache for a given map (as a char[][]), caching all FOV radii from 0 up to and including maxRadius,
using the given Radius enum to determine FOV shape.
|
FOVCache(char[][] map,
int maxRadius,
int maxLOSRadius,
Radius radiusKind,
int threadCount,
Map<Coord,Integer> lights)
Create an FOVCache for a given map (as a char[][]), caching all FOV radii from 0 up to and including maxRadius,
using the given Radius enum to determine FOV shape.
|
FOVCache(char[][] map,
int maxRadius,
Radius radiusKind)
Create an FOVCache for a given map (as a char[][]), caching all FOV radii from 0 up to and including maxRadius,
using the given Radius enum to determine FOV shape.
|
Modifier and Type | Method and Description |
---|---|
LinkedHashSet<Coord> |
Placement.getHidingPlaces(Radius radiusStrategy,
int range)
Gets a LinkedHashSet of Coord, where each Coord is hidden (using the given radiusStrategy and range for FOV
calculations) from any doorways or similar narrow choke-points where a character might be easily ambushed.
|
Modifier and Type | Method and Description |
---|---|
static short[] |
CoordPacker.radiate(short[] bounds,
short[] start,
int expansion,
Radius metric)
Given a packed array encoding a larger area, a packed array encoding one or more points inside bounds, and an
amount of expansion, expands each cell in start by a radius, with a shape determined by metric, equal to
expansion, limiting any expansion to within bounds and returning the final expanded (limited) packed data.
|
Copyright © 2012–2016. All rights reserved.