public class MeshPolygon extends MeshBase
Specify a list of vertices. Any two adjacent vertices + the center (0,0,0) form a triangle. The polygon is going to be split into such triangles, and each triange is split into adjustable number of 'bands' form the outer edge towards the center. Edges of each band can can at any elevation.
MAX_EFFECT_COMPONENTS
Constructor and Description |
---|
MeshPolygon(float[] verticesXY,
float[] bands)
Create a polygon of any shape and varying elevations from the edges towards the center.
|
MeshPolygon(float[] verticesXY,
float[] bands,
int exIndex,
int exVertices)
Create a polygon of any shape and varying elevations from the edges towards the center.
|
MeshPolygon(MeshPolygon mesh,
boolean deep)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
MeshPolygon |
copy(boolean deep)
Copy the Mesh.
|
addEmptyTexComponent, apply, apply, getMaxEffComponents, getShowNormals, getTextureMap, getUniforms, getUseCenters, markForDeletion, mergeEffComponents, mergeTexComponents, numEffComponents, numTexComponents, setComponentCenter, setEffectAssociation, setShowNormals, setTextureMap, setUseCenters, write
public MeshPolygon(float[] verticesXY, float[] bands, int exIndex, int exVertices)
verticesXY
- 2N floats - packed description of polygon vertices. N pairs (x,y).
Vertices HAVE TO be specified in a COUNTERCLOCKWISE order (starting from any).bands
- 2K floats; K pairs of two floats each describing a single band.
From (1.0,Z[0]) (outer edge, its Z elevation) to (0.0,Z[K]) (the center,
its elevation). The polygon is split into such concentric bands.
Must be band[2*i] > band[2*(i+1)] !exIndex
- This and the next parameter describe how to make the mesh denser at the
polyVertices. If e.g. exIndex=3 and exVertices=2, then 3 triangles of the
outermost band (and 2 triangles of the next band, and 1 triange of the third
band) get denser - the 3 triangles become 3+2 = 5.exVertices
- See above.public MeshPolygon(float[] verticesXY, float[] bands)
public MeshPolygon(MeshPolygon mesh, boolean deep)
public MeshPolygon copy(boolean deep)