Package rsb.wrappers

Class RSModel

Direct Known Subclasses:
RSCharacterModel, RSGroundItemModel, RSGroundObjectModel, RSWallObjectModel

public class RSModel extends MethodProvider
A screen space model.
Author:
GigiaJ
  • Constructor Details

    • RSModel

      public RSModel(MethodContext ctx, net.runelite.api.Model model)
  • Method Details

    • newVertexFilter

      public static Filter<RSModel> newVertexFilter(int[] vertex_a)
      Returns a filter that matches against the array of point indices for the A vertices of each triangle. Use in scripts is discouraged.
      Parameters:
      vertex_a - The array of indices for A vertices.
      Returns:
      The vertex point index based model filter.
    • doClick

      public boolean doClick(boolean leftClick)
      Clicks the RSModel.
      Parameters:
      leftClick - if true it left clicks.
      Returns:
      true if clicked.
    • doAction

      public boolean doAction(String action, String... target)
      Clicks the RSModel and clicks the menu action
      Parameters:
      action - the action to be clicked in the menu
      target - the option of the action to be clicked in the menu
      Returns:
      true if clicked, false if failed.
    • doAction

      public boolean doAction(String action)
      Clicks the RSModel and clicks the menu action
      Parameters:
      action - the action to be clicked in the menu
      Returns:
      true if clicked, false if failed.
    • getPoint

      public net.runelite.api.Point getPoint()
      Returns a random screen point.
      Returns:
      A screen point, or Point(-1, -1) if the model is not on screen.
      See Also:
    • getPoints

      public net.runelite.api.Point[] getPoints()
      Returns all the screen points.
      Returns:
      All the points that are on the screen, if the model is not on the screen it will return null.
    • getPointOnScreen

      public net.runelite.api.Point getPointOnScreen()
      Gets a point on a model that is on screen.
      Returns:
      First point that it finds on screen else a random point on screen of an object.
    • getTriangles

      public Polygon[] getTriangles()
      Returns an array of triangles containing the screen points of this model.
      Returns:
      The on screen triangles of this model.
    • hover

      public void hover()
      Moves the mouse onto the RSModel.
    • equals

      public boolean equals(Object o)
      Returns true if the provided object is an RSModel with the same x, y and z points as this model. This method compares all of the values in the three vertex arrays.
      Overrides:
      equals in class Object
      Returns:
      true if the provided object is a model with the same points as this.
    • getOrientation

      public int getOrientation()
    • getIndexCount

      public int getIndexCount()
    • getVertexCount

      public int getVertexCount()
    • getModel

      public net.runelite.api.Model getModel()
    • getConvexHull

      public Polygon getConvexHull()