Mesh
Date: 2019-10-22

org.jmol.shape

## Class Mesh

- java.lang.Object
- - org.jmol.util.MeshSurface
  - - org.jmol.shape.Mesh

- Direct Known Subclasses:
    DrawMesh, IsosurfaceMesh

      public class Mesh
      extends MeshSurface

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `atomIndex`
    `protected javajs.util.BS` | `bsTemp`
    `java.lang.Object` | `cappingObject`
    `int` | `checkByteCount`
    `int` | `color`
    `java.lang.String` | `colorCommand`
    `boolean` | `colorDensity`
    `int` | `colorType`
    `int[]` | `connectedAtoms`
    `int` | `diameter`
    `boolean` | `drawTriangles`
    `boolean` | `fillTriangles`
    `boolean` | `frontOnly`
    `boolean` | `havePlanarContours`
    `boolean` | `haveXyPoints`
    `int` | `index`
    `boolean` | `insideOut`
    `boolean` | `isModelConnected`
    `boolean` | `isShell`
    `boolean` | `isTwoSided`
    `boolean` | `isValid`
    `javajs.util.P3` | `lattice`
    `int` | `lighting`
    `javajs.util.Lst<javajs.util.P3[]>` | `lineData`
    `Mesh` | `linkedMesh`
    `short` | `meshColix`
    `int` | `modelIndex`
    `private boolean` | `normalsInverted`
    `short[]` | `normixes`
    `static java.lang.String` | `PREVIOUS_MESH_ID`
    `javajs.util.P3` | `ptCenter`
    `boolean` | `recalcAltVertices`
    `float` | `scale3d`
    `java.lang.String` | `scriptCommand`
    `boolean` | `showContourLines`
    `boolean` | `showPoints`
    `boolean` | `showTriangles`
    `java.lang.Object` | `slabbingObject`
    `short[]` | `symopColixes`
    `short[][]` | `symopNormixes`
    `javajs.util.M4[]` | `symops`
    `java.lang.String` | `thisID`
    `java.lang.String[]` | `title`
    `SymmetryInterface` | `unitCell`
    `boolean` | `useColix`
    `javajs.util.V3` | `vAB`
    `java.util.Map<java.lang.String,javajs.util.BS>` | `vertexColorMap`
    `int` | `visibilityFlags`
    `boolean` | `visible`
    `float` | `volumeRenderPointSize`
    `javajs.util.V3` | `vTemp`
    `float` | `width`

    - ### Fields inherited from class org.jmol.util.MeshSurface

      `altVertices, bsDisplay, bsPolygons, bsSlabDisplay, bsSlabGhost, colix, colixBack, colorsExplicit, dataOnly, haveQuads, iA, iB, iC, isColorSolid, isDrawPolygon, isMerged, mat4, mergePolygonCount0, mergeVertexCount0, meshType, normalCount, normals, normalsTemp, normixCount, nSets, oabc, offset, P_CHECK, P_CONTOUR, P_EXPLICIT_COLOR, pc, pcs, pis, polygonCount0, SEED_COUNT, slabColix, slabMeshType, slabOptions, surfaceAtoms, surfaceSet, vc, vcs, vertexCount0, vertexSets, vertexSource, vs, vvs, vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Mesh()` always use Mesh().mesh1(thisID, colix, index)

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `checkWithin(javajs.util.T3 pti, javajs.util.Lst<javajs.util.P3> withinPoints, float withinDistance2, boolean isWithinNot)`
    `void` | `clear(java.lang.String meshType)`
    `void` | `clearMesh(java.lang.String meshType)`
    `private void` | `flipLighting(int lighting)`
    `javajs.util.P3[]` | `getBoundingBox()`
    `(package private) java.lang.Object` | `getInfo(boolean isAll)`
    `protected float` | `getMinDistance2ForVertexGrouping()`
    `javajs.util.V3[]` | `getNormals(javajs.util.T3[] vertices, javajs.util.P4 plane)`
    `javajs.util.V3[]` | `getNormalsTemp()`
    `javajs.util.P3[]` | `getOffsetVertices(javajs.util.P4 thePlane)`
    `protected java.lang.String` | `getRendering()`
    `java.lang.String` | `getState(java.lang.String type)`
    `SymmetryInterface` | `getUnitCell()`
    `int` | `getVertexIndexFromNumber(int vertexIndex)`
    `protected javajs.util.BS` | `getVisibleVBS()`
    `javajs.util.BS` | `getVisibleVertexBitSet()`
    `void` | `initialize(int lighting, javajs.util.T3[] vertices, javajs.util.P4 plane)`
    `private void` | `invertNormixes()`
    `Mesh` | `mesh1(Viewer vwr, java.lang.String thisID, short colix, int index)`
    `void` | `rotateTranslate(javajs.util.Quat q, javajs.util.T3 offset, boolean isAbsolute)`
    `void` | `setLighting(int lighting)`
    `short[]` | `setNormixes(javajs.util.V3[] normals)`
    `void` | `setShowWithin(javajs.util.Lst<javajs.util.P3> showWithinPoints, float showWithinDistance2, boolean isWithinNot)`
    `void` | `setTokenProperty(int tokProp, boolean bProp)`
    `void` | `setTranslucent(boolean isTranslucent, float iLevel)`
    `void` | `setVisibilityFlags(int n)`
    `protected void` | `sumVertexNormals(javajs.util.T3[] vertices, javajs.util.V3[] normals)`
    `protected static void` | `sumVertexNormals2(Mesh m, javajs.util.T3[] vertices, javajs.util.V3[] normals)`

    - ### Methods inherited from class org.jmol.util.MeshSurface

      `addPolygon, addPolygonC, addQuad, addTriangle, addTriangleCheck, addV, addVCVal, getFaces, getMeshSlicer, getResolution, getSlabColor, getSlabType, getSphereData, getSphericalInterpolationFraction, getVertices, invalidatePolygons, newMesh, resetSlab, setABC, setBoundingBox, setBox, setColix, setColixBack, setPolygonCount, setTranslucentVertices, slabBrillouin, slabPolygonsList`

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

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

- - ### Field Detail

    - #### PREVIOUS_MESH_ID

          public static final java.lang.String PREVIOUS_MESH_ID

      See Also:
        Constant Field Values

    - #### title

          public java.lang.String[] title

    - #### meshColix

          public short meshColix

    - #### normixes

          public short[] normixes

    - #### lineData

          public javajs.util.Lst<javajs.util.P3[]> lineData

    - #### thisID

          public java.lang.String thisID

    - #### isValid

          public boolean isValid

    - #### scriptCommand

          public java.lang.String scriptCommand

    - #### colorCommand

          public java.lang.String colorCommand

    - #### lattice

          public javajs.util.P3 lattice

    - #### symops

          public javajs.util.M4[] symops

    - #### symopNormixes

          public short[][] symopNormixes

    - #### visible

          public boolean visible

    - #### lighting

          public int lighting

    - #### colorType

          public int colorType

    - #### haveXyPoints

          public boolean haveXyPoints

    - #### diameter

          public int diameter

    - #### width

          public float width

    - #### ptCenter

          public javajs.util.P3 ptCenter

    - #### linkedMesh

          public Mesh linkedMesh

    - #### vertexColorMap

          public java.util.Map<java.lang.String,javajs.util.BS> vertexColorMap

    - #### vAB

          public javajs.util.V3 vAB

    - #### vTemp

          public javajs.util.V3 vTemp

    - #### color

          public int color

    - #### useColix

          public boolean useColix

    - #### unitCell

          public SymmetryInterface unitCell

    - #### scale3d

          public float scale3d

    - #### index

          public int index

    - #### atomIndex

          public int atomIndex

    - #### modelIndex

          public int modelIndex

    - #### visibilityFlags

          public int visibilityFlags

    - #### insideOut

          public boolean insideOut

    - #### checkByteCount

          public int checkByteCount

    - #### normalsInverted

          private boolean normalsInverted

    - #### showContourLines

          public boolean showContourLines

    - #### showPoints

          public boolean showPoints

    - #### drawTriangles

          public boolean drawTriangles

    - #### fillTriangles

          public boolean fillTriangles

    - #### showTriangles

          public boolean showTriangles

    - #### frontOnly

          public boolean frontOnly

    - #### isShell

          public boolean isShell

    - #### isTwoSided

          public boolean isTwoSided

    - #### havePlanarContours

          public boolean havePlanarContours

    - #### bsTemp

          protected javajs.util.BS bsTemp

    - #### colorDensity

          public boolean colorDensity

    - #### cappingObject

          public java.lang.Object cappingObject

    - #### slabbingObject

          public java.lang.Object slabbingObject

    - #### volumeRenderPointSize

          public float volumeRenderPointSize

    - #### connectedAtoms

          public int[] connectedAtoms

    - #### isModelConnected

          public boolean isModelConnected

    - #### recalcAltVertices

          public boolean recalcAltVertices

    - #### symopColixes

          public short[] symopColixes

  - ### Constructor Detail

    - #### Mesh

          public Mesh()

      always use Mesh().mesh1(thisID, colix, index)

  - ### Method Detail

    - #### setVisibilityFlags

          public void setVisibilityFlags(int n)

    - #### mesh1

          public Mesh mesh1(Viewer vwr,
                            java.lang.String thisID,
                            short colix,
                            int index)

    - #### clear

          public void clear(java.lang.String meshType)

    - #### clearMesh

          public void clearMesh(java.lang.String meshType)

    - #### initialize

          public void initialize(int lighting,
                                 javajs.util.T3[] vertices,
                                 javajs.util.P4 plane)

    - #### setNormixes

          public short[] setNormixes(javajs.util.V3[] normals)

    - #### getNormals

          public javajs.util.V3[] getNormals(javajs.util.T3[] vertices,
                                             javajs.util.P4 plane)

    - #### setLighting

          public void setLighting(int lighting)

    - #### flipLighting

          private void flipLighting(int lighting)

    - #### invertNormixes

          private void invertNormixes()

    - #### setTranslucent

          public void setTranslucent(boolean isTranslucent,
                                     float iLevel)

    - #### sumVertexNormals

          protected void sumVertexNormals(javajs.util.T3[] vertices,
                                          javajs.util.V3[] normals)

    - #### sumVertexNormals2

          protected static void sumVertexNormals2(Mesh m,
                                                  javajs.util.T3[] vertices,
                                                  javajs.util.V3[] normals)

    - #### getMinDistance2ForVertexGrouping

          protected float getMinDistance2ForVertexGrouping()

    - #### getState

          public java.lang.String getState(java.lang.String type)

    - #### getRendering

          protected java.lang.String getRendering()

    - #### getOffsetVertices

          public javajs.util.P3[] getOffsetVertices(javajs.util.P4 thePlane)

    - #### setShowWithin

          public void setShowWithin(javajs.util.Lst<javajs.util.P3> showWithinPoints,
                                    float showWithinDistance2,
                                    boolean isWithinNot)

      Parameters:
        `showWithinPoints` -
        `showWithinDistance2` -
        `isWithinNot` -

    - #### checkWithin

          public static boolean checkWithin(javajs.util.T3 pti,
                                            javajs.util.Lst<javajs.util.P3> withinPoints,
                                            float withinDistance2,
                                            boolean isWithinNot)

    - #### getVertexIndexFromNumber

          public int getVertexIndexFromNumber(int vertexIndex)

    - #### getVisibleVertexBitSet

          public javajs.util.BS getVisibleVertexBitSet()

    - #### getVisibleVBS

          protected javajs.util.BS getVisibleVBS()

    - #### setTokenProperty

          public void setTokenProperty(int tokProp,
                                       boolean bProp)

    - #### getInfo

          java.lang.Object getInfo(boolean isAll)

    - #### getBoundingBox

          public javajs.util.P3[] getBoundingBox()

    - #### getUnitCell

          public SymmetryInterface getUnitCell()

      Returns:
        unitcell

    - #### rotateTranslate

          public void rotateTranslate(javajs.util.Quat q,
                                      javajs.util.T3 offset,
                                      boolean isAbsolute)

    - #### getNormalsTemp

          public javajs.util.V3[] getNormalsTemp()