|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Geometry
com.jme.scene.TriMesh
com.jme.scene.shape.Sphere
public class Sphere
Sphere
represents a 3D object with all points equidistance
from a center point.
Nested Class Summary | |
---|---|
static class |
Sphere.TextureMode
|
Nested classes/interfaces inherited from class com.jme.scene.TriMesh |
---|
TriMesh.Mode |
Nested classes/interfaces inherited from class com.jme.scene.Spatial |
---|
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode |
Field Summary | |
---|---|
Vector3f |
center
the center of the sphere |
protected int |
radialSamples
|
float |
radius
the distance from the center point each point falls on |
static int |
TEX_ORIGINAL
Deprecated. |
static int |
TEX_PROJECTED
Deprecated. |
protected Sphere.TextureMode |
textureMode
|
protected boolean |
useEvenSlices
|
protected int |
zSamples
|
Fields inherited from class com.jme.scene.TriMesh |
---|
indexBuffer, mode, triangleQuantity |
Fields inherited from class com.jme.scene.Geometry |
---|
binormalBuf, bound, castsShadows, colorBuf, compVect, defaultColor, displayListID, enabled, fogBuf, hasDirtyVertices, normBuf, states, tangentBuf, texBuf, vboInfo, vertBuf, vertQuantity |
Fields inherited from class com.jme.scene.Spatial |
---|
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
Constructor Summary | |
---|---|
Sphere()
|
|
Sphere(java.lang.String name)
Constructs a sphere. |
|
Sphere(java.lang.String name,
int zSamples,
int radialSamples,
float radius)
Constructs a sphere with center at the origin. |
|
Sphere(java.lang.String name,
Vector3f center,
int zSamples,
int radialSamples,
float radius)
Constructs a sphere. |
|
Sphere(java.lang.String name,
Vector3f center,
int zSamples,
int radialSamples,
float radius,
boolean useEvenSlices)
Constructs a sphere. |
Method Summary | |
---|---|
Vector3f |
getCenter()
Returns the center of this sphere. |
int |
getRadialSamples()
|
float |
getRadius()
|
Sphere.TextureMode |
getTextureMode()
|
int |
getZSamples()
|
void |
read(JMEImporter e)
|
void |
setCenter(Vector3f aCenter)
Deprecated. Use updateGeometry(Vector3f,int,int,float) instead |
void |
setData(Vector3f center,
int zSamples,
int radialSamples,
float radius)
Deprecated. Use updateGeometry(Vector3f,int,int,float) instead |
void |
setTextureMode(int textureMode)
Deprecated. |
void |
setTextureMode(Sphere.TextureMode textureMode)
|
void |
updateGeometry(Vector3f center,
int zSamples,
int radialSamples,
float radius)
Changes the information of the sphere into the given values. |
void |
updateGeometry(Vector3f center,
int zSamples,
int radialSamples,
float radius,
boolean useEvenSlices)
|
void |
write(JMEExporter e)
|
Methods inherited from class com.jme.scene.TriMesh |
---|
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, getVertIndex, hasCollision, hasTriangleCollision, randomPointOnTriangles, recalcTriangleQuantity, reconstruct, setIndexBuffer, setMode, setTriangleQuantity |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jme.util.export.Savable |
---|
getClassTag |
Field Detail |
---|
@Deprecated public static final int TEX_ORIGINAL
@Deprecated public static final int TEX_PROJECTED
protected int zSamples
protected int radialSamples
protected boolean useEvenSlices
public float radius
public Vector3f center
protected Sphere.TextureMode textureMode
Constructor Detail |
---|
public Sphere()
public Sphere(java.lang.String name)
name
- The name of the sphere.public Sphere(java.lang.String name, int zSamples, int radialSamples, float radius)
name
- Name of sphere.zSamples
- The samples along the Z.radialSamples
- The samples along the radial.radius
- Radius of the sphere.Sphere(java.lang.String, com.jme.math.Vector3f, int, int, float)
public Sphere(java.lang.String name, Vector3f center, int zSamples, int radialSamples, float radius)
name
- Name of the sphere.center
- Center of the sphere.zSamples
- The number of samples along the Z.radialSamples
- The number of samples along the radial.radius
- The radius of the sphere.public Sphere(java.lang.String name, Vector3f center, int zSamples, int radialSamples, float radius, boolean useEvenSlices)
name
- Name of the sphere.center
- Center of the sphere.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 axisMethod Detail |
---|
public Vector3f getCenter()
public int getRadialSamples()
public float getRadius()
public Sphere.TextureMode getTextureMode()
public int getZSamples()
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
read
in class TriMesh
java.io.IOException
public void setCenter(Vector3f aCenter)
updateGeometry(Vector3f,int,int,float)
instead
public void setData(Vector3f center, int zSamples, int radialSamples, float radius)
updateGeometry(Vector3f,int,int,float)
instead
@Deprecated public void setTextureMode(int textureMode)
textureMode
- The textureMode to set.public void setTextureMode(Sphere.TextureMode textureMode)
textureMode
- The textureMode to set.public void updateGeometry(Vector3f center, int zSamples, int radialSamples, float radius)
center
- the center of the sphere.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(Vector3f center, int zSamples, int radialSamples, float radius, boolean useEvenSlices)
public void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
write
in class TriMesh
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |