Package com.jme3.scene.shape
Class Torus
java.lang.Object
com.jme3.scene.Mesh
com.jme3.scene.shape.Torus
- All Implemented Interfaces:
Savable
,JmeCloneable
,Cloneable
An ordinary (single holed) torus.
The center is by default the origin.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
float
float
int
void
read
(JmeImporter importer) void
updateGeometry
(int circleSamples, int radialSamples, float innerRadius, float outerRadius) Rebuilds this torus based on a new set of parameters.void
write
(JmeExporter e) Methods inherited from class com.jme3.scene.Mesh
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, setStatic, setStreamed, updateBound, updateCounts
-
Constructor Details
-
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
- minor radius of the torusouterRadius
- major radius of the torus
-
-
Method Details
-
getCircleSamples
public int getCircleSamples() -
getInnerRadius
public float getInnerRadius() -
getOuterRadius
public float getOuterRadius() -
getRadialSamples
public int getRadialSamples() -
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classMesh
- Throws:
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
- minor radius of the torusouterRadius
- major radius of the torus
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classMesh
- Throws:
IOException
-