Class ModelCreator

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

public abstract class ModelCreator
extends java.lang.Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    class  ModelCreator.Face
    Contains the index info for a face.
    static interface  ModelCreator.IFace  
  • Field Summary

    Fields
    Modifier and Type Field Description
    java.util.List<ModelCreator.IFace> faces  
    protected boolean flipNormals  
    protected boolean hardEdges  
    protected int index  
    java.lang.String name  
    java.util.List<com.badlogic.gdx.math.Vector3> normals  
    java.util.List<com.badlogic.gdx.math.Vector2> uv  
    java.util.List<com.badlogic.gdx.math.Vector3> vertices  
  • Constructor Summary

    Constructors
    Constructor Description
    ModelCreator()  
  • Method Summary

    Modifier and Type Method Description
    protected void addFace​(java.util.List<ModelCreator.IFace> faces, boolean flipNormals, int... v)  
    void dumpObj​(java.io.OutputStream os)
    Exports the model to the .obj (Wavefront) format in the given output stream.
    protected int[] flip​(int[] v, int startIndex)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • name

      public java.lang.String name
    • vertices

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

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

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

      public java.util.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​(java.util.List<ModelCreator.IFace> faces, boolean flipNormals, int... v)
    • flip

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

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