# 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
Description
`int`
`atomIndex`
`protected BS`
`bsTemp`
`Object`
`cappingObject`
`int`
`checkByteCount`
`int`
`color`
`String`
`colorCommand`
`boolean`
`colorDensity`
`int`
`colorType`
`int[]`
`connectedAtoms`
`int`
`diameter`
`boolean`
`drawTriangles`
`boolean`
`fillTriangles`
`boolean`
`frontOnly`
`boolean`
`hasTranslucentVertices`
`boolean`
`havePlanarContours`
`boolean`
`haveXyPoints`
`String`
`hoverLabel`
`int`
`index`
`boolean`
`insideOut`
`boolean`
`isModelConnected`
`boolean`
`isShell`
`boolean`
`isTwoSided`
`boolean`
`isValid`
`P3`
`lattice`
`int`
`lighting`
`Lst<P3[]>`
`lineData`
`Mesh`
`linkedMesh`
`short`
`meshColix`
`int`
`modelIndex`
`short[]`
`normixes`
`static final String`
`PREVIOUS_MESH_ID`
`P3`
`ptCenter`
`boolean`
`recalcAltVertices`
`boolean`
`reverseColor`
`float`
`scale3d`
`String`
`scriptCommand`
`boolean`
`showContourLines`
`boolean`
`showPoints`
`boolean`
`showTriangles`
`Object`
`slabbingObject`
`short[]`
`symopColixes`
`short[][]`
`symopNormixes`
`M4[]`
`symops`
`String`
`thisID`
`String[]`
`title`
`SymmetryInterface`
`unitCell`
`boolean`
`useColix`
`V3`
`vAB`
`int`
`visibilityFlags`
`boolean`
`visible`
`float`
`volumeRenderPointSize`
`V3`
`vTemp`
`float`
`width`

### Fields inherited from class 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
Description
`Mesh()`
always use Mesh().mesh1(thisID, colix, index)

## Method Summary

Modifier and Type
Method
Description
`static boolean`
`checkWithin(T3 pti, Lst<P3> withinPoints, float withinDistance2, boolean isWithinNot)`
`void`
`clear(String meshType)`
`void`
`clearMesh(String meshType)`
`P3[]`
`getBoundingBox()`
`protected Object`
`getInfo(boolean isAll)`
`protected float`
`getMinDistance2ForVertexGrouping()`
`V3[]`
`getNormals(T3[] vertices, P4 plane)`
`V3[]`
`getNormalsTemp()`
`P3[]`
`getOffsetVertices(P4 thePlane)`
`protected String`
`getRendering()`
`String`
`getState(String type)`
`SymmetryInterface`
`getUnitCell()`
`int`
`getVertexIndexFromNumber(int vertexIndex)`
`protected BS`
`getVisibleVBS()`
`BS`
`getVisibleVertexBitSet()`
`void`
`initialize(int lighting, T3[] vertices, P4 plane)`
`Mesh`
`mesh1(Viewer vwr, String thisID, short colix, int index)`
`void`
`rotateTranslate(Quat q, T3 offset, boolean isAbsolute)`
`void`
`setLighting(int lighting)`
`short[]`
`setNormixes(V3[] normals)`
`void`
`setShowWithin(Lst<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(T3[] vertices, V3[] normals)`
`protected static void`
`sumVertexNormals2(Mesh m, T3[] vertices, V3[] normals)`

### Methods inherited from class 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 Object

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

## Field Details

### PREVIOUS_MESH_ID

public static final String PREVIOUS_MESH_ID

See Also:
  - Constant Field Values

### title

public String[] title

### hoverLabel

public String hoverLabel

### meshColix

public short meshColix

### normixes

public short[] normixes

### lineData

public Lst<P3[]> lineData

### thisID

public String thisID

### isValid

public boolean isValid

### scriptCommand

public String scriptCommand

### colorCommand

public String colorCommand

### lattice

public P3 lattice

### symops

public M4[] symops

### symopNormixes

public short[][] symopNormixes

### visible

public boolean visible

### lighting

public int lighting

### colorType

public int colorType

### reverseColor

public boolean reverseColor

### haveXyPoints

public boolean haveXyPoints

### diameter

public int diameter

### width

public float width

### ptCenter

public P3 ptCenter

### linkedMesh

public Mesh linkedMesh

### vAB

public V3 vAB

### vTemp

public 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

### 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 BS bsTemp

### colorDensity

public boolean colorDensity

### cappingObject

public Object cappingObject

### slabbingObject

public Object slabbingObject

### volumeRenderPointSize

public float volumeRenderPointSize

### connectedAtoms

public int[] connectedAtoms

### isModelConnected

public boolean isModelConnected

### recalcAltVertices

public boolean recalcAltVertices

### symopColixes

public short[] symopColixes

### hasTranslucentVertices

public boolean hasTranslucentVertices

## Constructor Details

### Mesh

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

## Method Details

### setVisibilityFlags

public void setVisibilityFlags(int n)

### mesh1

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

### clear

public void clear(String meshType)

### clearMesh

public void clearMesh(String meshType)

### initialize

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

### setNormixes

public short[] setNormixes(V3[] normals)

### getNormals

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

### setLighting

public void setLighting(int lighting)

### setTranslucent

public void setTranslucent(boolean isTranslucent, float iLevel)

### sumVertexNormals

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

### sumVertexNormals2

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

### getMinDistance2ForVertexGrouping

protected float getMinDistance2ForVertexGrouping()

### getState

public String getState(String type)

### getRendering

protected String getRendering()

### getOffsetVertices

public P3[] getOffsetVertices(P4 thePlane)

### setShowWithin

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

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

### checkWithin

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

### getVertexIndexFromNumber

public int getVertexIndexFromNumber(int vertexIndex)

### getVisibleVertexBitSet

public BS getVisibleVertexBitSet()

### getVisibleVBS

protected BS getVisibleVBS()

### setTokenProperty

public void setTokenProperty(int tokProp, boolean bProp)

### getInfo

protected Object getInfo(boolean isAll)

### getBoundingBox

public P3[] getBoundingBox()

### getUnitCell

public SymmetryInterface getUnitCell()

Returns:
  unitcell

### rotateTranslate

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

### getNormalsTemp

public V3[] getNormalsTemp()