Class Axes3D

java.lang.Object
edu.cnu.mdi.mdi3D.item3D.Item3D
edu.cnu.mdi.mdi3D.item3D.Axes3D

public class Axes3D extends Item3D
A composite set of three Cartesian Axis3D children (x, y, and z), built from either explicit axis limits or a [xmin, xmax, ymin, ymax, zmin, zmax] array. Axes3D itself draws nothing; each child axis draws its own line, tick marks, and labels.
  • Constructor Details

    • Axes3D

      public Axes3D(Panel3D panel3D, float[] limits, String[] labels, Color color, float lineWidth, int numTicksX, int numTicksY, int numTicksZ, Color tickColor, Color textColor, Font font, int numDec)
      A set of Cartesian axes
      Parameters:
      panel3D - the owner 3D panel
      limits - the limits as [xmin, xmax, ymin, ymax, zmin, zmax]
      labels - axis labels as [xLabel, yLabel, zLabel]; may be null, or individual entries may be null, to use the default "x"/"y"/"z"
      color - the color
      lineWidth - the line width
      numTicksX - the number of ticks in x
      numTicksY - the number of major ticks in y
      numTicksZ - the number of major ticks in z
      tickColor - the color of the ticks
      textColor - color of axis labels
      font - the text font
      numDec - the number of decimals to display
      Throws:
      ArrayIndexOutOfBoundsException - if limits has fewer than 6 elements, or labels is non-null but has fewer than 3 elements
      NullPointerException - if limits is null
    • Axes3D

      public Axes3D(Panel3D panel3D, float[] limits, String[] labels, float zoff, Color color, float lineWidth, int numTicksX, int numTicksY, int numTicksZ, Color tickColor, Color textColor, Font font, int numDec)
      A set of Cartesian axes
      Parameters:
      panel3D - the owner 3D panel
      limits - the limits as [xmin, xmax, ymin, ymax, zmin, zmax]
      labels - axis labels as [xLabel, yLabel, zLabel]; may be null, or individual entries may be null, to use the default "x"/"y"/"z"
      zoff - a z offset
      color - the color
      lineWidth - the line width
      numTicksX - the number of ticks in x
      numTicksY - the number of major ticks in y
      numTicksZ - the number of major ticks in z
      tickColor - the color of the ticks
      textColor - color of axis labels
      font - the text font
      numDec - the number of decimals to display
      Throws:
      ArrayIndexOutOfBoundsException - if limits has fewer than 6 elements, or labels is non-null but has fewer than 3 elements
      NullPointerException - if limits is null
    • Axes3D

      public Axes3D(Panel3D panel3D, float xmin, float xmax, float ymin, float ymax, float zmin, float zmax, String[] labels, Color color, float lineWidth, int numTicksX, int numTicksY, int numTicksZ, Color tickColor, Color textColor, Font font, int numDec)
      A set of Cartesian axes
      Parameters:
      panel3D - the owner 3D panel
      xmin - the minimum value for x
      xmax - the maximum value for x
      ymin - the minimum value for y
      ymax - the maximum value for y
      zmin - the minimum value for z
      zmax - the maximum value for z
      labels - axis labels as [xLabel, yLabel, zLabel]; may be null, or individual entries may be null, to use the default "x"/"y"/"z"
      color - the color
      lineWidth - the line width
      numTicksX - the number of ticks in x
      numTicksY - the number of major ticks in y
      numTicksZ - the number of major ticks in z
      tickColor - the color of the ticks
      textColor - color of axis labels
      font - the text font
      numDec - the number of decimals to display
    • Axes3D

      public Axes3D(Panel3D panel3D, float xmin, float xmax, float ymin, float ymax, float zmin, float zmax, String[] labels, float zoff, Color color, float lineWidth, int numTicksX, int numTicksY, int numTicksZ, Color tickColor, Color textColor, Font font, int numDec)
      A set of Cartesian axes
      Parameters:
      panel3D - the owner 3D panel
      xmin - the minimum value for x
      xmax - the maximum value for x
      ymin - the minimum value for y
      ymax - the maximum value for y
      zmin - the minimum value for z
      zmax - the maximum value for z
      labels - axis labels as [xLabel, yLabel, zLabel]; may be null, or individual entries may be null, to use the default "x"/"y"/"z"
      zoff - a z offset
      color - the color
      lineWidth - the line width
      numTicksX - the number of ticks in x
      numTicksY - the number of major ticks in y
      numTicksZ - the number of major ticks in z
      tickColor - the color of the ticks
      textColor - color of axis labels
      font - the text font
      numDec - the number of decimals to display
  • Method Details

    • draw

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