Package gaiasky.util.gdx
Class ModelCreator
java.lang.Object
gaiasky.util.gdx.ModelCreator
- Direct Known Subclasses:
IcoSphereCreator
,OctahedronSphereCreator
,RingCreator
,SphereCreator
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Contains the index info for a face.static interface
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addFace
(List<ModelCreator.IFace> faces, boolean flipNormals, int... v) protected int
addVertex
(com.badlogic.gdx.math.Vector3 p) Adds a vertex.void
dumpObj
(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
public 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
-