Class Quad

java.lang.Object
com.jme3.scene.Mesh
com.jme3.scene.shape.Quad
All Implemented Interfaces:
Savable, JmeCloneable, Cloneable

public class Quad extends Mesh
Quad represents a rectangular plane in space defined by 4 vertices. The quad's lower-left side is contained at the local space origin (0, 0, 0), while the upper-right side is located at the width/height coordinates (width, height, 0).
  • Constructor Details

    • Quad

      protected Quad()
      Serialization only. Do not use.
    • Quad

      public Quad(float width, float height)
      Create a quad with the given width and height. The quad is always created in the XY plane.
      Parameters:
      width - The X extent or width
      height - The Y extent or width
    • Quad

      public Quad(float width, float height, boolean flipCoords)
      Create a quad with the given width and height. The quad is always created in the XY plane.
      Parameters:
      width - The X extent or width
      height - The Y extent or width
      flipCoords - If true, the texture coordinates will be flipped along the Y axis.
  • Method Details

    • getHeight

      public float getHeight()
    • getWidth

      public float getWidth()
    • updateGeometry

      public void updateGeometry(float width, float height)
    • updateGeometry

      public void updateGeometry(float width, float height, boolean flipCoords)
    • read

      public void read(JmeImporter importer) throws IOException
      Specified by:
      read in interface Savable
      Overrides:
      read in class Mesh
      Throws:
      IOException
    • write

      public void write(JmeExporter e) throws IOException
      Specified by:
      write in interface Savable
      Overrides:
      write in class Mesh
      Throws:
      IOException