Class Disk

All Implemented Interfaces:
Pickable, Hintable, Renderable, Savable

public class Disk extends Mesh
An approximations of a flat circle. It is simply defined with a radius. It starts out flat along the Z, with center at the origin.
  • Field Details

    • _shellSamples

      protected int _shellSamples
    • _radialSamples

      protected int _radialSamples
    • _radius

      protected double _radius
    • _innerRadius

      protected double _innerRadius
  • Constructor Details

    • Disk

      public Disk()
    • Disk

      public Disk(String name, int shellSamples, int radialSamples, double radius)
      Creates a flat disk (circle) at the origin flat along the Z. Usually, a higher sample number creates a better looking cylinder, but at the cost of more vertex information.
      Parameters:
      name - The name of the disk.
      shellSamples - The number of shell samples.
      radialSamples - The number of radial samples.
      radius - The radius of the disk.
    • Disk

      public Disk(String name, int shellSamples, int radialSamples, double radius, double innerRadius)
      Creates a flat disk (circle) at the origin flat along the Z. Usually, a higher sample number creates a better looking cylinder, but at the cost of more vertex information.
      Parameters:
      name - The name of the disk.
      shellSamples - The number of shell samples.
      radialSamples - The number of radial samples.
      radius - The radius of the disk.
      innerRadius - The inner radius of the disk. If greater than 0, the center of the disk has a hole of this size.
  • Method Details