MarchingSquares
Date: 2019-10-22

org.jmol.jvxl.calc

## Class MarchingSquares

- java.lang.Object
- - org.jmol.jvxl.calc.MarchingSquares

-     public class MarchingSquares
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `private class` | `MarchingSquares.ContourVertex`
    `private class` | `MarchingSquares.Triangle`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CONTOUR_POINT`
    `private boolean` | `contourFromZero`
    `(package private) float` | `contourPlaneMaximumValue`
    `(package private) float` | `contourPlaneMinimumValue`
    `private float[]` | `contoursDiscrete`
    `int` | `contourType`
    `float[]` | `contourValuesUsed`
    `int` | `contourVertexCount`
    `(package private) MarchingSquares.ContourVertex[]` | `contourVertexes`
    `static int` | `defaultContourCount`
    `static int` | `EDGE_POINT`
    `(package private) java.util.Map<java.lang.String,java.lang.Integer>` | `htPts`
    `private static int` | `nContourMax`
    `private int` | `nContourSegments`
    `(package private) javajs.util.P3` | `pointA`
    `(package private) javajs.util.P3` | `pointB`
    `(package private) javajs.util.P3` | `ptTemp`
    `(package private) VertexDataServer` | `surfaceReader`
    `(package private) int` | `thisContour`
    `private int` | `triangleCount`
    `private MarchingSquares.Triangle[]` | `triangles`
    `private float` | `valueMax`
    `private float` | `valueMin`
    `static int` | `VERTEX_POINT`
    `(package private) VolumeData` | `volumeData`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MarchingSquares(VertexDataServer surfaceReader, VolumeData volumeData, javajs.util.P4 thePlane, float[] contoursDiscrete, int nContours, int thisContour, boolean contourFromZero)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `addAllTriangles()`
    `int` | `addContourVertex(javajs.util.P3 vertexXYZ, float value)`
    `int` | `addTriangle(int iA, int iB, int iC, int check, int iContour)`
    `(package private) float` | `calcContourPoint(float cutoff, float valueA, float valueB, javajs.util.P3 pt)`
    `private void` | `checkContour(MarchingSquares.Triangle t, int i, float value)`
    `private boolean` | `createContours(float min, float max, float zeroOffset)`
    `int` | `generateContourData(boolean haveData, float zeroOffset)`
    `float[]` | `getMinMax()`
    `private void` | `getVertexValues(boolean haveData)`
    `private int` | `intercept(MarchingSquares.Triangle t, int i, float value)`
    `void` | `setContourData(int i, float value)`
    `void` | `setMinMax(float valueMin, float valueMax)`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### CONTOUR_POINT

          public static final int CONTOUR_POINT

      See Also:
        Constant Field Values

    - #### VERTEX_POINT

          public static final int VERTEX_POINT

      See Also:
        Constant Field Values

    - #### EDGE_POINT

          public static final int EDGE_POINT

      See Also:
        Constant Field Values

    - #### surfaceReader

          VertexDataServer surfaceReader

    - #### volumeData

          VolumeData volumeData

    - #### nContourMax

          private static final int nContourMax

      See Also:
        Constant Field Values

    - #### defaultContourCount

          public static final int defaultContourCount

      See Also:
        Constant Field Values

    - #### nContourSegments

          private int nContourSegments

    - #### contourType

          public int contourType

    - #### thisContour

          int thisContour

    - #### valueMin

          private float valueMin

    - #### valueMax

          private float valueMax

    - #### pointA

          final javajs.util.P3 pointA

    - #### pointB

          final javajs.util.P3 pointB

    - #### contourFromZero

          private boolean contourFromZero

    - #### contoursDiscrete

          private float[] contoursDiscrete

    - #### contourVertexCount

          public int contourVertexCount

    - #### contourVertexes

          MarchingSquares.ContourVertex[] contourVertexes

    - #### contourPlaneMinimumValue

          float contourPlaneMinimumValue

    - #### contourPlaneMaximumValue

          float contourPlaneMaximumValue

    - #### contourValuesUsed

          public float[] contourValuesUsed

    - #### ptTemp

          final javajs.util.P3 ptTemp

    - #### triangleCount

          private int triangleCount

    - #### triangles

          private MarchingSquares.Triangle[] triangles

    - #### htPts

          java.util.Map<java.lang.String,java.lang.Integer> htPts

  - ### Constructor Detail

    - #### MarchingSquares

          public MarchingSquares(VertexDataServer surfaceReader,
                                 VolumeData volumeData,
                                 javajs.util.P4 thePlane,
                                 float[] contoursDiscrete,
                                 int nContours,
                                 int thisContour,
                                 boolean contourFromZero)

      Parameters:
        `surfaceReader` -
        `volumeData` -
        `thePlane` - NOT USED
        `contoursDiscrete` -
        `nContours` -
        `thisContour` -
        `contourFromZero` -

  - ### Method Detail

    - #### setMinMax

          public void setMinMax(float valueMin,
                                float valueMax)

    - #### addContourVertex

          public int addContourVertex(javajs.util.P3 vertexXYZ,
                                      float value)

    - #### setContourData

          public void setContourData(int i,
                                     float value)

    - #### calcContourPoint

          float calcContourPoint(float cutoff,
                                 float valueA,
                                 float valueB,
                                 javajs.util.P3 pt)

    - #### addTriangle

          public int addTriangle(int iA,
                                 int iB,
                                 int iC,
                                 int check,
                                 int iContour)

      Parameters:
        `iA` -
        `iB` -
        `iC` -
        `check` -
        `iContour` -
      Returns:
        0

    - #### generateContourData

          public int generateContourData(boolean haveData,
                                         float zeroOffset)

    - #### getVertexValues

          private void getVertexValues(boolean haveData)

    - #### createContours

          private boolean createContours(float min,
                                         float max,
                                         float zeroOffset)

    - #### intercept

          private int intercept(MarchingSquares.Triangle t,
                                int i,
                                float value)

    - #### checkContour

          private void checkContour(MarchingSquares.Triangle t,
                                    int i,
                                    float value)

    - #### getMinMax

          public float[] getMinMax()

    - #### addAllTriangles

          private void addAllTriangles()