Interface Screen


public interface Screen
The plane a DocumentView exists on.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.joml.Vector3f
    Gets the center point of the screen
    org.joml.Vector2f
    Gets the width and height of the screen
    float
    Gets the height of the screen
    org.joml.Vector3f
    Gets the lower left corner of the screen from the viewer's perspective
    org.joml.Vector3f
    Gets the lower right corner of the screen from the viewer's perspective
    org.joml.Vector3f
    Gets the upper left corner of the screen from the viewer's perspective
    org.joml.Vector3f
    Gets the upper right corner of the screen from the viewer's perspective
    float
    Gets the width of the screen
    float
    Get the actual height of the screen in the world space size
    float
    Get the actual width of the screen in world space size
    org.joml.Vector3f
    Gets the normal of the screen's plane
    void
    screenspaceToScreen(org.joml.Vector2f in, org.joml.Vector2f out)
    Maps screen coordinates in range [0..1] to [0..getDimensions()] space.
    void
    screenspaceToWorld(org.joml.Vector2f screenPoint, org.joml.Vector3f out)
    Maps screen coordinates in range [0..1] to world coordinates.
    void
    screenToScreenspace(org.joml.Vector2f in, org.joml.Vector2f out)
    Maps screen coordinates in range [0..getDimensions()] to [0..1] space.
    void
    screenToWorld(org.joml.Vector2f screenPoint, org.joml.Vector3f out)
    Maps screen coordinates in range [0..getDimensions()] to world coordinates.
  • Field Details

  • 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