Package org.jmol.shapesurface
Class Isosurface
java.lang.Object
org.jmol.shape.Shape
org.jmol.shape.MeshCollection
org.jmol.shapesurface.Isosurface
- All Implemented Interfaces:
MeshDataServer,VertexDataServer
- Direct Known Subclasses:
Contact,LcaoCartoon,MolecularOrbital,Pmesh
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected IsosurfaceMesh[]int[]protected SurfaceGeneratorprotected IsosurfaceMeshFields inherited from class org.jmol.shape.MeshCollection
bsDisplay, colix, color, connections, currentMesh, displayWithinDistance2, displayWithinPoints, explicitID, htObjects, isDisplayWithinNot, isFixed, jvxlData, linkedMesh, meshCount, meshes, modelIndex, nUnnamed, pickedMesh, pickedModel, pickedPt, pickedVertex, PREVIOUS_MESH_ID, previousMeshID, titleFields inherited from class org.jmol.shape.Shape
bsColixSet, bsSizeSet, isBioShape, ms, myType, RADIUS_MAX, shapeID, translucentAllowed, translucentLevel, vf, vwr -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddMeshInfo(IsosurfaceMesh mesh, Map<String, Object> info) voidaddRequiredFile(String fileName) intaddTriangleCheck(int iA, int iB, int iC, int check, int iContour, boolean isAbsolute, int color) addTriangleCheck adds a triangle along with a 3-bit check indicating which edges to draw in mesh mode: 1 (iA-iB) + 2 (iB-iC) + 4 (iC-iA)intaddVertexCopy(T3 vertexXYZ, float value, int assocVertex, boolean asCopy) addVertexCopy is used by the Marching Squares algorithm to uniquely identify a new vertex when an edge is crossed in the 2D plane.voidP3[]calculateGeodesicSurface(BS bsSelected, float envelopeRadius) checkObjectClicked(int x, int y, int action, BS bsVisible, boolean drawPicking) booleancheckObjectHovered(int x, int y, BS bsVisible) protected voidclearSg()protected voiddiscardTempData(boolean discardAll) voidfillMeshData(MeshData meshData, int mode, IsosurfaceMesh mesh) protected voidgetCapSlabInfo(String script) getCmd(int index) float[]getPlane(int x) static StringgetPolygonColorData(int ccount, short[] colixes, int[][] polygons, BS bsSlabDisplay) getProperty(String property, int index) booleangetPropertyData(String property, Object[] data) protected ObjectintgetSurfacePointIndexAndFraction(float cutoff, boolean isCutoffAbsolute, int x, int y, int z, P3i offset, int vA, int vB, float valueA, float valueB, T3 pointA, V3 edgeVector, boolean isContourType, float[] fReturn) getSurfacePointIndex is used by the Marching Cubes algorithm and must return a unique integer identifier for a vertex created by the Marching Cube algorithm when it finds an edge.floatgetValue(int x, int y, int z, int ptyz) for readers onlyprotected Objectprotected ObjectgetVertices(Mesh mesh) voidvoidprotected voidnewSg()booleanvoidvoidsetOutputChannel(GenericBinaryDocument binaryDoc, OC out) voidsetProperty(String propertyName, Object value, BS bs) protected voidvoidsetRequiredFile(String oldName, String fileName) protected voidsetScriptInfo(String strCommand) protected voidslabPolygons(Object[] slabInfo) Methods inherited from class org.jmol.shape.MeshCollection
checkExplicit, clean, deleteMeshI, deleteMeshKey, getIndexFromName, getMesh, getMeshList, getPickedPoint, getPropDataMC, getPropMC, merge, resetObjects, setMeshColor, setModelVisibilityFlags, setPropMC, setStatusPicked, setTitle, setTokenPropertyMethods inherited from class org.jmol.shape.Shape
appendCmd, checkBoundsMinMax, checkObjectDragged, coordinateInRange, encodeColor, findNearestAtomIndex, getColix, getColixA, getColixB, getColixI, getColorCommand, getColorCommandUnk, getFontCommand, getPropShape, getSize, getSizeG, getTranslucentLabel, initializeShape, initModelSet, replaceGroup, setAtomClickability, setModelSet, setProperties, setPropS, setShapeSizeRD, setSize, setSizeRD, wasClicked
-
Field Details
-
isomeshes
-
thisMesh
-
iHaveBitSets
protected boolean iHaveBitSets -
sg
-
keyXy
public int[] keyXy
-
-
Constructor Details
-
Isosurface
public Isosurface()
-
-
Method Details
-
allocMesh
- Overrides:
allocMeshin classMeshCollection
-
initShape
public void initShape()- Overrides:
initShapein classMeshCollection
-
newSg
protected void newSg() -
clearSg
protected void clearSg() -
setProperty
- Specified by:
setPropertyin classShape
-
setPropI
-
slabPolygons
-
getPropertyData
- Overrides:
getPropertyDatain classShape- Parameters:
property-data-- Returns:
- true if serviced
-
getProperty
- Overrides:
getPropertyin classShape- Parameters:
property-index-- Returns:
- true if serviced
-
getPropI
-
getPolygonColorData
-
getShapeState
- Specified by:
getShapeStatein classShape
-
getCapSlabInfo
-
discardTempData
protected void discardTempData(boolean discardAll) -
invalidateTriangles
public void invalidateTriangles()- Specified by:
invalidateTrianglesin interfaceMeshDataServer
-
setOutputChannel
- Specified by:
setOutputChannelin interfaceMeshDataServer
-
fillMeshData
- Specified by:
fillMeshDatain interfaceMeshDataServer
-
notifySurfaceGenerationCompleted
public boolean notifySurfaceGenerationCompleted()- Specified by:
notifySurfaceGenerationCompletedin interfaceMeshDataServer
-
notifySurfaceMappingCompleted
public void notifySurfaceMappingCompleted()- Specified by:
notifySurfaceMappingCompletedin interfaceMeshDataServer
-
calculateGeodesicSurface
- Specified by:
calculateGeodesicSurfacein interfaceMeshDataServer
-
getSurfacePointIndexAndFraction
public int getSurfacePointIndexAndFraction(float cutoff, boolean isCutoffAbsolute, int x, int y, int z, P3i offset, int vA, int vB, float valueA, float valueB, T3 pointA, V3 edgeVector, boolean isContourType, float[] fReturn) Description copied from interface:VertexDataServergetSurfacePointIndex is used by the Marching Cubes algorithm and must return a unique integer identifier for a vertex created by the Marching Cube algorithm when it finds an edge. If a vertex is discarded, then Integer.MAX_VALUE should be returned. the 3D coordinate of the point can be calculated using surfacePoint.scaleAdd(fraction, edgeVector, pointA); where fraction is generally calculated as: fraction = (cutoff - valueA) / (valueB - valueA); if (isCutoffAbsolute invalid input: '&'invalid input: '&' (fraction invalid input: '<' 0 || fraction > 1)) fraction = (-cutoff - valueA) / (valueB - valueA); This method is also used by MarchingCubes to deliver the appropriate oblique planar coordinate to MarchingSquares for later contouring.- Specified by:
getSurfacePointIndexAndFractionin interfaceVertexDataServer- Parameters:
cutoff-isCutoffAbsolute-x-y-z-offset-vA- [0:7]vB- [0:7]valueA-valueB-pointA-edgeVector- vector from A to BisContourType-fReturn-- Returns:
- new vertex index or Integer.MAX_VALUE
-
addVertexCopy
Description copied from interface:VertexDataServeraddVertexCopy is used by the Marching Squares algorithm to uniquely identify a new vertex when an edge is crossed in the 2D plane. The implementing method should COPY the Point3f using Point3f.set(). The data consumer can use the association key to group this vertex with others near the same gridpoint.- Specified by:
addVertexCopyin interfaceVertexDataServer- Parameters:
vertexXYZ-value-assocVertex- unique association vertex or -1asCopy-- Returns:
- new vertex index
-
addTriangleCheck
public int addTriangleCheck(int iA, int iB, int iC, int check, int iContour, boolean isAbsolute, int color) Description copied from interface:VertexDataServeraddTriangleCheck adds a triangle along with a 3-bit check indicating which edges to draw in mesh mode: 1 (iA-iB) + 2 (iB-iC) + 4 (iC-iA)- Specified by:
addTriangleCheckin interfaceVertexDataServer- Parameters:
iA-iB-iC-check-iContour- TODOisAbsolute-color-- Returns:
- polygon index or -1
-
setScriptInfo
-
addRequiredFile
- Specified by:
addRequiredFilein interfaceMeshDataServer
-
setRequiredFile
- Specified by:
setRequiredFilein interfaceMeshDataServer
-
getShapeDetail
- Overrides:
getShapeDetailin classShape
-
addMeshInfo
-
getPlane
public float[] getPlane(int x) - Specified by:
getPlanein interfaceVertexDataServer
-
getValue
public float getValue(int x, int y, int z, int ptyz) Description copied from interface:VertexDataServerfor readers only- Specified by:
getValuein interfaceVertexDataServer- Parameters:
x-y-z-ptyz-- Returns:
- value[x][y][z]
-
checkObjectHovered
- Overrides:
checkObjectHoveredin classShape- Parameters:
x-y-bsVisible-- Returns:
- T/F
-
checkObjectClicked
public Map<String,Object> checkObjectClicked(int x, int y, int action, BS bsVisible, boolean drawPicking) - Overrides:
checkObjectClickedin classShape- Parameters:
x-y-action-bsVisible-drawPicking- TODO- Returns:
- Hashtable containing information about pt clicked
-
getCmd
-
getValues
- Overrides:
getValuesin classMeshCollection
-
getVertices
- Overrides:
getVerticesin classMeshCollection
-