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
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)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
-
index
protected int index -
flipNormals
protected boolean flipNormals -
hardEdges
protected boolean hardEdges
-
-
Constructor Details
-
ModelCreator
public ModelCreator()
-
-
Method Details
-
addFace
-
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
-