public class Perspective
extends java.lang.Object
Constructor | Description |
---|---|
Perspective() |
Modifier and Type | Method | Description |
---|---|---|
static java.util.Optional<java.awt.Point> |
worldToMiniMap(int x,
int y) |
Translates two-dimensional ground coordinates within the 3D
world to their corresponding coordinates on the mini-map.
|
static java.util.Optional<java.awt.Point> |
worldToScreen(int x,
int y,
int clientPlane,
int zOffset) |
Translates two-dimensional ground coordinates within the 3D
world to their corresponding coordinates on the game screen.
|
public static java.util.Optional<java.awt.Point> worldToScreen(int x, int y, int clientPlane, int zOffset)
x
- ground coordinate on the x axisy
- ground coordinate on the y axisclientPlane
- the client plane, ground levelzOffset
- the offset from the groundPoint
on screen corresponding to the position in 3D-space;
or nothing if the position is outside the screenpublic static java.util.Optional<java.awt.Point> worldToMiniMap(int x, int y)
x
- ground coordinate on the x axisy
- ground coordinate on the y axisPoint
on the mini-map corresponding to the position in 3D-space;
or nothing if the position is outside the screen