com.jme.scene.shape
Class Dome

java.lang.Object
  extended by com.jme.scene.Spatial
      extended by com.jme.scene.Geometry
          extended by com.jme.scene.TriMesh
              extended by com.jme.scene.shape.Dome
All Implemented Interfaces:
Savable, java.io.Serializable

public class Dome
extends TriMesh

A hemisphere.

Version:
$Revision: 4131 $, $Date: 2009-03-19 20:15:28 +0000 (Thu, 19 Mar 2009) $
Author:
Peter Andersson, Joshua Slack (Original sphere code that was adapted)
See Also:
Serialized Form

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
 
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
Dome()
          NOT API: for internal use, do not call from user code.
Dome(java.lang.String name)
          Constructs a dome.
Dome(java.lang.String name, int planes, int radialSamples, float radius)
          Constructs a dome with center at the origin.
Dome(java.lang.String name, Vector3f center, int planes, int radialSamples, float radius)
          Constructs a dome.
Dome(java.lang.String name, Vector3f center, int planes, int radialSamples, float radius, boolean outsideView)
          Constructs a dome.
 
Method Summary
 Vector3f getCenter()
           
 int getPlanes()
          Get the number of planar segments along the z-axis of the dome.
 int getRadialSamples()
          Get the number of samples radially around the main axis of the dome.
 float getRadius()
          Get the radius of the dome.
 boolean isOutsideView()
          Are the triangles connected in such a way as to present aview out from the dome or not.
 void read(JMEImporter e)
           
 void setData(Vector3f center, int planes, int radialSamples, float radius, boolean updateBuffers, boolean outsideView)
          Deprecated. use updateGeometry(Vector3f, int, int, float, boolean).
 void updateGeometry(Vector3f center, int planes, int radialSamples, float radius, boolean outsideView)
          Rebuilds the dome with a new set of parameters.
 void write(JMEExporter e)
          Generates the connections
 
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, recalcTriangleQuantity, reconstruct, setIndexBuffer, setMode, setTriangleQuantity
 
Methods inherited from class com.jme.scene.Geometry
addTextureCoordinates, addTextureCoordinates, applyRenderState, checkTextureCoordinates, clearTextureBuffers, copyTextureCoordinates, copyTextureCoordinates, findPick, getBinormalBuffer, getColorBuffer, getDefaultColor, getDisplayListID, getFogBuffer, getLightState, getModelBound, getNormalBuffer, getNumberOfUnits, getTangentBuffer, getTextureCoords, getTextureCoords, getVBOInfo, getVertexBuffer, getVertexCount, getWorldCoords, getWorldNormals, hasDirtyVertices, isCastsShadows, lockMeshes, postdraw, predraw, randomVertex, reconstruct, resizeTextureIds, rotateNormals, rotatePoints, scaleTextureCoordinates, scaleTextureCoordinates, setBinormalBuffer, setCastsShadows, setColorBuffer, setDefaultColor, setDisplayListID, setFogCoordBuffer, setHasDirtyVertices, setLightState, setModelBound, setNormalBuffer, setRandomColors, setSolidColor, setTangentBuffer, setTextureCoords, setTextureCoords, setTextureCoords, setVBOInfo, setVertexBuffer, setVertexCount, sortLights, translatePoints, translatePoints, unlockMeshes, updateModelBound, updateWorldBound
 
Methods inherited from class com.jme.scene.Spatial
addController, calculateCollisions, calculatePick, clearControllers, clearRenderState, clearRenderState, getClassTag, getController, getControllerCount, getControllers, getCullHint, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, getRenderState, getRenderState, getTextureCombineMode, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasAncestor, isCollidable, localToWorld, lock, lock, lockBounds, lockBranch, lockMeshes, lockShadows, lockTransforms, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, toString, unlock, unlock, unlockBounds, unlockBranch, unlockMeshes, unlockShadows, unlockTransforms, updateGeometricState, updateRenderState, updateRenderState, updateWorldData, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, updateWorldVectors, worldToLocal
 
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

Dome

public Dome()
NOT API: for internal use, do not call from user code.


Dome

public Dome(java.lang.String name)
Constructs a dome. By default the dome has not geometry data or center.

Parameters:
name - The name of the dome.

Dome

public Dome(java.lang.String name,
            int planes,
            int radialSamples,
            float radius)
Constructs a dome with center at the origin. For details, see the other constructor.

Parameters:
name - Name of dome.
planes - The number of planes along the Z-axis.
radialSamples - The samples along the radial.
radius - Radius of the dome.
See Also:
Dome(java.lang.String, com.jme.math.Vector3f, int, int, float)

Dome

public Dome(java.lang.String name,
            Vector3f center,
            int planes,
            int radialSamples,
            float radius)
Constructs a dome. All geometry data buffers are updated automatically. Both planes and radialSamples increase the quality of the generated dome.

Parameters:
name - Name of the dome.
center - Center of the dome.
planes - The number of planes along the Z-axis.
radialSamples - The number of samples along the radial.
radius - The radius of the dome.

Dome

public Dome(java.lang.String name,
            Vector3f center,
            int planes,
            int radialSamples,
            float radius,
            boolean outsideView)
Constructs a dome. All geometry data buffers are updated automatically. Both planes and radialSamples increase the quality of the generated dome.

Parameters:
name - Name of the dome.
center - Center of the dome.
planes - The number of planes along the Z-axis.
radialSamples - The number of samples along the radial.
radius - The radius of the dome.
outsideView - If true, the triangles will be connected for a view outside of the dome.
Method Detail

getCenter

public Vector3f getCenter()

getPlanes

public int getPlanes()
Get the number of planar segments along the z-axis of the dome.


getRadialSamples

public int getRadialSamples()
Get the number of samples radially around the main axis of the dome.


getRadius

public float getRadius()
Get the radius of the dome.


isOutsideView

public boolean isOutsideView()
Are the triangles connected in such a way as to present aview out from the dome or not.

Returns:

read

public void read(JMEImporter e)
          throws java.io.IOException
Specified by:
read in interface Savable
Overrides:
read in class TriMesh
Throws:
java.io.IOException

setData

public void setData(Vector3f center,
                    int planes,
                    int radialSamples,
                    float radius,
                    boolean updateBuffers,
                    boolean outsideView)
Deprecated. use updateGeometry(Vector3f, int, int, float, boolean).


updateGeometry

public void updateGeometry(Vector3f center,
                           int planes,
                           int radialSamples,
                           float radius,
                           boolean outsideView)
Rebuilds the dome with a new set of parameters.

Parameters:
center - the new center of the dome.
planes - the number of planes along the Z-axis.
radialSamples - the new number of radial samples of the dome.
radius - the new radius of the dome.
outsideView - should the dome be set up to be viewed from the inside looking out.

write

public void write(JMEExporter e)
           throws java.io.IOException
Generates the connections

Specified by:
write in interface Savable
Overrides:
write in class TriMesh
Throws:
java.io.IOException