com.jme3.scene.shape
Class Dome

java.lang.Object
  extended by com.jme3.scene.Mesh
      extended by com.jme3.scene.shape.Dome
All Implemented Interfaces:
Savable, java.lang.Cloneable

public class Dome
extends Mesh

A hemisphere.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme3.scene.Mesh
Mesh.Mode
 
Constructor Summary
Dome()
          Serialization only.
Dome(int planes, int radialSamples, float radius)
          Constructs a dome for use as a SkyDome.
Dome(Vector3f center, int planes, int radialSamples, float radius)
          Constructs a dome visible from the inside, e.g.
Dome(Vector3f center, int planes, int radialSamples, float radius, boolean insideView)
          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 isInsideView()
          Are the triangles connected in such a way as to present a view out from the dome or not.
 void read(JmeImporter e)
           
 void updateGeometry(Vector3f center, int planes, int radialSamples, float radius, boolean insideView)
          Rebuilds the dome with a new set of parameters.
 void write(JmeExporter e)
           
 
Methods inherited from class com.jme3.scene.Mesh
clearBuffer, clone, cloneForAnim, collideWith, createCollisionData, deepClone, extractVertexData, generateBindPose, getBound, getBuffer, getBufferList, getBuffers, getElementLengths, getFloatBuffer, getId, getIndexBuffer, getIndicesAsList, getLineWidth, getLodLevel, getMaxNumWeights, getMode, getModeStart, getNumLodLevels, getPointSize, getShortBuffer, getTriangle, getTriangle, getTriangle, getTriangleCount, getTriangleCount, getVertexCount, prepareForAnim, scaleTextureCoordinates, setBound, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setDynamic, setElementLengths, setId, setInterleaved, setLineWidth, setLodLevels, setMaxNumWeights, setMode, setModeStart, setPointSize, setStatic, setStreamed, updateBound, updateCounts
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dome

public Dome()
Serialization only. Do not use.


Dome

public Dome(int planes,
            int radialSamples,
            float radius)
Constructs a dome for use as a SkyDome. The SkyDome is centered at the origin and only visible from the inside.

Parameters:
planes - The number of planes along the Z-axis. Must be >= 2. Influences how round the arch of the dome is.
radialSamples - The number of samples along the radial. Influences how round the base of the dome is.
radius - Radius of the dome.
See Also:
#Dome(com.jme.math.Vector3f, int, int, float)

Dome

public Dome(Vector3f center,
            int planes,
            int radialSamples,
            float radius)
Constructs a dome visible from the inside, e.g. for use as a SkyDome. All geometry data buffers are updated automatically.
For a cone, set planes=2. For a pyramid, set radialSamples=4 and planes=2. Increasing planes and radialSamples increase the quality of the dome.

Parameters:
center - Center of the dome.
planes - The number of planes along the Z-axis. Must be >= 2. Influences how round the arch of the dome is.
radialSamples - The number of samples along the radial. Influences how round the base of the dome is.
radius - The radius of the dome.

Dome

public Dome(Vector3f center,
            int planes,
            int radialSamples,
            float radius,
            boolean insideView)
Constructs a dome. Use this constructor for half-sphere, pyramids, or cones. All geometry data buffers are updated automatically.
For a cone, set planes=2. For a pyramid, set radialSamples=4 and planes=2. Setting higher values for planes and radialSamples increases the quality of the half-sphere.

Parameters:
center - Center of the dome.
planes - The number of planes along the Z-axis. Must be >= 2. Influences how round the arch of the dome is.
radialSamples - The number of samples along the radial. Influences how round the base of the dome is.
radius - The radius of the dome.
insideView - If true, the dome is only visible from the inside, like a SkyDome. If false, the dome is only visible from the outside.
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.


isInsideView

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


updateGeometry

public void updateGeometry(Vector3f center,
                           int planes,
                           int radialSamples,
                           float radius,
                           boolean insideView)
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.
insideView - should the dome be set up to be viewed from the inside looking out.

read

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

write

public void write(JmeExporter e)
           throws java.io.IOException
Specified by:
write in interface Savable
Overrides:
write in class Mesh
Throws:
java.io.IOException