com.jme.scene.shape
Class CompositeSphere

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

public class CompositeSphere
extends CompositeMesh

CompositeSphere is um ... a CompositeSphere :)

Version:
$Id: CompositeSphere.java,v 1.2 2005/01/03 19:00:15 renanse Exp $
Author:
Joshua Slack
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.jme.scene.CompositeMesh
CompositeMesh.IndexRange
 
Field Summary
 Vector3f center
           
 float radius
           
 
Fields inherited from class com.jme.scene.CompositeMesh
ranges
 
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
CompositeSphere(java.lang.String name)
          Constructs a CompositeSphere.
CompositeSphere(java.lang.String name, int zSamples, int radialSamples, float radius)
          Constructs a CompositeSphere with center at the origin.
CompositeSphere(java.lang.String name, Vector3f center, int zSamples, int radialSamples, float radius)
          Constructs a CompositeSphere.
 
Method Summary
 Vector3f getCenter()
          Returns the center of this CompositeSphere.
 void setCenter(Vector3f aCenter)
          Sets the center of this CompositeSphere.
 void setData(Vector3f center, int zSamples, int radialSamples, float radius, boolean updateBuffers)
          Changes the information of the CompositeSphere into the given values.
 
Methods inherited from class com.jme.scene.CompositeMesh
createQuadRange, createQuadStrip, createTriangleFan, createTriangleRange, createTriangleStrip, draw, drawBounds, getIndexRanges, getMeshAsTriangles, getTriangle, getTriangle, getTriangleQuantity, reconstruct, recreateTriangleIndices, setIndexRanges, updateIndexBuffer
 
Methods inherited from class com.jme.scene.TriMesh
clearBuffers, findCollisions, findTriangleCollision, findTrianglePick, findWorldRotMat, getIndexAsBuffer, getIndices, hasCollision, hasTriangleCollision, putClone, reconstruct, setIndexBuffer, setIndices, updateCollisionTree
 
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

center

public Vector3f center
Constructor Detail

CompositeSphere

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

Parameters:
name - The name of the CompositeSphere.

CompositeSphere

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

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

CompositeSphere

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

Parameters:
name - Name of the CompositeSphere.
center - Center of the CompositeSphere.
zSamples - The number of samples along the Z.
radialSamples - The number of samples along the radial.
radius - The radius of the CompositeSphere.
Method Detail

setData

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

Parameters:
center - The new center of the CompositeSphere.
zSamples - The new number of zSamples of the CompositeSphere.
radialSamples - The new number of radial samples of the CompositeSphere.
radius - The new radius of the CompositeSphere.
updateBuffers - If true, buffer information is updated as well.

getCenter

public Vector3f getCenter()
Returns the center of this CompositeSphere.

Returns:
The CompositeSphere's center.

setCenter

public void setCenter(Vector3f aCenter)
Sets the center of this CompositeSphere. Note that other information (such as geometry buffers and actual vertex information) is not changed. In most cases, you'll want to use setData()

Parameters:
aCenter - The new center.
See Also:
setData(com.jme.math.Vector3f, int, int, float, boolean)