org.jmol.shapesurface
Class IsosurfaceMesh
java.lang.Object
org.jmol.util.MeshSurface
org.jmol.shape.Mesh
org.jmol.shapesurface.IsosurfaceMesh
public class IsosurfaceMesh
- extends Mesh
Fields inherited from class org.jmol.shape.Mesh |
atomIndex, bitsets, cappingObject, checkByteCount, colorCommand, colorDensity, diameter, drawTriangles, fillTriangles, frontOnly, havePlanarContours, haveXyPoints, index, insideOut, isPolygonSet, isTwoSided, isValid, lattice, lighting, lineData, linkedMesh, meshColix, meshType, modelIndex, normixes, PREVIOUS_MESH_ID, ptCenter, scale, scriptCommand, showContourLines, showPoints, showTriangles, slabbingObject, thisID, title, vAB, vAC, visibilityFlags, visible, vTemp, width, xmlProperties |
Fields inherited from class org.jmol.util.MeshSurface |
bsFaces, colix, haveQuads, iA, iB, iC, isColorSolid, nSets, offsetVertices, polygonColixes, polygonCount, polygonIndexes, ptOffset, scale3d, SEED_COUNT, surfaceSet, vertexColixes, vertexCount, vertexNormals, vertexSets, vertexValues, vertices |
Method Summary |
static void |
addContourPoints(java.util.List v,
java.util.BitSet bsContour,
int i,
java.lang.StringBuffer fData,
javax.vecmath.Point3f[] vertices,
float[] vertexValues,
int iA,
int iB,
int iC,
float value)
|
(package private) int |
addVertexCopy(javax.vecmath.Point3f vertex,
float value,
int assocVertex,
boolean associateNormals)
|
(package private) void |
allocVertexColixes()
|
(package private) java.lang.Object |
calculateArea()
|
(package private) java.lang.Object |
calculateVolume()
|
private static float |
checkPt(float[] vertexValues,
int i,
int j,
float v)
two values -- v1, and v2, which need not be ordered v1 < v2. |
(package private) void |
clear(java.lang.String meshType,
boolean iAddGridPoints)
|
private void |
get3dContour(java.util.List v,
float value,
short colix)
|
(package private) javax.vecmath.Point3f[] |
getCenters()
|
(package private) java.util.Hashtable |
getContourList(Viewer viewer)
|
private static javax.vecmath.Point3f |
getContourPoint(javax.vecmath.Point3f[] vertices,
int i,
int j,
float f)
|
(package private) java.util.List[] |
getContours()
create a set of contour data. |
(package private) javax.vecmath.Point4f |
getFacePlane(int i,
javax.vecmath.Vector3f vNorm)
|
static void |
setContourVector(java.util.List v,
int nPolygons,
java.util.BitSet bsContour,
float value,
short colix,
int color,
java.lang.StringBuffer fData)
|
void |
setDiscreteColixes(float[] values,
short[] colixes)
|
void |
setTranslucent(boolean isTranslucent,
float iLevel)
|
protected void |
sumVertexNormals(javax.vecmath.Point3f[] vertices,
javax.vecmath.Vector3f[] vectorSums)
|
Methods inherited from class org.jmol.util.MeshSurface |
addPolygon, addQuad, addTriangle, addTriangleCheck, addVertexCopy, addVertexCopy, getIntersection, invalidatePolygons, setABC, setColix, setPolygonCount, slabPolygons |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
jvxlData
JvxlData jvxlData
vertexIncrement
int vertexIncrement
firstRealVertex
int firstRealVertex
dataType
int dataType
hasGridPoints
boolean hasGridPoints
calculatedArea
java.lang.Object calculatedArea
calculatedVolume
java.lang.Object calculatedVolume
isSolvent
public boolean isSolvent
assocGridPointMap
java.util.Hashtable assocGridPointMap
assocGridPointNormals
java.util.Hashtable assocGridPointNormals
thisSet
int thisSet
centers
javax.vecmath.Point3f[] centers
contourValues
float[] contourValues
contourColixes
short[] contourColixes
colorEncoder
ColorEncoder colorEncoder
IsosurfaceMesh
IsosurfaceMesh(java.lang.String thisID,
Graphics3D g3d,
short colix,
int index)
clear
void clear(java.lang.String meshType,
boolean iAddGridPoints)
allocVertexColixes
void allocVertexColixes()
addVertexCopy
int addVertexCopy(javax.vecmath.Point3f vertex,
float value,
int assocVertex,
boolean associateNormals)
setTranslucent
public void setTranslucent(boolean isTranslucent,
float iLevel)
- Overrides:
setTranslucent
in class Mesh
calculateArea
java.lang.Object calculateArea()
calculateVolume
java.lang.Object calculateVolume()
sumVertexNormals
protected void sumVertexNormals(javax.vecmath.Point3f[] vertices,
javax.vecmath.Vector3f[] vectorSums)
- Overrides:
sumVertexNormals
in class Mesh
getCenters
javax.vecmath.Point3f[] getCenters()
getFacePlane
javax.vecmath.Point4f getFacePlane(int i,
javax.vecmath.Vector3f vNorm)
getContours
java.util.List[] getContours()
- create a set of contour data.
Each contour is a List containing:
0 Integer number of polygons (length of BitSet)
1 BitSet of critical triangles
2 Float value
3 int[] [colorArgb]
4 StringBuffer containing encoded data for each segment:
char type ('3', '6', '5') indicating which two edges
of the triangle are connected:
'3' 0x011 AB-BC
'5' 0x101 AB-CA
'6' 0x110 BC-CA
char fraction along first edge (jvxlFractionToCharacter)
char fraction along second edge (jvxlFractionToCharacter)
5- stream of pairs of points for rendering
- Returns:
- contour vector set
get3dContour
private void get3dContour(java.util.List v,
float value,
short colix)
setContourVector
public static void setContourVector(java.util.List v,
int nPolygons,
java.util.BitSet bsContour,
float value,
short colix,
int color,
java.lang.StringBuffer fData)
addContourPoints
public static void addContourPoints(java.util.List v,
java.util.BitSet bsContour,
int i,
java.lang.StringBuffer fData,
javax.vecmath.Point3f[] vertices,
float[] vertexValues,
int iA,
int iB,
int iC,
float value)
checkPt
private static float checkPt(float[] vertexValues,
int i,
int j,
float v)
- two values -- v1, and v2, which need not be ordered v1 < v2.
v == v1 --> 0
v == v2 --> 1
v1 < v < v2 --> f in (0,1)
v2 < v < v1 --> f in (0,1)
i.e. (v1 < v) == (v < v2)
We check AB, then (usually) BC, then (sometimes) CA.
What if two end points are identical values?
So, for example, if v = 1.0 and:
A 1.0 0.5 1.0 1.0
/ \ / \ / \ / \ / \
/ \ / \ / \ / \ / \
C-----B 1.0--0.5 1.0--1.0 0.5--1.0 1.0---1.0
case I case II case III case IV
case I: AB[0] and BC[1], type == 3 --> CA not tested.
case II: AB[1] and CA[0]; f1 == 1.0 --> BC not tested.
case III: AB[0] and BC[0], type == 3 --> CA not tested.
case IV: AB[0] and BC[0], type == 3 --> CA not tested.
what if v = 0.5?
case I: AB[1]; BC not tested --> type == 1, invalid.
case II: AB[0]; type == 1, f1 == 0.0 --> CA not tested.
case III: BC[1]; f2 == 1.0 --> CA not tested.
- Parameters:
vertexValues
- i
- j
- v
-
- Returns:
- fraction along the edge or NaN
getContourPoint
private static javax.vecmath.Point3f getContourPoint(javax.vecmath.Point3f[] vertices,
int i,
int j,
float f)
setDiscreteColixes
public void setDiscreteColixes(float[] values,
short[] colixes)
getContourList
java.util.Hashtable getContourList(Viewer viewer)
- Parameters:
viewer
-
- Returns:
- a Hashtable containing "values" and "colors"