Class ShapeTools

java.lang.Object
com.github.tommyettinger.digital.ShapeTools

public final class ShapeTools extends Object
Static data for the 3D platonic solids. These are provided for the polyhedra with edge length 1, and for scaled versions of those polyhedra where each vertex has distance 1 from the center (the origin); both float and double arrays are here.
  • Field Details

    • TETRAHEDRON_VERTICES

      public static final float[][] TETRAHEDRON_VERTICES
      The vertices of a tetrahedron with unitary edge length, as float[3] items representing points.
    • TETRAHEDRON_VERTICES_D

      public static final double[][] TETRAHEDRON_VERTICES_D
      The vertices of a tetrahedron with unitary edge length, as double[3] items representing points.
    • TETRAHEDRON_FACES

      public static final int[][] TETRAHEDRON_FACES
      The faces of a tetrahedron, as int[3] items representing indices into TETRAHEDRON_VERTICES.
    • CUBE_VERTICES

      public static final float[][] CUBE_VERTICES
      The vertices of a cube with unitary edge length, as float[3] items representing points.
    • CUBE_VERTICES_D

      public static final double[][] CUBE_VERTICES_D
      The vertices of a cube with unitary edge length, as double[3] items representing points.
    • CUBE_FACES

      public static final int[][] CUBE_FACES
      The faces of a cube, as int[4] items representing indices into CUBE_VERTICES.
    • OCTAHEDRON_VERTICES

      public static final float[][] OCTAHEDRON_VERTICES
      The vertices of an octahedron with unitary edge length, as float[3] items representing points.
    • OCTAHEDRON_VERTICES_D

      public static final double[][] OCTAHEDRON_VERTICES_D
      The vertices of an octahedron with unitary edge length, as double[3] items representing points.
    • OCTAHEDRON_FACES

      public static final int[][] OCTAHEDRON_FACES
      The faces of an octahedron, as int[3] items representing indices into OCTAHEDRON_VERTICES.
    • DODECAHEDRON_VERTICES

      public static final float[][] DODECAHEDRON_VERTICES
      The vertices of a dodecahedron with unitary edge length, as float[3] items representing points.
    • DODECAHEDRON_VERTICES_D

      public static final double[][] DODECAHEDRON_VERTICES_D
      The vertices of a dodecahedron with unitary edge length, as double[3] items representing points.
    • DODECAHEDRON_FACES

      public static final int[][] DODECAHEDRON_FACES
      The faces of a dodecahedron, as int[5] items representing indices into DODECAHEDRON_VERTICES.
    • ICOSAHEDRON_VERTICES

      public static final float[][] ICOSAHEDRON_VERTICES
      The vertices of an icosahedron with unitary edge length, as float[3] items representing points. These points are specially organized so that ICOSAHEDRON_VERTICES[i] will always contain the opposite point of ICOSAHEDRON_VERTICES[i ^ 1] (such as with the North Pole and South Pole).
    • ICOSAHEDRON_VERTICES_D

      public static final double[][] ICOSAHEDRON_VERTICES_D
      The vertices of an icosahedron with unitary edge length, as double[3] items representing points. These points are specially organized so that ICOSAHEDRON_VERTICES_D[i] will always contain the opposite point of ICOSAHEDRON_VERTICES_D[i ^ 1] (such as with the North Pole and South Pole).
    • ICOSAHEDRON_FACES

      public static final int[][] ICOSAHEDRON_FACES
      The faces of an icosahedron, as int[3] items representing indices into ICOSAHEDRON_VERTICES. These faces are specially organized so that ICOSAHEDRON_FACES[i] will always contain the opposite face of ICOSAHEDRON_FACES[i ^ 1].
    • UNIT_TETRAHEDRON_VERTICES

      public static final float[][] UNIT_TETRAHEDRON_VERTICES
      A variant on TETRAHEDRON_VERTICES that has each vertex at distance 1 from the origin.
    • UNIT_TETRAHEDRON_VERTICES_D

      public static final double[][] UNIT_TETRAHEDRON_VERTICES_D
      A variant on TETRAHEDRON_VERTICES_D that has each vertex at distance 1 from the origin.
    • UNIT_CUBE_VERTICES

      public static final float[][] UNIT_CUBE_VERTICES
      A variant on CUBE_VERTICES that has each vertex at distance 1 from the origin.
    • UNIT_CUBE_VERTICES_D

      public static final double[][] UNIT_CUBE_VERTICES_D
      A variant on CUBE_VERTICES_D that has each vertex at distance 1 from the origin.
    • UNIT_OCTAHEDRON_VERTICES

      public static final float[][] UNIT_OCTAHEDRON_VERTICES
      A variant on OCTAHEDRON_VERTICES that has each vertex at distance 1 from the origin.
    • UNIT_OCTAHEDRON_VERTICES_D

      public static final double[][] UNIT_OCTAHEDRON_VERTICES_D
      A variant on OCTAHEDRON_VERTICES_D that has each vertex at distance 1 from the origin.
    • UNIT_DODECAHEDRON_VERTICES

      public static final float[][] UNIT_DODECAHEDRON_VERTICES
      A variant on DODECAHEDRON_VERTICES that has each vertex at distance 1 from the origin.
    • UNIT_DODECAHEDRON_VERTICES_D

      public static final double[][] UNIT_DODECAHEDRON_VERTICES_D
      A variant on DODECAHEDRON_VERTICES_D that has each vertex at distance 1 from the origin.
    • UNIT_ICOSAHEDRON_VERTICES

      public static final float[][] UNIT_ICOSAHEDRON_VERTICES
      A variant on ICOSAHEDRON_VERTICES that has each vertex at distance 1 from the origin.
    • UNIT_ICOSAHEDRON_VERTICES_D

      public static final double[][] UNIT_ICOSAHEDRON_VERTICES_D
      A variant on ICOSAHEDRON_VERTICES_D that has each vertex at distance 1 from the origin.