org.jmol.shapesurface
public class Isosurface extends MeshCollection implements MeshDataServer
Modifier and Type | Field and Description |
---|---|
private String |
actualID |
(package private) boolean |
allowMesh |
private boolean |
associateNormals |
private int |
atomIndex |
private Point3f |
center |
private float[] |
cutoffRange |
private short |
defaultColix |
private boolean |
explicitContours |
protected boolean |
iHaveBitSets |
private boolean |
iHaveModelIndex |
private boolean |
isColorExplicit |
private IsosurfaceMesh[] |
isomeshes |
private boolean |
isPhaseColored |
private boolean |
isWithinNot |
protected JvxlData |
jvxlData |
(package private) int[] |
keyXy |
private Point4f |
lcaoDir |
private static int |
MAX_OBJECT_CLICK_DISTANCE_SQUARED |
private short |
meshColix |
private float[] |
moLinearCombination |
private int |
moNumber |
private int |
nLCAO |
private Point3f |
offset |
private double |
privateKey |
private Point3i |
ptXY |
private float |
scale3d |
private String |
script |
private String |
scriptAppendix |
protected SurfaceGenerator |
sg |
protected IsosurfaceMesh |
thisMesh |
private float |
withinDistance2 |
private List<Point3f> |
withinPoints |
bsDisplay, colix, color, connections, currentMesh, displayWithinDistance2, displayWithinPoints, explicitID, htObjects, isDisplayWithinNot, isFixed, linkedMesh, meshCount, meshes, modelIndex, myType, nUnnamed, pickedMesh, pickedModel, pickedVertex, PREVIOUS_MESH_ID, previousMeshID, title
g3d, isBioShape, modelSet, myVisibilityFlag, RADIUS_MAX, shapeID, translucentAllowed, translucentLevel, viewer, xmlProperties
Constructor and Description |
---|
Isosurface() |
Modifier and Type | Method and Description |
---|---|
protected void |
addMeshInfo(IsosurfaceMesh mesh,
Map<String,Object> info) |
void |
addRequiredFile(String fileName) |
int |
addTriangleCheck(int iA,
int iB,
int iC,
int check,
int check2,
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)
|
int |
addVertexCopy(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(String thisID,
Mesh m) |
Point3f[] |
calculateGeodesicSurface(BitSet bsSelected,
float envelopeRadius) |
private Object |
calculateVolumeOrArea(boolean isArea) |
Map<String,Object> |
checkObjectClicked(int x,
int y,
int action,
BitSet bsVisible) |
boolean |
checkObjectHovered(int x,
int y,
BitSet bsVisible) |
protected void |
clearSg() |
private void |
createLcaoLobe(Vector3f lobeAxis,
float factor,
int nElectrons) |
protected void |
discardTempData(boolean discardAll) |
private void |
drawLcaoCartoon(Vector3f z,
Vector3f x,
Vector3f rotAxis,
int nElectrons) |
void |
fillMeshData(MeshData meshData,
int mode,
IsosurfaceMesh mesh) |
private String |
findValue(int x,
int y,
boolean isPicking,
BitSet bsVisible) |
protected void |
getCapSlabInfo(String script) |
private boolean |
getClosestNormal(IsosurfaceMesh m,
Point3f toPt,
Point3f ptRet,
Vector3f normalRet) |
private void |
getClosestPoint(IsosurfaceMesh m,
int imin,
Point3f toPt,
Point3f ptRet,
Vector3f normalRet) |
String |
getCmd(int index) |
private short |
getDefaultColix() |
private void |
getMeshCommand(StringBuffer sb,
int i) |
float[] |
getPlane(int x) |
static String |
getPolygonColorData(int ccount,
short[] colixes,
BitSet bsSlabDisplay) |
Object |
getProperty(String property,
int index) |
boolean |
getProperty(String property,
Object[] data) |
private boolean |
getScriptBitSets(String script,
BitSet[] bsCmd) |
List<Map<String,Object>> |
getShapeDetail() |
String |
getShapeState() |
int |
getSurfacePointIndexAndFraction(float cutoff,
boolean isCutoffAbsolute,
int x,
int y,
int z,
Point3i offset,
int vA,
int vB,
float valueA,
float valueB,
Point3f pointA,
Vector3f 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.
|
float |
getValue(int x,
int y,
int z,
int ptyz)
for readers only
|
private void |
hoverKey(int x,
int y) |
private void |
initializeIsosurface() |
void |
initShape() |
private void |
initState() |
void |
invalidateTriangles() |
private boolean |
isPickable(IsosurfaceMesh m,
BitSet bsVisible) |
void |
merge(Shape shape)
called by ParallelProcessor at completion
|
private void |
navigate(int dz) |
protected void |
newSg() |
void |
notifySurfaceGenerationCompleted() |
void |
notifySurfaceMappingCompleted() |
private void |
setBsVdw() |
private void |
setHeading(Point3f pt,
Vector3f vNorm,
int nSeconds) |
private void |
setJvxlInfo() |
private void |
setMesh() |
void |
setOutputStream(BinaryDocument binaryDoc,
OutputStream os) |
void |
setProperty(String propertyName,
Object value,
BitSet bs)
may come from any source -- executed AFTER a shape's own setProperty method
|
private void |
setPropertySuper(String propertyName,
Object value,
BitSet bs) |
protected void |
setScriptInfo(String strCommand) |
protected void |
slabPolygons(Object[] slabInfo) |
checkExplicit, clean, deleteMesh, deleteMesh, getIndexFromName, getMesh, getPickedPoint, setStatusPicked, setVisibilityFlags
appendCmd, checkBoundsMinMax, checkObjectDragged, coordinateInRange, encodeColor, findNearestAtomIndex, getColix, getColorCommand, getColorCommand, getFontCommand, getShapeCommands, getShapeCommands, getSize, getSize, getTranslucentLabel, getViewer, initializeShape, initModelSet, setColix, setColix, setColix, setModelClickability, setModelSet, setShapeProperty, setShapeSize, setSize, setSize, setStateInfo, setStateInfo, wasClicked
private IsosurfaceMesh[] isomeshes
protected IsosurfaceMesh thisMesh
private String actualID
protected boolean iHaveBitSets
private boolean explicitContours
private int atomIndex
private int moNumber
private float[] moLinearCombination
private short defaultColix
private short meshColix
private Point3f center
private Point3f offset
private float scale3d
private boolean isPhaseColored
private boolean isColorExplicit
private String scriptAppendix
protected SurfaceGenerator sg
protected JvxlData jvxlData
private float withinDistance2
private boolean isWithinNot
private float[] cutoffRange
boolean allowMesh
private String script
private boolean iHaveModelIndex
private int nLCAO
private Point4f lcaoDir
private double privateKey
private boolean associateNormals
private static final int MAX_OBJECT_CLICK_DISTANCE_SQUARED
private final Point3i ptXY
int[] keyXy
public void allocMesh(String thisID, Mesh m)
allocMesh
in class MeshCollection
public void initShape()
initShape
in class MeshCollection
protected void newSg()
protected void clearSg()
public void setProperty(String propertyName, Object value, BitSet bs)
Shape
setProperty
in class MeshCollection
protected void slabPolygons(Object[] slabInfo)
public boolean getProperty(String property, Object[] data)
getProperty
in class MeshCollection
public Object getProperty(String property, int index)
getProperty
in class MeshCollection
private Object calculateVolumeOrArea(boolean isArea)
public static String getPolygonColorData(int ccount, short[] colixes, BitSet bsSlabDisplay)
public String getShapeState()
getShapeState
in class Shape
private void getMeshCommand(StringBuffer sb, int i)
protected void getCapSlabInfo(String script)
private void initializeIsosurface()
private void initState()
private void setMesh()
protected void discardTempData(boolean discardAll)
private short getDefaultColix()
private void drawLcaoCartoon(Vector3f z, Vector3f x, Vector3f rotAxis, int nElectrons)
private void createLcaoLobe(Vector3f lobeAxis, float factor, int nElectrons)
public void invalidateTriangles()
invalidateTriangles
in interface MeshDataServer
public void setOutputStream(BinaryDocument binaryDoc, OutputStream os)
setOutputStream
in interface MeshDataServer
public void fillMeshData(MeshData meshData, int mode, IsosurfaceMesh mesh)
fillMeshData
in interface MeshDataServer
public void notifySurfaceGenerationCompleted()
notifySurfaceGenerationCompleted
in interface MeshDataServer
public void notifySurfaceMappingCompleted()
notifySurfaceMappingCompleted
in interface MeshDataServer
private void setBsVdw()
public Point3f[] calculateGeodesicSurface(BitSet bsSelected, float envelopeRadius)
calculateGeodesicSurface
in interface MeshDataServer
public int getSurfacePointIndexAndFraction(float cutoff, boolean isCutoffAbsolute, int x, int y, int z, Point3i offset, int vA, int vB, float valueA, float valueB, Point3f pointA, Vector3f edgeVector, boolean isContourType, float[] fReturn)
VertexDataServer
getSurfacePointIndexAndFraction
in interface VertexDataServer
vA
- [0:7]vB
- [0:7]edgeVector
- vector from A to Bpublic int addVertexCopy(Point3f vertexXYZ, float value, int assocVertex)
VertexDataServer
addVertexCopy
in interface VertexDataServer
assocVertex
- unique association vertex or -1public int addTriangleCheck(int iA, int iB, int iC, int check, int check2, boolean isAbsolute, int color)
VertexDataServer
addTriangleCheck
in interface VertexDataServer
check2
- TODOprotected void setScriptInfo(String strCommand)
public void addRequiredFile(String fileName)
addRequiredFile
in interface MeshDataServer
private void setJvxlInfo()
public List<Map<String,Object>> getShapeDetail()
getShapeDetail
in class Shape
protected void addMeshInfo(IsosurfaceMesh mesh, Map<String,Object> info)
public float[] getPlane(int x)
getPlane
in interface VertexDataServer
public float getValue(int x, int y, int z, int ptyz)
VertexDataServer
getValue
in interface VertexDataServer
public boolean checkObjectHovered(int x, int y, BitSet bsVisible)
checkObjectHovered
in class Shape
private void hoverKey(int x, int y)
public Map<String,Object> checkObjectClicked(int x, int y, int action, BitSet bsVisible)
checkObjectClicked
in class Shape
private boolean isPickable(IsosurfaceMesh m, BitSet bsVisible)
private void navigate(int dz)
private boolean getClosestNormal(IsosurfaceMesh m, Point3f toPt, Point3f ptRet, Vector3f normalRet)
private void getClosestPoint(IsosurfaceMesh m, int imin, Point3f toPt, Point3f ptRet, Vector3f normalRet)
private String findValue(int x, int y, boolean isPicking, BitSet bsVisible)
x
- y
- isPicking
- IGNOREDbsVisible
- public void merge(Shape shape)
MeshCollection
merge
in class MeshCollection
public String getCmd(int index)