Package net.storm.api.domain
Interface Locatable
-
- All Known Subinterfaces:
IActor
,IDecorativeObject
,IGameObject
,IGroundObject
,INPC
,IPlayer
,ITile
,ITileItem
,ITileObject
,IWallObject
,SceneEntity
,TileEntity
public interface Locatable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int
distanceTo(net.runelite.api.coords.WorldPoint other)
default int
distanceTo(Locatable other)
default float
distanceTo2DHypotenuse(net.runelite.api.coords.WorldPoint target)
Find the straight-line distance from this point to another point.default float
distanceToHypotenuse(net.runelite.api.coords.WorldPoint target)
Gets the straight-line distance between the origin point and the target point.net.runelite.api.coords.LocalPoint
getLocalLocation()
int
getPlane()
net.runelite.api.coords.WorldPoint
getWorldLocation()
default int
getWorldX()
default int
getWorldY()
-
-
-
Method Detail
-
getWorldLocation
net.runelite.api.coords.WorldPoint getWorldLocation()
-
getLocalLocation
net.runelite.api.coords.LocalPoint getLocalLocation()
-
distanceTo
default int distanceTo(Locatable other)
-
distanceTo
default int distanceTo(net.runelite.api.coords.WorldPoint other)
-
distanceToHypotenuse
default float distanceToHypotenuse(net.runelite.api.coords.WorldPoint target)
Gets the straight-line distance between the origin point and the target point.If the target is not on the same plane, this method will return
Float.MAX_VALUE
. If ignoring the plane is wanted, use thedistanceTo2DHypotenuse(WorldPoint)
method.- Parameters:
target
- worldpoint- Returns:
- the straight-line distance
-
distanceTo2DHypotenuse
default float distanceTo2DHypotenuse(net.runelite.api.coords.WorldPoint target)
Find the straight-line distance from this point to another point.This method disregards the plane value of the two tiles and returns the simple distance between the X-Y coordinate pairs.
- Parameters:
target
- worldpoint- Returns:
- the straight-line distance
-
getWorldX
default int getWorldX()
-
getWorldY
default int getWorldY()
-
getPlane
int getPlane()
-
-