Package org.jmol.util

Class TriangleData

java.lang.Object
org.jmol.util.TriangleData
Direct Known Subclasses:
MarchingCubes, Triangulator

public class TriangleData extends Object
An adaptation of Marching Cubes that allows for indicating edges on triangles. the triangle data for MarchingCube and Triangulator Used for Marching Cubes as well as calculating the intersection of unit cells and bounding boxes with planes.
  • Field Details

    • Pwr2

      protected static final int[] Pwr2
    • cubeVertexOffsets

      protected static final P3i[] cubeVertexOffsets
    • edgeVertexes

      protected static final byte[] edgeVertexes
    • triangleTable2

      protected static final byte[][] triangleTable2
      The new triangle table developed specifically for Jmol. The fourth number in each ABC set is three bits, b3b2b1, where b1 = 1 for AB, b2 = 1 for BC, b3 = 1 for CA, and mark lines to be drawn for mesh So, for example: 1, 8, 3, 6 6 is 110 in binary, so b3 = 1, b2 = 1, b1 = 0; b1 refers to the 18 edge, b2 refers to the 83 edge, and b3 refers to the 31 edge. The 31 and 83, but not 18 edges should be drawn for a mesh. On the cube above, you can see that the 18 edges is in the interior of the cube. That's why we don't render it with a mesh. Bob Hanson, 3/29/2007
  • Constructor Details

    • TriangleData

      public TriangleData()