Class Dome

All Implemented Interfaces:
Pickable, Hintable, Renderable, Savable

public class Dome extends Mesh
A half sphere.
  • Constructor Details

    • Dome

      public Dome()
    • Dome

      public Dome(String name)
      Constructs a dome. By default the dome has not geometry data or center.
      Parameters:
      name - The name of the dome.
    • Dome

      public Dome(String name, int planes, int radialSamples, double radius)
      Constructs a dome with center at the origin. For details, see the other constructor.
      Parameters:
      name - Name of dome.
      planes - The number of planes along the Z-axis.
      radialSamples - The samples along the radial.
      radius - Radius of the dome.
      See Also:
    • Dome

      public Dome(String name, Vector3 center, int planes, int radialSamples, double radius)
      Constructs a dome. All geometry data buffers are updated automatically. Both planes and radialSamples increase the quality of the generated dome.
      Parameters:
      name - Name of the dome.
      center - Center of the dome.
      planes - The number of planes along the Z-axis.
      radialSamples - The number of samples along the radial.
      radius - The radius of the dome.
    • Dome

      public Dome(String name, Vector3 center, int planes, int radialSamples, double radius, boolean outsideView)
      Constructs a dome. All geometry data buffers are updated automatically. Both planes and radialSamples increase the quality of the generated dome.
      Parameters:
      name - Name of the dome.
      center - Center of the dome.
      planes - The number of planes along the Z-axis.
      radialSamples - The number of samples along the radial.
      radius - The radius of the dome.
      outsideView - If true, the triangles will be connected for a view outside of the dome.
  • Method Details

    • setData

      public void setData(Vector3 center, int planes, int radialSamples, double radius, boolean updateBuffers, boolean outsideView)
      Changes the information of the dome into the given values. The boolean at the end signals if buffer data should be updated as well. If the dome is to be rendered, then that value should be true.
      Parameters:
      center - The new center of the dome.
      planes - The number of planes along the Z-axis.
      radialSamples - The new number of radial samples of the dome.
      radius - The new radius of the dome.
      updateBuffers - If true, buffer information is updated as well.
      outsideView - If true, the triangles will be connected for a view outside of the dome.
    • getPlanes

      public int getPlanes()
    • getRadialSamples

      public int getRadialSamples()
    • getRadius

      public double getRadius()
    • write

      public void write(OutputCapsule capsule) throws IOException
      Specified by:
      write in interface Savable
      Overrides:
      write in class Mesh
      Parameters:
      capsule - the capsule
      Throws:
      IOException - Signals that an I/O exception has occurred.
      See Also:
    • read

      public void read(InputCapsule capsule) throws IOException
      Specified by:
      read in interface Savable
      Overrides:
      read in class Mesh
      Parameters:
      capsule - the input capsule
      Throws:
      IOException - Signals that an I/O exception has occurred.
      See Also: