public static class Adjacency.RotationAdjacency extends Adjacency implements java.io.Serializable
Adjacency.BasicAdjacency, Adjacency.RotationAdjacency, Adjacency.ThinWallAdjacencyblockingRule, costRules, depths, directions, height, invertAdjacent, maxAdjacent, measurement, rotations, standardCost, twoStepRule, width| Constructor and Description |
|---|
RotationAdjacency(int width,
int height,
Measurement metric) |
| Modifier and Type | Method and Description |
|---|---|
IntDoubleOrderedMap |
addCostRule(char tile,
double cost,
boolean isRotation) |
int |
composite(int x,
int y,
int r,
int n)
Encodes up to four components used by this Adjacency, putting them into one int.
|
int |
extractN(int data) |
int |
extractR(int data) |
int |
extractX(int data) |
int |
extractY(int data) |
boolean |
isBlocked(int start,
int direction,
int[][][] neighbors,
double[] map,
double wall) |
int[][][] |
neighborMaps() |
void |
portal(int[][][] neighbors,
int inputPortal,
int outputPortal,
boolean twoWay) |
IntDoubleOrderedMap |
putAllVariants(IntDoubleOrderedMap map,
int key,
double value,
int size) |
void |
putAllVariants(IntVLA list,
double[] map,
int key,
double value,
int size) |
void |
resetAllVariants(double[] map,
int[] keys,
int usable,
double[] values,
int size) |
boolean |
validate(int data) |
addCostRule, extractCoord, hasStandardCost, move, move, putAllVariants, putAllVariants, resetAllVariants, resetAllVariants, show, showMappublic RotationAdjacency(int width,
int height,
Measurement metric)
public int composite(int x,
int y,
int r,
int n)
AdjacencyAdjacency.extractX(int), Adjacency.extractY(int), Adjacency.extractR(int),
and Adjacency.extractN(int), though not all implementations use R and N.composite in class Adjacencyx - the x component to encodey - the y component to encoder - the rotation component to encode; not all implementations use rotation and the max value variesn - the bonus component to encode; this can be used for height or other extra data in some implementationspublic int[][][] neighborMaps()
neighborMaps in class Adjacencypublic boolean isBlocked(int start,
int direction,
int[][][] neighbors,
double[] map,
double wall)
public void portal(int[][][] neighbors,
int inputPortal,
int outputPortal,
boolean twoWay)
public IntDoubleOrderedMap addCostRule(char tile, double cost, boolean isRotation)
addCostRule in class Adjacencypublic IntDoubleOrderedMap putAllVariants(IntDoubleOrderedMap map, int key, double value, int size)
putAllVariants in class Adjacencypublic void putAllVariants(IntVLA list, double[] map, int key, double value, int size)
putAllVariants in class Adjacencypublic void resetAllVariants(double[] map,
int[] keys,
int usable,
double[] values,
int size)
resetAllVariants in class AdjacencyCopyright © Eben Howard 2012–2022. All rights reserved.