Package com.jme3.scene.shape
Class PQTorus
java.lang.Object
com.jme3.scene.Mesh
com.jme3.scene.shape.PQTorus
- All Implemented Interfaces:
Savable,JmeCloneable,Cloneable
A parameterized torus, also known as a pq torus.
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatgetP()floatgetQ()intfloatintgetSteps()floatgetWidth()voidread(JmeImporter importer) voidupdateGeometry(float p, float q, float radius, float width, int steps, int radialSamples) Rebuilds this torus based on a new set of parameters.voidwrite(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
-
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.
-
-
Method Details
-
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
- Specified by:
readin interfaceSavable- Overrides:
readin classMesh- Throws:
IOException
-
write
- Specified by:
writein interfaceSavable- Overrides:
writein classMesh- Throws:
IOException
-