Package com.github.tommyettinger.digital
Class ShapeTools
java.lang.Object
com.github.tommyettinger.digital.ShapeTools
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final int[][]
The faces of a cube, as int[4] items representing indices intoCUBE_VERTICES
.static final float[][]
The vertices of a cube with unitary edge length, as float[3] items representing points.static final double[][]
The vertices of a cube with unitary edge length, as double[3] items representing points.static final int[][]
The faces of a dodecahedron, as int[5] items representing indices intoDODECAHEDRON_VERTICES
.static final float[][]
The vertices of a dodecahedron with unitary edge length, as float[3] items representing points.static final double[][]
The vertices of a dodecahedron with unitary edge length, as double[3] items representing points.static final int[][]
The faces of an icosahedron, as int[3] items representing indices intoICOSAHEDRON_VERTICES
.static final float[][]
The vertices of an icosahedron with unitary edge length, as float[3] items representing points.static final double[][]
The vertices of an icosahedron with unitary edge length, as double[3] items representing points.static final int[][]
The faces of an octahedron, as int[3] items representing indices intoOCTAHEDRON_VERTICES
.static final float[][]
The vertices of an octahedron with unitary edge length, as float[3] items representing points.static final double[][]
The vertices of an octahedron with unitary edge length, as double[3] items representing points.static final int[][]
The faces of a tetrahedron, as int[3] items representing indices intoTETRAHEDRON_VERTICES
.static final float[][]
The vertices of a tetrahedron with unitary edge length, as float[3] items representing points.static final double[][]
The vertices of a tetrahedron with unitary edge length, as double[3] items representing points.static final float[][]
A variant onCUBE_VERTICES
that has each vertex at distance 1 from the origin.static final double[][]
A variant onCUBE_VERTICES_D
that has each vertex at distance 1 from the origin.static final float[][]
A variant onDODECAHEDRON_VERTICES
that has each vertex at distance 1 from the origin.static final double[][]
A variant onDODECAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin.static final float[][]
A variant onICOSAHEDRON_VERTICES
that has each vertex at distance 1 from the origin.static final double[][]
A variant onICOSAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin.static final float[][]
A variant onOCTAHEDRON_VERTICES
that has each vertex at distance 1 from the origin.static final double[][]
A variant onOCTAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin.static final float[][]
A variant onTETRAHEDRON_VERTICES
that has each vertex at distance 1 from the origin.static final double[][]
A variant onTETRAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin. -
Method Summary
-
Field Details
-
TETRAHEDRON_VERTICES
public static final float[][] TETRAHEDRON_VERTICESThe vertices of a tetrahedron with unitary edge length, as float[3] items representing points. -
TETRAHEDRON_VERTICES_D
public static final double[][] TETRAHEDRON_VERTICES_DThe vertices of a tetrahedron with unitary edge length, as double[3] items representing points. -
TETRAHEDRON_FACES
public static final int[][] TETRAHEDRON_FACESThe faces of a tetrahedron, as int[3] items representing indices intoTETRAHEDRON_VERTICES
. -
CUBE_VERTICES
public static final float[][] CUBE_VERTICESThe vertices of a cube with unitary edge length, as float[3] items representing points. -
CUBE_VERTICES_D
public static final double[][] CUBE_VERTICES_DThe vertices of a cube with unitary edge length, as double[3] items representing points. -
CUBE_FACES
public static final int[][] CUBE_FACESThe faces of a cube, as int[4] items representing indices intoCUBE_VERTICES
. -
OCTAHEDRON_VERTICES
public static final float[][] OCTAHEDRON_VERTICESThe vertices of an octahedron with unitary edge length, as float[3] items representing points. -
OCTAHEDRON_VERTICES_D
public static final double[][] OCTAHEDRON_VERTICES_DThe vertices of an octahedron with unitary edge length, as double[3] items representing points. -
OCTAHEDRON_FACES
public static final int[][] OCTAHEDRON_FACESThe faces of an octahedron, as int[3] items representing indices intoOCTAHEDRON_VERTICES
. -
DODECAHEDRON_VERTICES
public static final float[][] DODECAHEDRON_VERTICESThe vertices of a dodecahedron with unitary edge length, as float[3] items representing points. -
DODECAHEDRON_VERTICES_D
public static final double[][] DODECAHEDRON_VERTICES_DThe vertices of a dodecahedron with unitary edge length, as double[3] items representing points. -
DODECAHEDRON_FACES
public static final int[][] DODECAHEDRON_FACESThe faces of a dodecahedron, as int[5] items representing indices intoDODECAHEDRON_VERTICES
. -
ICOSAHEDRON_VERTICES
public static final float[][] ICOSAHEDRON_VERTICESThe vertices of an icosahedron with unitary edge length, as float[3] items representing points. These points are specially organized so thatICOSAHEDRON_VERTICES[i]
will always contain the opposite point ofICOSAHEDRON_VERTICES[i ^ 1]
(such as with the North Pole and South Pole). -
ICOSAHEDRON_VERTICES_D
public static final double[][] ICOSAHEDRON_VERTICES_DThe vertices of an icosahedron with unitary edge length, as double[3] items representing points. These points are specially organized so thatICOSAHEDRON_VERTICES_D[i]
will always contain the opposite point ofICOSAHEDRON_VERTICES_D[i ^ 1]
(such as with the North Pole and South Pole). -
ICOSAHEDRON_FACES
public static final int[][] ICOSAHEDRON_FACESThe faces of an icosahedron, as int[3] items representing indices intoICOSAHEDRON_VERTICES
. These faces are specially organized so thatICOSAHEDRON_FACES[i]
will always contain the opposite face ofICOSAHEDRON_FACES[i ^ 1]
. -
UNIT_TETRAHEDRON_VERTICES
public static final float[][] UNIT_TETRAHEDRON_VERTICESA variant onTETRAHEDRON_VERTICES
that has each vertex at distance 1 from the origin. -
UNIT_TETRAHEDRON_VERTICES_D
public static final double[][] UNIT_TETRAHEDRON_VERTICES_DA variant onTETRAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin. -
UNIT_CUBE_VERTICES
public static final float[][] UNIT_CUBE_VERTICESA variant onCUBE_VERTICES
that has each vertex at distance 1 from the origin. -
UNIT_CUBE_VERTICES_D
public static final double[][] UNIT_CUBE_VERTICES_DA variant onCUBE_VERTICES_D
that has each vertex at distance 1 from the origin. -
UNIT_OCTAHEDRON_VERTICES
public static final float[][] UNIT_OCTAHEDRON_VERTICESA variant onOCTAHEDRON_VERTICES
that has each vertex at distance 1 from the origin. -
UNIT_OCTAHEDRON_VERTICES_D
public static final double[][] UNIT_OCTAHEDRON_VERTICES_DA variant onOCTAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin. -
UNIT_DODECAHEDRON_VERTICES
public static final float[][] UNIT_DODECAHEDRON_VERTICESA variant onDODECAHEDRON_VERTICES
that has each vertex at distance 1 from the origin. -
UNIT_DODECAHEDRON_VERTICES_D
public static final double[][] UNIT_DODECAHEDRON_VERTICES_DA variant onDODECAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin. -
UNIT_ICOSAHEDRON_VERTICES
public static final float[][] UNIT_ICOSAHEDRON_VERTICESA variant onICOSAHEDRON_VERTICES
that has each vertex at distance 1 from the origin. -
UNIT_ICOSAHEDRON_VERTICES_D
public static final double[][] UNIT_ICOSAHEDRON_VERTICES_DA variant onICOSAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin.
-