Package jme3utilities.mesh
Class Icosphere
java.lang.Object
com.jme3.scene.Mesh
jme3utilities.mesh.Icosphere
- All Implemented Interfaces:
com.jme3.export.Savable,com.jme3.util.clone.JmeCloneable,Cloneable
public class Icosphere
extends com.jme3.scene.Mesh
A 3-D, static, Triangles-mode mesh (with indices, normals, and texture
coordinates) that approximates a sphere, generated by subdividing the faces
of a regular icosahedron. The resulting mesh is more isotropic than a U-V
sphere.
The texture coordinates are similar to Sphere.TextureMode.Projected, only with the U values mirrored and offset. Also, there is a boundary issue with the texture coordinates; this issue is very noticeable when the number of refinement steps is <3.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.scene.Mesh
com.jme3.scene.Mesh.Mode -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNo-argument constructor needed by SavableClassUtil.Icosphere(int numRefineSteps, float radius) Instantiate an icosphere with the specified radius and number of refinement steps: 0 steps → 12 vertices, 30 edges, 20 triangular faces 1 step → 42 vertices, 120 edges, 80 triangular faces 2 steps → 162 vertices, 480 edges, 320 triangular faces etcetera The center is at (0,0,0). -
Method Summary
Methods inherited from class com.jme3.scene.Mesh
addMorphTarget, clearBuffer, clearCollisionData, clone, cloneFields, cloneForAnim, collideWith, createCollisionData, deepClone, extractVertexData, generateBindPose, generateBindPose, getBound, getBuffer, getBufferList, getBuffers, getElementLengths, getFloatBuffer, getId, getIndexBuffer, getIndicesAsList, getInstanceCount, getLineWidth, getLodLevel, getMaxNumWeights, getMode, getModeStart, getMorphIndex, getMorphTarget, getMorphTargetNames, getMorphTargets, getNumLodLevels, getPatchVertexCount, getPointSize, getShortBuffer, getTriangle, getTriangle, getTriangle, getTriangleCount, getTriangleCount, getVertexCount, hasMorphTargets, isAnimated, isAnimatedByBone, isAnimatedByJoint, jmeClone, prepareForAnim, read, removeMorphTarget, removeMorphTarget, scaleTextureCoordinates, setBound, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setDynamic, setElementLengths, setId, setInterleaved, setLineWidth, setLodLevels, setMaxNumWeights, setMode, setModeStart, setPatchVertexCount, setStatic, setStreamed, updateBound, updateCounts, write
-
Field Details
-
logger
message logger for this class
-
-
Constructor Details
-
Icosphere
protected Icosphere()No-argument constructor needed by SavableClassUtil. -
Icosphere
public Icosphere(int numRefineSteps, float radius) Instantiate an icosphere with the specified radius and number of refinement steps:- 0 steps → 12 vertices, 30 edges, 20 triangular faces
- 1 step → 42 vertices, 120 edges, 80 triangular faces
- 2 steps → 162 vertices, 480 edges, 320 triangular faces
- etcetera
- Parameters:
numRefineSteps- the desired number of refinement steps (≥0)radius- the desired radius (in mesh units, >0)
-