Class RectangleLength2D_I32

All Implemented Interfaces:

public class RectangleLength2D_I32 extends Object implements Serializable
An axis aligned rectangle in 2D that is specified by its lower extent (x0,y0), width, and height. The three other corners are (x0 + width-1,y0), (x0,y0 + height-1), (x0 + width-1,y0 + height-1).
See Also:
  • Field Details

    • x0

      public int x0
      Lower extent x-axis
    • y0

      public int y0
      Lower extent y-axis
    • width

      public int width
      Rectangle's width
    • height

      public int height
      Rectangle's height
  • Constructor Details

    • RectangleLength2D_I32

      public RectangleLength2D_I32()
    • RectangleLength2D_I32

      public RectangleLength2D_I32(int x0, int y0, int width, int height)
  • Method Details

    • setTo

      public RectangleLength2D_I32 setTo(int tl_x, int tl_y, int width, int height)
    • zero

      public void zero()
      Sets the value of all fields to zero
    • setLowerExtent

      public void setLowerExtent(int x, int y)
      Sets lower extent
      x - x-coordinate
      y - y-coordinate
    • setTo

      Sets this rectangle to be equal to the passed in rectangle.
      r - Rectangle which this is to be set equal to
    • getX

      public int getX()
    • getY

      public int getY()
    • toString

      public String toString()
      toString in class Object