|
||||||||||
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.RegularPolyhedron
public abstract class RegularPolyhedron
A polyhedron whose faces and edges are all identical.
The main purpose of this class is to expose the side length property so that tools may operate on any of the polyhedron classes without needing specific code for each.
Note that the use of the term 'regular polyhedron' here is slightly different from the pure mathematical definition. For more details see the page at Math World.
Nested Class Summary |
---|
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 | |
---|---|
protected float |
sideLength
|
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 | |
---|---|
RegularPolyhedron()
|
|
RegularPolyhedron(java.lang.String name)
|
Method Summary | |
---|---|
protected abstract void |
doUpdateGeometry()
Update all of the computed information about this polyhedron. |
float |
getSideLength()
Get the length of an edge. |
void |
updateGeometry(float sideLength)
Set the length of an edge. |
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 |
Field Detail |
---|
protected float sideLength
Constructor Detail |
---|
public RegularPolyhedron()
public RegularPolyhedron(java.lang.String name)
Method Detail |
---|
protected abstract void doUpdateGeometry()
This will be automatically called each time the side length is altered.
public float getSideLength()
public final void updateGeometry(float sideLength)
Note: this method causes the tri-mesh geometry data to be recalculated, see the package description for more information about this.
sideLength
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |