public final class ShapeTools
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static short[][] |
CUBE_FACES
The faces of a cube, as short[4] items representing indices into
CUBE_VERTICES . |
static float[][] |
CUBE_VERTICES
The vertices of a cube with unitary edge length, as float[3] items representing points.
|
static double[][] |
CUBE_VERTICES_D
The vertices of a cube with unitary edge length, as double[3] items representing points.
|
static short[][] |
DODECAHEDRON_FACES
The faces of a dodecahedron, as short[5] items representing indices into
DODECAHEDRON_VERTICES . |
static float[][] |
DODECAHEDRON_VERTICES
The vertices of a dodecahedron with unitary edge length, as float[3] items representing points.
|
static double[][] |
DODECAHEDRON_VERTICES_D
The vertices of a dodecahedron with unitary edge length, as double[3] items representing points.
|
static float |
GOLDEN_RATIO
The famous golden ratio,
(1.0 + Math.sqrt(5.0)) * 0.5 ; this is the "most irrational" of irrational
numbers, and has various useful properties. |
static double |
GOLDEN_RATIO_D
The famous golden ratio,
(1.0 + Math.sqrt(5.0)) * 0.5 , as a double; this is the "most irrational" of
irrational numbers, and has various useful properties. |
static short[][] |
ICOSAHEDRON_FACES
The faces of an icosahedron, as short[3] items representing indices into
ICOSAHEDRON_VERTICES . |
static float[][] |
ICOSAHEDRON_VERTICES
The vertices of an icosahedron with unitary edge length, as float[3] items representing points.
|
static double[][] |
ICOSAHEDRON_VERTICES_D
The vertices of an icosahedron with unitary edge length, as double[3] items representing points.
|
static short[][] |
OCTAHEDRON_FACES
The faces of an octahedron, as short[3] items representing indices into
OCTAHEDRON_VERTICES . |
static float[][] |
OCTAHEDRON_VERTICES
The vertices of an octahedron with unitary edge length, as float[3] items representing points.
|
static double[][] |
OCTAHEDRON_VERTICES_D
The vertices of an octahedron with unitary edge length, as double[3] items representing points.
|
static float |
ROOT2
The
float value that is closer than any other to
Math.sqrt(2.0) , the ratio of the hypotenuse of an
isosceles right triangle to one of its legs. |
static double |
ROOT2_D
The
double value that is closer than any other to
Math.sqrt(2.0) , the ratio of the hypotenuse of an
isosceles right triangle to one of its legs. |
static float |
ROOT2_INVERSE
The
float value that is closer than any other to
1.0 / Math.sqrt(2.0) , the inverse of the square
root of 2. |
static double |
ROOT2_INVERSE_D
The
double value that is closer than any other to
1.0 / Math.sqrt(2.0) , the inverse of the square
root of 2. |
static short[][] |
TETRAHEDRON_FACES
The faces of a tetrahedron, as short[3] items representing indices into
TETRAHEDRON_VERTICES . |
static float[][] |
TETRAHEDRON_VERTICES
The vertices of a tetrahedron with unitary edge length, as float[3] items representing points.
|
static double[][] |
TETRAHEDRON_VERTICES_D
The vertices of a tetrahedron with unitary edge length, as double[3] items representing points.
|
static float[][] |
UNIT_CUBE_VERTICES
A variant on
CUBE_VERTICES that has each vertex at distance 1 from the origin. |
static double[][] |
UNIT_CUBE_VERTICES_D
A variant on
CUBE_VERTICES_D that has each vertex at distance 1 from the origin. |
static float[][] |
UNIT_DODECAHEDRON_VERTICES
A variant on
DODECAHEDRON_VERTICES that has each vertex at distance 1 from the origin. |
static double[][] |
UNIT_DODECAHEDRON_VERTICES_D
A variant on
DODECAHEDRON_VERTICES_D that has each vertex at distance 1 from the origin. |
static float[][] |
UNIT_ICOSAHEDRON_VERTICES
A variant on
ICOSAHEDRON_VERTICES that has each vertex at distance 1 from the origin. |
static double[][] |
UNIT_ICOSAHEDRON_VERTICES_D
A variant on
ICOSAHEDRON_VERTICES_D that has each vertex at distance 1 from the origin. |
static float[][] |
UNIT_OCTAHEDRON_VERTICES
A variant on
OCTAHEDRON_VERTICES that has each vertex at distance 1 from the origin. |
static double[][] |
UNIT_OCTAHEDRON_VERTICES_D
A variant on
OCTAHEDRON_VERTICES_D that has each vertex at distance 1 from the origin. |
static float[][] |
UNIT_TETRAHEDRON_VERTICES
A variant on
TETRAHEDRON_VERTICES that has each vertex at distance 1 from the origin. |
static double[][] |
UNIT_TETRAHEDRON_VERTICES_D
A variant on
TETRAHEDRON_VERTICES_D that has each vertex at distance 1 from the origin. |
public static final float ROOT2
float
value that is closer than any other to
Math.sqrt(2.0)
, the ratio of the hypotenuse of an
isosceles right triangle to one of its legs.public static final double ROOT2_D
double
value that is closer than any other to
Math.sqrt(2.0)
, the ratio of the hypotenuse of an
isosceles right triangle to one of its legs.public static final float ROOT2_INVERSE
float
value that is closer than any other to
1.0 / Math.sqrt(2.0)
, the inverse of the square
root of 2.public static final double ROOT2_INVERSE_D
double
value that is closer than any other to
1.0 / Math.sqrt(2.0)
, the inverse of the square
root of 2.public static final float GOLDEN_RATIO
(1.0 + Math.sqrt(5.0)) * 0.5
; this is the "most irrational" of irrational
numbers, and has various useful properties.public static final double GOLDEN_RATIO_D
(1.0 + Math.sqrt(5.0)) * 0.5
, as a double; this is the "most irrational" of
irrational numbers, and has various useful properties.public static final float[][] TETRAHEDRON_VERTICES
public static final double[][] TETRAHEDRON_VERTICES_D
public static final short[][] TETRAHEDRON_FACES
TETRAHEDRON_VERTICES
.public static final float[][] CUBE_VERTICES
public static final double[][] CUBE_VERTICES_D
public static final short[][] CUBE_FACES
CUBE_VERTICES
.public static final float[][] OCTAHEDRON_VERTICES
public static final double[][] OCTAHEDRON_VERTICES_D
public static final short[][] OCTAHEDRON_FACES
OCTAHEDRON_VERTICES
.public static final float[][] DODECAHEDRON_VERTICES
public static final double[][] DODECAHEDRON_VERTICES_D
public static final short[][] DODECAHEDRON_FACES
DODECAHEDRON_VERTICES
.public static final float[][] ICOSAHEDRON_VERTICES
ICOSAHEDRON_VERTICES[i]
will always contain the opposite
point of ICOSAHEDRON_VERTICES[i ^ 1]
(such as with the North Pole and South Pole).public static final double[][] ICOSAHEDRON_VERTICES_D
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).public static final short[][] ICOSAHEDRON_FACES
ICOSAHEDRON_VERTICES
.
These faces are specially organized so that ICOSAHEDRON_FACES[i]
will always contain the opposite face
of ICOSAHEDRON_FACES[i ^ 1]
.public static final float[][] UNIT_TETRAHEDRON_VERTICES
TETRAHEDRON_VERTICES
that has each vertex at distance 1 from the origin.public static final double[][] UNIT_TETRAHEDRON_VERTICES_D
TETRAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin.public static final float[][] UNIT_CUBE_VERTICES
CUBE_VERTICES
that has each vertex at distance 1 from the origin.public static final double[][] UNIT_CUBE_VERTICES_D
CUBE_VERTICES_D
that has each vertex at distance 1 from the origin.public static final float[][] UNIT_OCTAHEDRON_VERTICES
OCTAHEDRON_VERTICES
that has each vertex at distance 1 from the origin.public static final double[][] UNIT_OCTAHEDRON_VERTICES_D
OCTAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin.public static final float[][] UNIT_DODECAHEDRON_VERTICES
DODECAHEDRON_VERTICES
that has each vertex at distance 1 from the origin.public static final double[][] UNIT_DODECAHEDRON_VERTICES_D
DODECAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin.public static final float[][] UNIT_ICOSAHEDRON_VERTICES
ICOSAHEDRON_VERTICES
that has each vertex at distance 1 from the origin.public static final double[][] UNIT_ICOSAHEDRON_VERTICES_D
ICOSAHEDRON_VERTICES_D
that has each vertex at distance 1 from the origin.Copyright © Eben Howard 2012–2022. All rights reserved.