MeshSlicer
Date: 2019-10-22

org.jmol.util

## Class MeshSlicer

- java.lang.Object
- - org.jmol.util.MeshSlicer

-     public class MeshSlicer
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private MeshCapper` | `capper`
    `private boolean` | `doCap`
    `private boolean` | `doClear`
    `private boolean` | `doGhost`
    `private float` | `dPlane`
    `(package private) float[]` | `fracs`
    `private int` | `iD`
    `private int` | `iE`
    `protected MeshSurface` | `m`
    `(package private) javajs.util.V3` | `norm`
    `private javajs.util.P3[]` | `pts`
    `private int[]` | `sources`
    `(package private) float[]` | `values`
    `private float` | `wPlane`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MeshSlicer()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `(package private) int` | `addIntersectionVertex(javajs.util.T3 vertex, float value, int source, int set, java.util.Map<java.lang.String,java.lang.Integer> mapEdge, int i1, int i2)`
    `(package private) void` | `addTriangle(int ipt1, int ipt2, int ipt3)` from MeshCapper
    `private float` | `checkSlab(int tokType, javajs.util.T3 v, float val, float distance, javajs.util.BS bs)`
    `private javajs.util.P4[]` | `getBoxFacesFromOABC(javajs.util.P3[] oabc)`
    `private boolean` | `getDE(float[] fracs, int fD, int i1, int i2, int i3, boolean toss23)`
    `void` | `getIntersection(float distance, javajs.util.P4 plane, javajs.util.P3[] ptCenters, javajs.util.Lst<javajs.util.P3[]> vData, float[] fData, javajs.util.BS bsSource, MeshSurface meshSurface, boolean andCap, boolean doClean, int tokType, boolean isGhost)`
    `(package private) java.lang.String` | `getKey(int i1, int i2)`
    `private javajs.util.P3` | `interpolateFraction(javajs.util.T3 v1, javajs.util.T3 v2, float f, float val1, float val2, int i)`
    `private javajs.util.P3` | `interpolatePoint(javajs.util.T3 v1, javajs.util.T3 v2, float d1, float d2, float val1, float val2, int i)`
    `private javajs.util.P3` | `interpolateSphere(javajs.util.T3 v1, javajs.util.T3 v2, float d1, float d2, double absD, float val1, float val2, int i)`
    `(package private) MeshSlicer` | `set(MeshSurface meshSurface)`
    `private static int` | `setPoint(float[] fracs, int i, int i0, int i1)`
    `protected void` | `slabBrillouin(javajs.util.P3[] unitCellPoints)` "slabs" an isosurface into the first Brillouin zone moving points as necessary.
    `boolean` | `slabPolygons(java.lang.Object[] slabObject, boolean allowCap)`

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

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

- - ### Field Detail

    - #### m

          protected MeshSurface m

    - #### doCap

          private boolean doCap

    - #### doClear

          private boolean doClear

    - #### doGhost

          private boolean doGhost

    - #### iD

          private int iD

    - #### iE

          private int iE

    - #### sources

          private int[] sources

    - #### pts

          private javajs.util.P3[] pts

    - #### norm

          javajs.util.V3 norm

    - #### dPlane

          private float dPlane

    - #### values

          float[] values

    - #### fracs

          float[] fracs

    - #### capper

          private MeshCapper capper

    - #### wPlane

          private float wPlane

  - ### Constructor Detail

    - #### MeshSlicer

          public MeshSlicer()

  - ### Method Detail

    - #### set

          MeshSlicer set(MeshSurface meshSurface)

    - #### slabPolygons

          public boolean slabPolygons(java.lang.Object[] slabObject,
                                      boolean allowCap)

      Parameters:
        `slabObject` - [0] Integer type, [1] object, [2] andCap, [3] colorData
        `allowCap` -
      Returns:
        true if successful

    - #### getBoxFacesFromOABC

          private javajs.util.P4[] getBoxFacesFromOABC(javajs.util.P3[] oabc)

    - #### getIntersection

          public void getIntersection(float distance,
                                      javajs.util.P4 plane,
                                      javajs.util.P3[] ptCenters,
                                      javajs.util.Lst<javajs.util.P3[]> vData,
                                      float[] fData,
                                      javajs.util.BS bsSource,
                                      MeshSurface meshSurface,
                                      boolean andCap,
                                      boolean doClean,
                                      int tokType,
                                      boolean isGhost)

      Parameters:
        `distance` - a distance from a plane or point
        `plane` - a slabbing plane
        `ptCenters` - a set of atoms to measure distance from
        `vData` - when not null, this is a query, not an actual slabbing
        `fData` - vertex values or other data to overlay
        `bsSource` - TODO
        `meshSurface` - second surface; not implemented -- still some problems there
        `andCap` - to cap this off, crudely only
        `doClean` - compact set - draw only
        `tokType` - type of slab
        `isGhost` - translucent slab, so we mark slabbed triangles

    - #### getDE

          private boolean getDE(float[] fracs,
                                int fD,
                                int i1,
                                int i2,
                                int i3,
                                boolean toss23)

    - #### setPoint

          private static int setPoint(float[] fracs,
                                      int i,
                                      int i0,
                                      int i1)

    - #### checkSlab

          private float checkSlab(int tokType,
                                  javajs.util.T3 v,
                                  float val,
                                  float distance,
                                  javajs.util.BS bs)

    - #### interpolateSphere

          private javajs.util.P3 interpolateSphere(javajs.util.T3 v1,
                                                   javajs.util.T3 v2,
                                                   float d1,
                                                   float d2,
                                                   double absD,
                                                   float val1,
                                                   float val2,
                                                   int i)

    - #### interpolatePoint

          private javajs.util.P3 interpolatePoint(javajs.util.T3 v1,
                                                  javajs.util.T3 v2,
                                                  float d1,
                                                  float d2,
                                                  float val1,
                                                  float val2,
                                                  int i)

    - #### interpolateFraction

          private javajs.util.P3 interpolateFraction(javajs.util.T3 v1,
                                                     javajs.util.T3 v2,
                                                     float f,
                                                     float val1,
                                                     float val2,
                                                     int i)

    - #### slabBrillouin

          protected void slabBrillouin(javajs.util.P3[] unitCellPoints)

      "slabs" an isosurface into the first Brillouin zone moving points as necessary.
      Parameters:
        `unitCellPoints` -

    - #### addIntersectionVertex

          int addIntersectionVertex(javajs.util.T3 vertex,
                                    float value,
                                    int source,
                                    int set,
                                    java.util.Map<java.lang.String,java.lang.Integer> mapEdge,
                                    int i1,
                                    int i2)

    - #### getKey

          java.lang.String getKey(int i1,
                                  int i2)

    - #### addTriangle

          void addTriangle(int ipt1,
                           int ipt2,
                           int ipt3)

      from MeshCapper
      Parameters:
        `ipt1` -
        `ipt2` -
        `ipt3` -