Class PQTorus

java.lang.Object
com.jme3.scene.Mesh
com.jme3.scene.shape.PQTorus
All Implemented Interfaces:
Savable, JmeCloneable, Cloneable

public class PQTorus extends Mesh
A parameterized torus, also known as a pq torus.
  • 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

      public void read(JmeImporter importer) throws IOException
      Specified by:
      read in interface Savable
      Overrides:
      read in class Mesh
      Throws:
      IOException
    • write

      public void write(JmeExporter e) throws IOException
      Specified by:
      write in interface Savable
      Overrides:
      write in class Mesh
      Throws:
      IOException