|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Geometry
com.jme.scene.TriMesh
com.jme.scene.shape.GeoSphere
public class GeoSphere
A polygon mesh approximating a sphere by recursive subdivision.
First approximation is an octahedron; each level of refinement increases the number of polygons by a factor of 4.
Shared vertices are not retained, so numerical errors may produce cracks between polygons at high subdivision levels.
TODO: texture co-ordinates could be nicer
Nested Class Summary | |
---|---|
(package private) static class |
GeoSphere.Triangle
|
Nested classes/interfaces inherited from class com.jme.scene.TriMesh |
---|
TriMesh.Mode |
Nested classes/interfaces inherited from class com.jme.scene.Spatial |
---|
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode |
Field Summary |
---|
Fields inherited from class com.jme.scene.TriMesh |
---|
indexBuffer, mode, triangleQuantity |
Fields inherited from class com.jme.scene.Geometry |
---|
binormalBuf, bound, castsShadows, colorBuf, compVect, defaultColor, displayListID, enabled, fogBuf, hasDirtyVertices, normBuf, states, tangentBuf, texBuf, vboInfo, vertBuf, vertQuantity |
Fields inherited from class com.jme.scene.Spatial |
---|
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
Constructor Summary | |
---|---|
GeoSphere()
NOT API: for internal use, do not call from user code. |
|
GeoSphere(java.lang.String name,
boolean ikosa,
int maxlevels)
|
Method Summary | |
---|---|
int |
getNumLevels()
|
float |
getRadius()
TODO: radius is always 1 |
boolean |
isUsingIcosahedron()
|
Methods inherited from class com.jme.scene.TriMesh |
---|
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, getVertIndex, hasCollision, hasTriangleCollision, randomPointOnTriangles, read, recalcTriangleQuantity, reconstruct, setIndexBuffer, setMode, setTriangleQuantity, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jme.util.export.Savable |
---|
getClassTag |
Constructor Detail |
---|
public GeoSphere()
public GeoSphere(java.lang.String name, boolean ikosa, int maxlevels)
name
- the name of the spatialikosa
- true to start with an 20 triangles, false to start with 8
trianglesmaxlevels
- an integer >= 1 setting the recursion leveljmetest.shape.TestGeoSphere
Method Detail |
---|
public int getNumLevels()
public float getRadius()
public boolean isUsingIcosahedron()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |