org.jmol.shapesurface
Class Isosurface
java.lang.Object
org.jmol.shape.Shape
org.jmol.shape.MeshCollection
org.jmol.shapesurface.MeshFileCollection
org.jmol.shapesurface.Isosurface
- All Implemented Interfaces:
- MeshDataServer, VertexDataServer
- Direct Known Subclasses:
- LcaoCartoon, MolecularOrbital
public class Isosurface
- extends MeshFileCollection
- implements MeshDataServer
| Fields inherited from class org.jmol.shape.MeshCollection |
allowMesh, colix, currentMesh, explicitID, iHaveModelIndex, isFixed, linkedMesh, meshCount, meshes, modelCount, modelIndex, myType, nUnnamed, previousMeshID, script, title |
|
Method Summary |
void |
addTriangleCheck(int iA,
int iB,
int iC,
int check,
boolean isAbsolute)
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) |
int |
addVertexCopy(javax.vecmath.Point3f vertexXYZ,
float value,
int assocVertex)
addVertexCopy is used by the Marching Squares algorithm to
uniquely identify a new vertex when an edge is crossed in the 2D plane. |
void |
allocMesh(java.lang.String thisID)
|
javax.vecmath.Point3f[] |
calculateGeodesicSurface(java.util.BitSet bsSelected,
float envelopeRadius)
|
protected void |
clearSg()
|
private void |
createLcaoLobe(javax.vecmath.Vector3f lobeAxis,
float factor)
|
private void |
discardTempData(boolean discardAll)
|
private void |
drawLcaoCartoon(javax.vecmath.Vector3f z,
javax.vecmath.Vector3f x,
javax.vecmath.Vector3f rotAxis)
|
void |
fillMeshData(MeshData meshData,
int mode)
|
private short |
getDefaultColix()
|
java.lang.Object |
getProperty(java.lang.String property,
int index)
|
private boolean |
getScriptBitSets(java.lang.String script,
java.util.BitSet[] bsCmd)
|
java.util.Vector |
getShapeDetail()
|
int |
getSurfacePointIndex(float cutoff,
boolean isCutoffAbsolute,
int x,
int y,
int z,
javax.vecmath.Point3i offset,
int vA,
int vB,
float valueA,
float valueB,
javax.vecmath.Point3f pointA,
javax.vecmath.Vector3f edgeVector,
boolean isContourType)
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. |
private java.lang.String |
getUserColorScheme(java.lang.String schemeName)
|
private void |
initializeIsosurface()
|
void |
initShape()
|
private void |
initState()
|
void |
invalidateTriangles()
|
void |
notifySurfaceGenerationCompleted()
|
void |
notifySurfaceMappingCompleted()
|
protected void |
remapColors()
|
private void |
setJvxlInfo()
|
private void |
setModelIndex()
|
void |
setProperty(java.lang.String propertyName,
java.lang.Object value,
java.util.BitSet bs)
|
private void |
setPropertySuper(java.lang.String propertyName,
java.lang.Object value,
java.util.BitSet bs)
|
protected void |
setScriptInfo()
|
| Methods inherited from class org.jmol.shape.Shape |
appendCmd, checkBoundsMinMax, checkObjectClicked, checkObjectDragged, checkObjectHovered, findNearestAtomIndex, getColix, getColorCommand, getColorCommand, getFontCommand, getShapeCommands, getShapeCommands, getViewer, initializeShape, initModelSet, setColix, setColix, setModelClickability, setModelSet, setSize, setStateInfo, setStateInfo, wasClicked |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isomeshes
private IsosurfaceMesh[] isomeshes
thisMesh
private IsosurfaceMesh thisMesh
lighting
private int lighting
iHaveBitSets
private boolean iHaveBitSets
atomIndex
private int atomIndex
moNumber
private int moNumber
defaultColix
private short defaultColix
center
private javax.vecmath.Point3f center
isPhaseColored
private boolean isPhaseColored
sg
protected SurfaceGenerator sg
jvxlData
private JvxlData jvxlData
colorEncoder
private ColorEncoder colorEncoder
indexColorPositive
private int indexColorPositive
indexColorNegative
private int indexColorNegative
nLCAO
private int nLCAO
lcaoDir
private javax.vecmath.Point4f lcaoDir
associateNormals
private boolean associateNormals
Isosurface
public Isosurface()
allocMesh
public void allocMesh(java.lang.String thisID)
- Overrides:
allocMesh in class MeshCollection
initShape
public void initShape()
- Overrides:
initShape in class MeshCollection
clearSg
protected void clearSg()
setProperty
public void setProperty(java.lang.String propertyName,
java.lang.Object value,
java.util.BitSet bs)
- Overrides:
setProperty in class MeshCollection
setPropertySuper
private void setPropertySuper(java.lang.String propertyName,
java.lang.Object value,
java.util.BitSet bs)
getProperty
public java.lang.Object getProperty(java.lang.String property,
int index)
- Overrides:
getProperty in class MeshCollection
getScriptBitSets
private boolean getScriptBitSets(java.lang.String script,
java.util.BitSet[] bsCmd)
initializeIsosurface
private void initializeIsosurface()
initState
private void initState()
discardTempData
private void discardTempData(boolean discardAll)
getDefaultColix
private short getDefaultColix()
drawLcaoCartoon
private void drawLcaoCartoon(javax.vecmath.Vector3f z,
javax.vecmath.Vector3f x,
javax.vecmath.Vector3f rotAxis)
createLcaoLobe
private void createLcaoLobe(javax.vecmath.Vector3f lobeAxis,
float factor)
invalidateTriangles
public void invalidateTriangles()
- Specified by:
invalidateTriangles in interface MeshDataServer
fillMeshData
public void fillMeshData(MeshData meshData,
int mode)
- Specified by:
fillMeshData in interface MeshDataServer
notifySurfaceGenerationCompleted
public void notifySurfaceGenerationCompleted()
- Specified by:
notifySurfaceGenerationCompleted in interface MeshDataServer
notifySurfaceMappingCompleted
public void notifySurfaceMappingCompleted()
- Specified by:
notifySurfaceMappingCompleted in interface MeshDataServer
calculateGeodesicSurface
public javax.vecmath.Point3f[] calculateGeodesicSurface(java.util.BitSet bsSelected,
float envelopeRadius)
- Specified by:
calculateGeodesicSurface in interface MeshDataServer
getSurfacePointIndex
public int getSurfacePointIndex(float cutoff,
boolean isCutoffAbsolute,
int x,
int y,
int z,
javax.vecmath.Point3i offset,
int vA,
int vB,
float valueA,
float valueB,
javax.vecmath.Point3f pointA,
javax.vecmath.Vector3f edgeVector,
boolean isContourType)
- Description copied from interface:
MeshDataServer
- 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. 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 && (fraction < 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:
getSurfacePointIndex in interface MeshDataServer- Specified by:
getSurfacePointIndex in interface VertexDataServer
vA - [0:7]vB - [0:7]edgeVector - vector from A to B
- Returns:
- new vertex index or Integer.MAX_VALUE
addVertexCopy
public int addVertexCopy(javax.vecmath.Point3f vertexXYZ,
float value,
int assocVertex)
- Description copied from interface:
MeshDataServer
- addVertexCopy 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:
addVertexCopy in interface MeshDataServer- Specified by:
addVertexCopy in interface VertexDataServer
assocVertex - unique association vertex or -1
- Returns:
- new vertex index
addTriangleCheck
public void addTriangleCheck(int iA,
int iB,
int iC,
int check,
boolean isAbsolute)
- Description copied from interface:
MeshDataServer
- 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)
- Specified by:
addTriangleCheck in interface MeshDataServer- Specified by:
addTriangleCheck in interface VertexDataServer
setModelIndex
private void setModelIndex()
setScriptInfo
protected void setScriptInfo()
setJvxlInfo
private void setJvxlInfo()
getShapeDetail
public java.util.Vector getShapeDetail()
- Overrides:
getShapeDetail in class Shape
remapColors
protected void remapColors()
- Overrides:
remapColors in class Shape
getUserColorScheme
private java.lang.String getUserColorScheme(java.lang.String schemeName)