Class RingCreator
java.lang.Object
gaiasky.util.gdx.ModelCreator
gaiasky.util.gdx.RingCreator
-
Nested Class Summary
Nested classes/interfaces inherited from class ModelCreator
ModelCreator.Face, ModelCreator.IFaceModifier and TypeClassDescriptionclassContains the index info for a face.static interface -
Field Summary
Fields inherited from class ModelCreator
binormals, faces, flipNormals, hardEdges, index, name, normals, tangents, uv, vertices -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidaddUV(com.badlogic.gdx.math.Vector3 p, float angle) protected intaddVertex(com.badlogic.gdx.math.Vector3 p, float angle) create(int divisions, float innerRadius, float outerRadius, boolean flipNormals) Creates a new ring with the given parameters.create(int divisions, float innerRadius, float outerRadius, boolean flipNormals, float startAngle, float endAngle) Creates a new ring with the given parametersMethods inherited from class ModelCreator
addFace, addVertex, dumpObj, flipModifier 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)
-
Constructor Details
-
RingCreator
public RingCreator()
-
-
Method Details
-
create
Creates a new ring with the given parameters.- Parameters:
innerRadius- The inner radius length.outerRadius- The outer radius length.flipNormals- Whether to flip normals or not.- Returns:
- This ring creator, for chaining
-
create
public RingCreator create(int divisions, float innerRadius, float outerRadius, boolean flipNormals, float startAngle, float endAngle) Creates a new ring with the given parameters- Parameters:
innerRadius- The inner radius lengthouterRadius- The outer radius lengthflipNormals- Whether to flip normals or not- Returns:
- This ring creator, for chaining
-
addVertex
protected int addVertex(com.badlogic.gdx.math.Vector3 p, float angle) -
addUV
protected void addUV(com.badlogic.gdx.math.Vector3 p, float angle) -
addNormals
protected void addNormals()
-