Package com.jme3.scene.shape
Class Sphere
java.lang.Object
com.jme3.scene.Mesh
com.jme3.scene.shape.Sphere
- All Implemented Interfaces:
- Savable,- JmeCloneable,- Cloneable
Sphere represents a 3D object with all points equidistant
 from a center point.- 
Nested Class SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanprotected intfloatthe distance from the center point each point falls onprotected Sphere.TextureModeprotected intprotected booleanprotected intprotected int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintfloatintvoidread(JmeImporter importer) voidsetTextureMode(Sphere.TextureMode textureMode) voidupdateGeometry(int zSamples, int radialSamples, float radius) Changes the information of the sphere into the given values.voidupdateGeometry(int zSamples, int radialSamples, float radius, boolean useEvenSlices, boolean interior) voidwrite(JmeExporter e) Methods inherited from class com.jme3.scene.MeshaddMorphTarget, clearBuffer, clearCollisionData, clone, cloneFields, cloneForAnim, collideWith, createCollisionData, deepClone, extractVertexData, generateBindPose, generateBindPose, getBound, getBuffer, getBufferList, getBuffers, getElementLengths, getFloatBuffer, getId, getIndexBuffer, getIndicesAsList, getInstanceCount, getLineWidth, getLodLevel, getMaxNumWeights, getMode, getModeStart, getMorphIndex, getMorphTarget, getMorphTargetNames, getMorphTargets, getNumLodLevels, getPatchVertexCount, getPointSize, getShortBuffer, getTriangle, getTriangle, getTriangle, getTriangleCount, getTriangleCount, getVertexCount, hasMorphTargets, isAnimated, isAnimatedByBone, isAnimatedByJoint, jmeClone, prepareForAnim, removeMorphTarget, removeMorphTarget, scaleTextureCoordinates, setBound, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setBuffer, setDynamic, setElementLengths, setId, setInterleaved, setLineWidth, setLodLevels, setMaxNumWeights, setMode, setModeStart, setPatchVertexCount, setStatic, setStreamed, updateBound, updateCounts
- 
Field Details- 
vertCountprotected int vertCount
- 
triCountprotected int triCount
- 
zSamplesprotected int zSamples
- 
radialSamplesprotected int radialSamples
- 
useEvenSlicesprotected boolean useEvenSlices
- 
interiorprotected boolean interior
- 
radiuspublic float radiusthe distance from the center point each point falls on
- 
textureMode
 
- 
- 
Constructor Details- 
Sphereprotected Sphere()Serialization only. Do not use.
- 
Spherepublic Sphere(int zSamples, int radialSamples, float radius) Constructs a sphere. All geometry data buffers are updated automatically. Both zSamples and radialSamples increase the quality of the generated sphere.- Parameters:
- zSamples- The number of samples along the Z.
- radialSamples- The number of samples along the radial.
- radius- The radius of the sphere.
 
- 
Spherepublic Sphere(int zSamples, int radialSamples, float radius, boolean useEvenSlices, boolean interior) Constructs a sphere. Additional arg to evenly space latitudinal slices- Parameters:
- zSamples- The number of samples along the Z.
- radialSamples- The number of samples along the radial.
- radius- The radius of the sphere.
- useEvenSlices- Slice sphere evenly along the Z axis
- interior- Not yet documented
 
 
- 
- 
Method Details- 
getRadialSamplespublic int getRadialSamples()
- 
getRadiuspublic float getRadius()
- 
getTextureMode- Returns:
- Returns the textureMode.
 
- 
getZSamplespublic int getZSamples()
- 
setTextureMode- Parameters:
- textureMode- The textureMode to set.
 
- 
updateGeometrypublic void updateGeometry(int zSamples, int radialSamples, float radius) Changes the information of the sphere into the given values.- Parameters:
- zSamples- the number of zSamples of the sphere.
- radialSamples- the number of radial samples of the sphere.
- radius- the radius of the sphere.
 
- 
updateGeometrypublic void updateGeometry(int zSamples, int radialSamples, float radius, boolean useEvenSlices, boolean interior) 
- 
read- Specified by:
- readin interface- Savable
- Overrides:
- readin class- Mesh
- Throws:
- IOException
 
- 
write- Specified by:
- writein interface- Savable
- Overrides:
- writein class- Mesh
- Throws:
- IOException
 
 
-