public class Sphere extends Mesh
Sphere
represents a 3D object with all points equidistant
from a center point.Modifier and Type | Class and Description |
---|---|
static class |
Sphere.TextureMode |
Modifier and Type | Field and Description |
---|---|
protected boolean |
interior |
protected int |
radialSamples |
float |
radius
the distance from the center point each point falls on
|
protected Sphere.TextureMode |
textureMode |
protected int |
triCount |
protected boolean |
useEvenSlices |
protected int |
vertCount |
protected int |
zSamples |
Modifier | Constructor and Description |
---|---|
protected |
Sphere()
Serialization only.
|
|
Sphere(int zSamples,
int radialSamples,
float radius)
Constructs a sphere.
|
|
Sphere(int zSamples,
int radialSamples,
float radius,
boolean useEvenSlices,
boolean interior)
Constructs a sphere.
|
Modifier and Type | Method and Description |
---|---|
int |
getRadialSamples() |
float |
getRadius() |
Sphere.TextureMode |
getTextureMode() |
int |
getZSamples() |
void |
read(JmeImporter e) |
void |
setTextureMode(Sphere.TextureMode textureMode) |
void |
updateGeometry(int zSamples,
int radialSamples,
float radius)
Changes the information of the sphere into the given values.
|
void |
updateGeometry(int zSamples,
int radialSamples,
float radius,
boolean useEvenSlices,
boolean interior) |
void |
write(JmeExporter e) |
addMorphTarget, 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, setPointSize, setStatic, setStreamed, updateBound, updateCounts
protected int vertCount
protected int triCount
protected int zSamples
protected int radialSamples
protected boolean useEvenSlices
protected boolean interior
public float radius
protected Sphere.TextureMode textureMode
protected Sphere()
public Sphere(int zSamples, int radialSamples, float radius)
zSamples
- The number of samples along the Z.radialSamples
- The number of samples along the radial.radius
- The radius of the sphere.public Sphere(int zSamples, int radialSamples, float radius, boolean useEvenSlices, boolean interior)
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 axisinterior
- Not yet documentedpublic int getRadialSamples()
public float getRadius()
public Sphere.TextureMode getTextureMode()
public int getZSamples()
public void setTextureMode(Sphere.TextureMode textureMode)
textureMode
- The textureMode to set.public void updateGeometry(int zSamples, int radialSamples, float radius)
zSamples
- the number of zSamples of the sphere.radialSamples
- the number of radial samples of the sphere.radius
- the radius of the sphere.public void updateGeometry(int zSamples, int radialSamples, float radius, boolean useEvenSlices, boolean interior)
public void read(JmeImporter e) throws java.io.IOException
public void write(JmeExporter e) throws java.io.IOException