Class Quad

All Implemented Interfaces:
Pickable, Hintable, Renderable, Savable

public class Quad extends Mesh
Quad defines a four sided, two dimensional shape. The local height of the Quad defines it's size about the y-axis, while the width defines the x-axis. The z-axis will always be 0.
  • Field Details

    • _width

      protected double _width
    • _height

      protected double _height
  • Constructor Details

    • Quad

      public Quad()
    • Quad

      public Quad(String name)
      Constructor creates a new Quad object.
      Parameters:
      name - the name of this Quad.
    • Quad

      public Quad(String name, double width, double height)
      Constructor creates a new Quade object with the provided width and height.
      Parameters:
      name - the name of the Quad.
      width - the width of the Quad.
      height - the height of the Quad.
  • Method Details

    • resize

      public void resize(double width, double height)
      resize changes the width and height of the given quad by altering its vertices.
      Parameters:
      width - the new width of the Quad.
      height - the new height of the Quad.
    • getWidth

      public double getWidth()
    • getHeight

      public double getHeight()