Class Axis3D


public class Axis3D extends Line3D
A single Cartesian axis: a Line3D from vmin to vmax along one of the Axis3D.AxisType directions, with major tick marks (added as Line3D children) and a lazily-created TextRenderer for the axis label and per-tick value labels.
  • Constructor Details

    • Axis3D

      public Axis3D(Panel3D panel3D, Axis3D.AxisType type, String label, float vmin, float vmax, Color color, float lineWidth, int numTicks, Color tickColor, Color textColor, Font font, int numDec)
      Create a coordinate axis
      Parameters:
      panel3D - the owner 3D panel
      type - the type
      label - axis label; if null, defaults to "x"/"y"/"z" based on type
      vmin - the minimum value
      vmax - the maximum value
      color - the color of the axes
      lineWidth - the line width
      numTicks - the number of ticks
      tickColor - the color of the ticks
      textColor - the text color
      font - the text font
      numDec - the number of decimals to display
    • Axis3D

      public Axis3D(Panel3D panel3D, Axis3D.AxisType type, String label, float vmin, float vmax, float offset, Color color, float lineWidth, int numTicks, Color tickColor, Color textColor, Font font, int numDec)
      Create a coordinate axis
      Parameters:
      panel3D - the owner 3D panel
      type - the type
      label - axis label; if null, defaults to "x"/"y"/"z" based on type
      vmin - the minimum value
      vmax - the maximum value
      offset - value added to each tick label (does not affect drawn geometry)
      color - the color of the axes
      lineWidth - the line width
      numTicks - the number of ticks
      tickColor - the color of the ticks
      textColor - the text color
      font - the text font
      numDec - the number of decimals to display
  • Method Details

    • dispose

      protected void dispose(com.jogamp.opengl.GLAutoDrawable drawable)
      Releases the lazily-created tick-label TextRenderer and its GPU texture atlas.
      Overrides:
      dispose in class Item3D
      Parameters:
      drawable - the OpenGL drawable being disposed
    • draw

      public void draw(com.jogamp.opengl.GLAutoDrawable drawable)
      Description copied from class: Item3D
      The custom drawing method
      Overrides:
      draw in class Line3D
      Parameters:
      drawable - the OpenGL drawable
    • getType

      public Axis3D.AxisType getType()
      Get the type of axis
      Returns:
      the type of axis