Class ModelCreator
java.lang.Object
gaiasky.util.gdx.ModelCreator
- Direct Known Subclasses:
IcoSphereCreator, OctahedronSphereCreator, RingCreator, SphereCreator
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassContains the index info for a face.static interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddFace(List<ModelCreator.IFace> faces, boolean flipNormals, int... v) protected intaddVertex(com.badlogic.gdx.math.Vector3 p) Adds a vertex.voiddumpObj(OutputStream os) Exports the model to the .obj (Wavefront) format in the given output stream.protected int[]flip(int[] v, int startIndex)
-
Field Details
-
name
-
vertices
-
normals
-
binormals
-
tangents
-
uv
-
faces
-
index
protected int index -
flipNormals
protected boolean flipNormals -
hardEdges
protected boolean hardEdges
-
-
Constructor Details
-
ModelCreator
protected ModelCreator()
-
-
Method Details
-
addFace
-
flip
protected int[] flip(int[] v, int startIndex) -
addVertex
protected int addVertex(com.badlogic.gdx.math.Vector3 p) Adds a vertex.- Parameters:
p- The point.- Returns:
- The index of this vertex.
-
dumpObj
Exports the model to the .obj (Wavefront) format in the given output stream.- Parameters:
os- The output stream.- Throws:
IOException
-