Class SceneProjection

java.lang.Object
privbot.ui.overlay.SceneProjection

public final class SceneProjection extends Object
World → canvas, the same way on every server.

RuneLite's Perspective helpers answer nothing on Impact and Elorin, so a scene overlay written against them silently draws nothing there. This facade projects on every server: on Impact and Elorin it uses PrivBot's own projection for that client (on Elorin, the client's own, the same geometry PrivBot clicks tiles with), and on RuneLite-API servers Perspective. Callers never see a LocalPoint.

  • Method Summary

    Modifier and Type
    Method
    Description
    canvasPoint(net.runelite.api.coords.WorldPoint tile, int heightOffset)
    The canvas point of a tile's centre raised by heightOffset (0 = ground), or null.
    net.runelite.api.Client
    The client this projection reads the camera from.
    hull(net.runelite.api.Actor actor)
    An actor's outline: its convex hull where the client provides one, else its tile.
    of(net.runelite.api.Client client)
    The projection for client, using whichever projection that client needs.
    textAnchor(net.runelite.api.coords.WorldPoint tile, Graphics2D g, String text, int heightOffset)
    Where to draw text centred over a tile (baseline point), or null when off-screen.
    tilePoly(net.runelite.api.Actor actor)
    The tile polygon under an actor (its world location, which on Impact is the centre tile).
    tilePoly(net.runelite.api.coords.WorldPoint tile)
    The four-corner canvas polygon of a world tile, or null when off-screen / out of scene.
    boolean
    True when this client's own projection draws the tiles (Elorin), not the CPU camera math.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • of

      public static SceneProjection of(net.runelite.api.Client client)
      The projection for client, using whichever projection that client needs.
    • usesClientProjection

      public boolean usesClientProjection()
      True when this client's own projection draws the tiles (Elorin), not the CPU camera math.
    • client

      public net.runelite.api.Client client()
      The client this projection reads the camera from.
    • tilePoly

      public Polygon tilePoly(net.runelite.api.coords.WorldPoint tile)
      The four-corner canvas polygon of a world tile, or null when off-screen / out of scene.
    • canvasPoint

      public Point canvasPoint(net.runelite.api.coords.WorldPoint tile, int heightOffset)
      The canvas point of a tile's centre raised by heightOffset (0 = ground), or null.
    • textAnchor

      public Point textAnchor(net.runelite.api.coords.WorldPoint tile, Graphics2D g, String text, int heightOffset)
      Where to draw text centred over a tile (baseline point), or null when off-screen.
    • hull

      public Shape hull(net.runelite.api.Actor actor)
      An actor's outline: its convex hull where the client provides one, else its tile. On Impact and Elorin there is no hull, so the tile is the honest answer.
    • tilePoly

      public Polygon tilePoly(net.runelite.api.Actor actor)
      The tile polygon under an actor (its world location, which on Impact is the centre tile).