com.jme3.scene.shape
Class Torus
java.lang.Object
com.jme3.scene.Mesh
com.jme3.scene.shape.Torus
- All Implemented Interfaces:
- Savable, java.lang.Cloneable
public class Torus
- extends Mesh
An ordinary (single holed) torus.
The center is by default the origin.
Nested classes/interfaces inherited from class com.jme3.scene.Mesh |
Mesh.Mode |
Constructor Summary |
Torus()
|
Torus(int circleSamples,
int radialSamples,
float innerRadius,
float outerRadius)
Constructs a new Torus. |
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 |
Torus
public Torus()
Torus
public Torus(int circleSamples,
int radialSamples,
float innerRadius,
float outerRadius)
- Constructs a new Torus. Center is the origin, but the Torus may be
transformed.
- Parameters:
circleSamples
- The number of samples along the circles.radialSamples
- The number of samples along the radial.innerRadius
- The radius of the inner begining of the Torus.outerRadius
- The radius of the outter end of the Torus.
getCircleSamples
public int getCircleSamples()
getInnerRadius
public float getInnerRadius()
getOuterRadius
public float getOuterRadius()
getRadialSamples
public int getRadialSamples()
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
updateGeometry
public void updateGeometry(int circleSamples,
int radialSamples,
float innerRadius,
float outerRadius)
- Rebuilds this torus based on a new set of parameters.
- Parameters:
circleSamples
- the number of samples along the circles.radialSamples
- the number of samples along the radial.innerRadius
- the radius of the inner begining of the Torus.outerRadius
- the radius of the outter end of the Torus.
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