public class MeshSphere extends MeshBase
Do so by starting off with a 16-faced solid which is basically a regular dodecahedron with each of its 8 faces vertically split into 2 triangles, and which each step divide each of its triangular faces into smaller and smaller subtriangles and inflate their vertices to lay on the surface or the sphere.
MAX_EFFECT_COMPONENTS
Constructor and Description |
---|
MeshSphere(int level)
Creates the underlying grid of vertices with the usual attribs which approximates a sphere.
|
MeshSphere(MeshSphere mesh,
boolean deep)
Copy cconstructor.
|
Modifier and Type | Method and Description |
---|---|
MeshSphere |
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 MeshSphere(int level)
When level=1, it outputs the 12 vertices of a regular icosahedron. When level=N, it divides each of the 20 icosaherdon's triangular faces into N^2 smaller triangles (by dividing each side into N equal segments) and 'inflates' the internal vertices so that they touch the sphere.
level
- Specifies the approximation level. Valid values: level ≥ 1public MeshSphere(MeshSphere mesh, boolean deep)
public MeshSphere copy(boolean deep)