com.jme3.scene.shape
Class PQTorus
java.lang.Object
com.jme3.scene.Mesh
com.jme3.scene.shape.PQTorus
- All Implemented Interfaces:
- Savable, java.lang.Cloneable
public class PQTorus
- extends Mesh
A parameterized torus, also known as a pq torus.
Nested classes/interfaces inherited from class com.jme3.scene.Mesh |
Mesh.Mode |
Constructor Summary |
PQTorus()
|
PQTorus(float p,
float q,
float radius,
float width,
int steps,
int radialSamples)
Creates a parameterized 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 |
PQTorus
public PQTorus()
PQTorus
public PQTorus(float p,
float q,
float radius,
float width,
int steps,
int radialSamples)
- Creates a parameterized torus.
Steps and radialSamples are both degree of accuracy values.
- Parameters:
p
- the x/z oscillation.q
- the y oscillation.radius
- the radius of the PQTorus.width
- the width of the torus.steps
- the steps along the torus.radialSamples
- radial samples for the torus.
getP
public float getP()
getQ
public float getQ()
getRadialSamples
public int getRadialSamples()
getRadius
public float getRadius()
getSteps
public int getSteps()
getWidth
public float getWidth()
updateGeometry
public void updateGeometry(float p,
float q,
float radius,
float width,
int steps,
int radialSamples)
- Rebuilds this torus based on a new set of parameters.
- Parameters:
p
- the x/z oscillation.q
- the y oscillation.radius
- the radius of the PQTorus.width
- the width of the torus.steps
- the steps along the torus.radialSamples
- radial samples for the torus.
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
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