Package net.openosrs.api.input.target
Class ObjectDestination
- java.lang.Object
-
- net.openosrs.api.input.target.Destination
-
- net.openosrs.api.input.target.ObjectDestination
-
public class ObjectDestination extends Destination
A scene object, aimed at through its click box.Click boxes are generous compared to model hulls, so aim is deliberately left to the inherited normal distribution rather than clamped further: a person clicking a bank booth does not hit the same pixel of it twice.
-
-
Constructor Summary
Constructors Constructor Description ObjectDestination(net.runelite.api.TileObject object, java.lang.String label)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdescribe()A short label for logging and the overlay.net.runelite.api.coords.LocalPointfocusPoint()Where in the scene the camera should look to reveal this destination, ornullwhen the concept does not apply.net.runelite.api.TileObjectgetObject()java.awt.Shapeshape()The raw clickable outline in canvas pixels, ornullwhen the target has no projection at all.-
Methods inherited from class net.openosrs.api.input.target.Destination
area, bounds, cameraCanHelp, centre, contains, getViewport, isCurrent, isVisible, needsCamera, needsScroll, scrollContainer, scrollDirection, suitablePoint, toString, visibleShape, withValidity, withViewport
-
-
-
-
Method Detail
-
getObject
public net.runelite.api.TileObject getObject()
-
shape
public java.awt.Shape shape()
Description copied from class:DestinationThe raw clickable outline in canvas pixels, ornullwhen the target has no projection at all.This is unclipped on purpose. The client projects actors and objects that are behind or beside the camera to coordinates far outside the canvas rather than returning null, so a non-null shape here is not a claim that anything is on screen. Use
Destination.visibleShape()for that.- Specified by:
shapein classDestination
-
describe
public java.lang.String describe()
Description copied from class:DestinationA short label for logging and the overlay.- Specified by:
describein classDestination
-
focusPoint
public net.runelite.api.coords.LocalPoint focusPoint()
Description copied from class:DestinationWhere in the scene the camera should look to reveal this destination, ornullwhen the concept does not apply.Screen furniture has no scene position, so it returns null and the camera is left alone. World targets return their location and the camera controller works out the rotation from there.
- Overrides:
focusPointin classDestination
-
-