Package gaiasky.util.gdx
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 classModelCreator.FaceContains the index info for a face.static interfaceModelCreator.IFace
-
Field Summary
Fields Modifier and Type Field Description java.util.List<ModelCreator.IFace>facesprotected booleanflipNormalsprotected booleanhardEdgesprotected intindexjava.lang.Stringnamejava.util.List<com.badlogic.gdx.math.Vector3>normalsjava.util.List<com.badlogic.gdx.math.Vector2>uvjava.util.List<com.badlogic.gdx.math.Vector3>vertices
-
Constructor Summary
Constructors Constructor Description ModelCreator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddFace(java.util.List<ModelCreator.IFace> faces, boolean flipNormals, int... v)voiddumpObj(java.io.OutputStream os)Exports the model to the .obj (Wavefront) format in the given output stream.protected int[]flip(int[] v, int startIndex)
-
-
-
Field Detail
-
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
-
-
Method Detail
-
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.IOExceptionExports the model to the .obj (Wavefront) format in the given output stream.- Parameters:
os- The output stream.- Throws:
java.io.IOException
-
-