com.jme.scene.shape
Class Dome

java.lang.Object
  extended bycom.jme.scene.Spatial
      extended bycom.jme.scene.Geometry
          extended bycom.jme.scene.TriMesh
              extended bycom.jme.scene.shape.Dome
All Implemented Interfaces:
java.io.Serializable

public class Dome
extends TriMesh

A dome is a half sphere.

Version:
$Id:
Author:
Peter Andersson, Joshua Slack (Original sphere code that was adapted)
See Also:
Serialized Form

Field Summary
 Vector3f center
          The center of the dome
 float radius
          The radius of the dome
 
Fields inherited from class com.jme.scene.TriMesh
indices, triangleQuantity
 
Fields inherited from class com.jme.scene.Geometry
bound, color, colorBuf, normal, normBuf, texBuf, texture, vertBuf, vertex, vertQuantity
 
Fields inherited from class com.jme.scene.Spatial
currentStates, defaultStateList, forceCull, forceView, frustrumIntersects, geometricalControllers, lightCombineMode, localRotation, localScale, localTranslation, name, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder
 
Constructor Summary
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.
 
Method Summary
 void setData(Vector3f center, int planes, int radialSamples, float radius, boolean updateBuffers, boolean outsideView)
          Changes the information of the dome into the given values.
 
Methods inherited from class com.jme.scene.TriMesh
clearBuffers, draw, drawBounds, findCollisions, findTriangleCollision, findTrianglePick, findWorldRotMat, getIndexAsBuffer, getIndices, getMeshAsTriangles, getTriangle, getTriangle, getTriangleQuantity, hasCollision, hasTriangleCollision, putClone, reconstruct, setIndexBuffer, setIndices, updateCollisionTree, updateIndexBuffer
 
Methods inherited from class com.jme.scene.Geometry
applyRenderState, applyStates, copyTextureCoords, findPick, getAllTextures, getCloneID, getColorAsFloatBuffer, getColors, getModelBound, getNormalAsFloatBuffer, getNormals, getNumberOfUnits, getTextureAsFloatBuffer, getTextureAsFloatBuffer, getTextures, getTextures, getVBOColorID, getVBONormalID, getVBOTextureID, getVBOVertexID, getVerticeAsFloatBuffer, getVertices, getVertQuantity, isVBOColorEnabled, isVBONormalEnabled, isVBOTextureEnabled, isVBOVertexEnabled, randomVertice, reconstruct, setAllTextures, setColor, setColors, setFloatBuffer, setForceView, setModelBound, setNormal, setNormalBuffer, setNormals, setRandomColors, setSolidColor, setTexture, setTexture, setTextureBuffer, setTextureCoord, setTextures, setTextures, setVBOColorEnabled, setVBOColorID, setVBONormalEnabled, setVBONormalID, setVBOTextureEnabled, setVBOTextureID, setVBOVertexEnabled, setVBOVertexID, setVertex, setVertexBuffer, setVertices, updateColorBuffer, updateColorBuffer, updateModelBound, updateNormalBuffer, updateNormalBuffer, updateTextureBuffer, updateTextureBuffer, updateTextureBuffer, updateVertexBuffer, updateVertexBuffer, updateWorldBound
 
Methods inherited from class com.jme.scene.Spatial
addController, applyDefaultStates, calculateCollisions, calculatePick, clearCurrentState, clearCurrentStates, clearRenderState, getController, getControllers, getCurrentState, getLastFrustumIntersection, getLightCombineMode, getLocalRotation, getLocalScale, getLocalTranslation, getName, getParent, getRenderQueueMode, getRenderStateList, getTextureCombineMode, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, isForceCulled, isForceView, onDraw, onDrawBounds, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeFromParent, setForceCull, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setName, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setWorldBound, setZOrder, toString, updateGeometricState, updateRenderState, updateRenderState, updateWorldData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

radius

public float radius
The radius of the dome


center

public Vector3f center
The center of the dome

Constructor Detail

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.
Method Detail

setData

public void setData(Vector3f center,
                    int planes,
                    int radialSamples,
                    float radius,
                    boolean updateBuffers,
                    boolean outsideView)
Changes the information of the dome into the given values. The boolean at the end signals if buffer data should be updated as well. If the dome is to be rendered, then that value should be true.

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.
updateBuffers - If true, buffer information is updated as well.
outsideView - If true, the triangles will be connected for a view outside of the dome.