# Class Triangulator

java.lang.Object
org.jmol.util.TriangleData
org.jmol.util.Triangulator

public class Triangulator extends TriangleData

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int[][]`
`abFace`
`static final int[][]`
`edgeA`
`static final int[][]`
`edgeB`
`static final int[][]`
`edgeC`
`static final int[][]`
`fullCubeCorners`
For each corner 0-7: {c c c t} where c c c are the connected corners, arranged clockwise and t is the bitset of triangles associated with faces intersecting at this corner.
`static final int[][]`
`fullCubePolygon`

### Fields inherited from class TriangleData

`cubeVertexOffsets, edgeVertexes, Pwr2, triangleTable2`

## Constructor Summary

Constructors
Constructor
Description
`Triangulator()`

## Method Summary

Modifier and Type
Method
Description
`P3[]`
`intersectLine(P3[] points, int nPoints, P3 ptA, V3 unitVector)`
`Lst<Object>`
`intersectPlane(P4 plane, T3[] vertices, int flags)`
a generic cell - plane intersector -- used for finding the plane through a not static so as to allow JavaScript to not load it as core.

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### edgeC

public static final int[][] edgeC

### edgeB

public static final int[][] edgeB

### edgeA

public static final int[][] edgeA

### abFace

public static final int[][] abFace

### fullCubePolygon

public static final int[][] fullCubePolygon

### fullCubeCorners

public static final int[][] fullCubeCorners
For each corner 0-7: {c c c t} where c c c are the connected corners, arranged clockwise and t is the bitset of triangles associated with faces intersecting at this corner.

## Constructor Details

### Triangulator

public Triangulator()

## Method Details

### intersectLine

public P3[] intersectLine(P3[] points, int nPoints, P3 ptA, V3 unitVector)

### intersectPlane

public Lst<Object> intersectPlane(P4 plane, T3[] vertices, int flags)
a generic cell - plane intersector -- used for finding the plane through a not static so as to allow JavaScript to not load it as core. unit cell

Parameters:
  `plane` - intersecting plane, or null for a full list of all faces
  `vertices` - the vertices of the box or unit cell in canonical format
  `flags` - -1 -- projection, of cell only, 0 -- polygon int[], 1 -- edges only, 2 -- triangles only 3 -- both
Returns:
  Lst of P3[3] triangles and P3[2] edge lines