Package net.arcadiusmc.delphi
Interface Screen
public interface Screen
The plane a
DocumentView exists on.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Vector3fcenter()Gets the center point of the screenorg.joml.Vector2fGets the width and height of the screenfloatGets the height of the screenorg.joml.Vector3fGets the lower left corner of the screen from the viewer's perspectiveorg.joml.Vector3fGets the lower right corner of the screen from the viewer's perspectiveorg.joml.Vector3fGets the upper left corner of the screen from the viewer's perspectiveorg.joml.Vector3fGets the upper right corner of the screen from the viewer's perspectivefloatgetWidth()Gets the width of the screenfloatGet the actual height of the screen in the world space sizefloatGet the actual width of the screen in world space sizeorg.joml.Vector3fnormal()Gets the normal of the screen's planevoidscreenspaceToScreen(org.joml.Vector2f in, org.joml.Vector2f out) Maps screen coordinates in range [0..1] to [0..getDimensions()] space.voidscreenspaceToWorld(org.joml.Vector2f screenPoint, org.joml.Vector3f out) Maps screen coordinates in range [0..1] to world coordinates.voidscreenToScreenspace(org.joml.Vector2f in, org.joml.Vector2f out) Maps screen coordinates in range [0..getDimensions()] to [0..1] space.voidscreenToWorld(org.joml.Vector2f screenPoint, org.joml.Vector3f out) Maps screen coordinates in range [0..getDimensions()] to world coordinates.
-
Field Details
-
DEFAULT_WIDTH
static final int DEFAULT_WIDTH- See Also:
-
DEFAULT_HEIGHT
static final int DEFAULT_HEIGHT- See Also:
-
-
Method Details
-
getWidth
float getWidth()Gets the width of the screen- Returns:
- Screen width
-
getWorldWidth
float getWorldWidth()Get the actual width of the screen in world space size- Returns:
- Actual screen width
-
getHeight
float getHeight()Gets the height of the screen- Returns:
- Screen height
-
getWorldHeight
float getWorldHeight()Get the actual height of the screen in the world space size- Returns:
- Actual screen height
-
normal
org.joml.Vector3f normal()Gets the normal of the screen's plane- Returns:
- Screen normal
-
center
org.joml.Vector3f center()Gets the center point of the screen- Returns:
- Screen center
-
getDimensions
org.joml.Vector2f getDimensions()Gets the width and height of the screen- Returns:
- Screen dimensions, (width, height)
-
getLowerLeft
org.joml.Vector3f getLowerLeft()Gets the lower left corner of the screen from the viewer's perspective- Returns:
- Lower left corner
-
getLowerRight
org.joml.Vector3f getLowerRight()Gets the lower right corner of the screen from the viewer's perspective- Returns:
- Lower right corner
-
getUpperLeft
org.joml.Vector3f getUpperLeft()Gets the upper left corner of the screen from the viewer's perspective- Returns:
- Upper left corner
-
getUpperRight
org.joml.Vector3f getUpperRight()Gets the upper right corner of the screen from the viewer's perspective- Returns:
- Upper right corner
-
screenToWorld
void screenToWorld(org.joml.Vector2f screenPoint, org.joml.Vector3f out) Maps screen coordinates in range [0..getDimensions()] to world coordinates.- Parameters:
screenPoint- Screen point, in space [0..getDimensions()]out- Result destination
-
screenToScreenspace
void screenToScreenspace(org.joml.Vector2f in, org.joml.Vector2f out) Maps screen coordinates in range [0..getDimensions()] to [0..1] space.- Parameters:
in- Input in range [0..getDimensions()]out- Result output, in range [0..1]
-
screenspaceToScreen
void screenspaceToScreen(org.joml.Vector2f in, org.joml.Vector2f out) Maps screen coordinates in range [0..1] to [0..getDimensions()] space.- Parameters:
in- Input in range [0..1]out- Result output, in range [0..getDimensions()]
-
screenspaceToWorld
void screenspaceToWorld(org.joml.Vector2f screenPoint, org.joml.Vector3f out) Maps screen coordinates in range [0..1] to world coordinates.- Parameters:
screenPoint- Screen point, in space [0..1]out- Result destination
-