Class ModelCreator

java.lang.Object
gaiasky.util.gdx.ModelCreator
Direct Known Subclasses:
IcoSphereCreator, OctahedronSphereCreator, RingCreator, SphereCreator

public abstract class ModelCreator extends Object
  • Field Details

    • name

      public String name
    • vertices

      public List<com.badlogic.gdx.math.Vector3> vertices
    • normals

      public List<com.badlogic.gdx.math.Vector3> normals
    • uv

      public List<com.badlogic.gdx.math.Vector2> uv
    • faces

      public List<ModelCreator.IFace> faces
    • index

      protected int index
    • flipNormals

      protected boolean flipNormals
    • hardEdges

      protected boolean hardEdges
  • Constructor Details

    • ModelCreator

      public ModelCreator()
  • Method Details

    • addFace

      protected void addFace(List<ModelCreator.IFace> faces, boolean flipNormals, int... v)
    • flip

      protected int[] flip(int[] v, int startIndex)
    • dumpObj

      public void dumpObj(OutputStream os) throws IOException
      Exports the model to the .obj (Wavefront) format in the given output stream.
      Parameters:
      os - The output stream.
      Throws:
      IOException