RuneHive-Tarnish
Neural OSRS Enhancement Framework
|
Public Member Functions | |
Position (int x, int y) | |
Position (int x, int y, int height) | |
int | getX () |
int | getY () |
int | getHeight () |
int | getLocalX () |
int | getLocalY () |
int | getLocalX (Position origin) |
int | getLocalY (Position origin) |
int | getChunkX () |
int | getChunkY () |
boolean | isWithinDistance (Position other, int radius) |
double | getDistance (Position other) |
int | getDistances (Position other) |
int | getManhattanDistance (Position other) |
int | getLongestDelta (Position other) |
Position | transform (int diffX, int diffY, int diffZ) |
Position | transform (int diffX, int diffY) |
Position | transform (Position other) |
Position | copy () |
Static Public Member Functions | |
static int | getManhattanDistance (Interactable origin, Interactable target) |
static double | getDistance (Position first, Position second) |
static int | getManhattanDistance (Position first, Position second) |
static Position | create (int x, int y, int z) |
static Position | create (int x, int y) |
Static Public Attributes | |
static final int | HEIGHT_LEVELS = 4 |
Represents a single tile on the game world.
Definition at line 51 of file Position.java.
|
inline |
Creates a location with a default height of 0.
Definition at line 66 of file Position.java.
|
inline |
Creates a location.
Definition at line 71 of file Position.java.
|
inline |
Creates a deep copy of this location.
Definition at line 351 of file Position.java.
|
inlinestatic |
Creates a location.
x | The x coordinate. |
y | The y coordinate. |
Definition at line 303 of file Position.java.
|
inlinestatic |
Creates a location.
x | The x coordinate. |
y | The y coordinate. |
z | The height coordinate. |
Definition at line 292 of file Position.java.
|
inline |
Gets the chunk x coordinate.
Definition at line 113 of file Position.java.
|
inline |
Gets the chunk y coordinate.
Definition at line 118 of file Position.java.
|
inlinestatic |
Gets the Euclidean (straight-line) distance between two Position
s.
Definition at line 227 of file Position.java.
|
inline |
Gets the distance between this location and another location.
other | The other location. |
Definition at line 200 of file Position.java.
|
inline |
Absolute distance between this Coordiante and another.
other | The other Coordiante. |
Definition at line 213 of file Position.java.
|
inline |
Gets the height coordinate, or height.
Definition at line 88 of file Position.java.
|
inline |
Gets the local x coordinate relative to this region.
Definition at line 93 of file Position.java.
|
inline |
Gets the local x coordinate relative to a specific region.
Definition at line 103 of file Position.java.
|
inline |
Gets the local y coordinate relative to this region.
Definition at line 98 of file Position.java.
|
inline |
Gets the local y coordinate relative to a specific region.
Definition at line 108 of file Position.java.
|
inline |
Gets the longest horizontal or vertical delta between the two positions.
other | The other position. |
Definition at line 277 of file Position.java.
|
inlinestatic |
Gets the manhattan distance between two interactable object.
origin | The originating location. |
target | The target location. |
Definition at line 173 of file Position.java.
|
inlinestatic |
Gets the Euclidean (straight-line) distance between two Position
s.
Definition at line 265 of file Position.java.
|
inline |
Gets the distance between this location and another location without diagonals.
other | The other location. |
Definition at line 240 of file Position.java.
|
inline |
Gets the absolute x coordinate.
Definition at line 78 of file Position.java.
|
inline |
Gets the absolute y coordinate.
Definition at line 83 of file Position.java.
|
inline |
Checks if this location is within range of another.
other | The other location. |
radius | The radius from the origin point. |
True
if the location is within the radius. Definition at line 184 of file Position.java.
|
inline |
Creates a new location based on this location.
diffX | X difference. |
diffY | Y difference. |
Definition at line 326 of file Position.java.
|
inline |
Creates a new location based on this location.
diffX | X difference. |
diffY | Y difference. |
diffZ | Z difference. |
Definition at line 315 of file Position.java.
Creates a new location based on this location.
other | The difference. |
Definition at line 341 of file Position.java.
|
static |
The maximum amount of height-planes.
Definition at line 54 of file Position.java.