public class Isosurface extends MeshCollection implements MeshDataServer
Modifier and Type | Field and Description |
---|---|
private boolean |
associateNormals |
private int |
atomIndex |
private javax.vecmath.Point3f |
center |
private short |
defaultColix |
private boolean |
explicitContours |
private boolean |
iHaveBitSets |
private int |
indexColorNegative |
private int |
indexColorPositive |
private boolean |
isColorExplicit |
private IsosurfaceMesh[] |
isomeshes |
private boolean |
isPhaseColored |
protected JvxlData |
jvxlData |
private javax.vecmath.Point4f |
lcaoDir |
private int |
lighting |
private static int |
MAX_OBJECT_CLICK_DISTANCE_SQUARED |
private short |
meshColix |
private int |
moNumber |
private int |
nLCAO |
private javax.vecmath.Point3f |
offset |
private javax.vecmath.Point3i |
ptXY |
private float |
scale3d |
protected SurfaceGenerator |
sg |
protected IsosurfaceMesh |
thisMesh |
private float |
withinDistance |
private java.util.List |
withinPoints |
actualID, allowContourLines, allowMesh, colix, currentMesh, explicitID, haveContours, htObjects, iHaveModelIndex, isFixed, linkedMesh, meshCount, meshes, modelCount, modelIndex, myType, nUnnamed, pickedMesh, pickedModel, pickedVertex, previousMeshID, script, title
g3d, isBioShape, modelSet, myVisibilityFlag, RADIUS_MAX, shapeID, translucentAllowed, translucentLevel, viewer, xmlProperties
Constructor and Description |
---|
Isosurface() |
Modifier and Type | Method and Description |
---|---|
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(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,
Mesh m) |
javax.vecmath.Point3f[] |
calculateGeodesicSurface(java.util.BitSet bsSelected,
float envelopeRadius) |
Point3fi |
checkObjectClicked(int x,
int y,
int action,
java.util.BitSet bsVisible) |
boolean |
checkObjectHovered(int x,
int y,
java.util.BitSet bsVisible) |
private boolean |
checkWithin(javax.vecmath.Point3f pti) |
protected void |
clearSg() |
private void |
createLcaoLobe(javax.vecmath.Vector3f lobeAxis,
float factor,
int nElectrons) |
private void |
discardTempData(boolean discardAll) |
private void |
drawLcaoCartoon(javax.vecmath.Vector3f z,
javax.vecmath.Vector3f x,
javax.vecmath.Vector3f rotAxis,
int nElectrons) |
void |
fillMeshData(MeshData meshData,
int mode,
IsosurfaceMesh mesh) |
private java.lang.String |
findValue(int x,
int y,
boolean isPicking,
java.util.BitSet bsVisible) |
protected void |
getCapSlabInfo(java.lang.String script) |
private java.lang.Object |
getCapSlabObject(int i,
java.lang.String script) |
private boolean |
getClosestNormal(IsosurfaceMesh m,
javax.vecmath.Point3f toPt,
javax.vecmath.Point3f ptRet,
javax.vecmath.Vector3f normalRet) |
private void |
getClosestPoint(IsosurfaceMesh m,
int imin,
javax.vecmath.Point3f toPt,
javax.vecmath.Point3f ptRet,
javax.vecmath.Vector3f normalRet) |
private void |
getColorState(java.lang.StringBuffer sb,
Mesh mesh) |
private short |
getDefaultColix() |
private void |
getMeshCommand(java.lang.StringBuffer sb,
int i) |
void |
getPlane(int x) |
static java.lang.String |
getPolygonColorData(int ccount,
short[] colixes) |
java.lang.Object |
getProperty(java.lang.String property,
int index) |
boolean |
getProperty(java.lang.String property,
java.lang.Object[] data) |
private boolean |
getScriptBitSets(java.lang.String script,
java.util.BitSet[] bsCmd) |
java.util.List |
getShapeDetail() |
java.lang.String |
getShapeState() |
int |
getSurfacePointIndexAndFraction(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,
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 |
initializeIsosurface() |
void |
initShape() |
private void |
initState() |
void |
invalidateTriangles() |
private boolean |
isPickable(IsosurfaceMesh m,
java.util.BitSet bsVisible) |
void |
merge(Shape shape)
called by ParallelProcessor at completion
|
private void |
navigate(int dz) |
private void |
newSg() |
void |
notifySurfaceGenerationCompleted() |
void |
notifySurfaceMappingCompleted() |
private void |
remapColors(ColorEncoder ce) |
private void |
setColorCommand(ColorEncoder ce) |
private void |
setHeading(javax.vecmath.Point3f pt,
javax.vecmath.Vector3f vNorm,
int nSeconds) |
private void |
setJvxlInfo() |
private void |
setModelIndex() |
void |
setProperty(java.lang.String propertyName,
java.lang.Object value,
java.util.BitSet bs)
may come from any source -- executed AFTER a shape's own setProperty method
|
private void |
setPropertySuper(java.lang.String propertyName,
java.lang.Object value,
java.util.BitSet bs) |
protected void |
setScriptInfo(java.lang.String strCommand) |
checkExplicit, clean, deleteMesh, deleteMesh, getIndexFromName, getMesh, getModelIndex, setModelIndex, setStatusPicked, setVisibilityFlags
appendCmd, checkBoundsMinMax, checkObjectDragged, coordinateInRange, findNearestAtomIndex, getColix, getColorCommand, getColorCommand, getFontCommand, getShapeCommands, getShapeCommands, getSize, getSize, getViewer, initializeShape, initModelSet, setColix, setColix, setColix, setModelClickability, setModelSet, setShapeProperty, setShapeSize, setSize, setSize, setStateInfo, setStateInfo, wasClicked
private IsosurfaceMesh[] isomeshes
protected IsosurfaceMesh thisMesh
private int lighting
private boolean iHaveBitSets
private boolean explicitContours
private int atomIndex
private int moNumber
private short defaultColix
private short meshColix
private javax.vecmath.Point3f center
private javax.vecmath.Point3f offset
private float scale3d
private boolean isPhaseColored
private boolean isColorExplicit
protected SurfaceGenerator sg
protected JvxlData jvxlData
private float withinDistance
private java.util.List withinPoints
private int indexColorPositive
private int indexColorNegative
private int nLCAO
private javax.vecmath.Point4f lcaoDir
private boolean associateNormals
private static final int MAX_OBJECT_CLICK_DISTANCE_SQUARED
private final javax.vecmath.Point3i ptXY
public void allocMesh(java.lang.String thisID, Mesh m)
allocMesh
in class MeshCollection
public void initShape()
initShape
in class MeshCollection
private void newSg()
protected void clearSg()
public void setProperty(java.lang.String propertyName, java.lang.Object value, java.util.BitSet bs)
Shape
setProperty
in class MeshCollection
private void setPropertySuper(java.lang.String propertyName, java.lang.Object value, java.util.BitSet bs)
public boolean getProperty(java.lang.String property, java.lang.Object[] data)
getProperty
in class MeshCollection
public java.lang.Object getProperty(java.lang.String property, int index)
getProperty
in class MeshCollection
public static java.lang.String getPolygonColorData(int ccount, short[] colixes)
public java.lang.String getShapeState()
getShapeState
in class Shape
private void getMeshCommand(java.lang.StringBuffer sb, int i)
private void getColorState(java.lang.StringBuffer sb, Mesh mesh)
private boolean getScriptBitSets(java.lang.String script, java.util.BitSet[] bsCmd)
protected void getCapSlabInfo(java.lang.String script)
private java.lang.Object getCapSlabObject(int i, java.lang.String script)
private void initializeIsosurface()
private void initState()
private void discardTempData(boolean discardAll)
private short getDefaultColix()
private void drawLcaoCartoon(javax.vecmath.Vector3f z, javax.vecmath.Vector3f x, javax.vecmath.Vector3f rotAxis, int nElectrons)
private void createLcaoLobe(javax.vecmath.Vector3f lobeAxis, float factor, int nElectrons)
public void invalidateTriangles()
invalidateTriangles
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 setColorCommand(ColorEncoder ce)
public javax.vecmath.Point3f[] calculateGeodesicSurface(java.util.BitSet bsSelected, float envelopeRadius)
calculateGeodesicSurface
in interface MeshDataServer
public int getSurfacePointIndexAndFraction(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, float[] fReturn)
VertexDataServer
getSurfacePointIndexAndFraction
in interface VertexDataServer
vA
- [0:7]vB
- [0:7]edgeVector
- vector from A to Bpublic int addVertexCopy(javax.vecmath.Point3f vertexXYZ, float value, int assocVertex)
VertexDataServer
addVertexCopy
in interface VertexDataServer
assocVertex
- unique association vertex or -1private boolean checkWithin(javax.vecmath.Point3f pti)
public int addTriangleCheck(int iA, int iB, int iC, int check, int check2, boolean isAbsolute, int color)
VertexDataServer
addTriangleCheck
in interface VertexDataServer
check2
- TODOprivate void setModelIndex()
protected void setScriptInfo(java.lang.String strCommand)
private void setJvxlInfo()
public java.util.List getShapeDetail()
getShapeDetail
in class Shape
private void remapColors(ColorEncoder ce)
public void 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, java.util.BitSet bsVisible)
checkObjectHovered
in class Shape
public Point3fi checkObjectClicked(int x, int y, int action, java.util.BitSet bsVisible)
checkObjectClicked
in class Shape
private boolean isPickable(IsosurfaceMesh m, java.util.BitSet bsVisible)
private void navigate(int dz)
private void setHeading(javax.vecmath.Point3f pt, javax.vecmath.Vector3f vNorm, int nSeconds)
private boolean getClosestNormal(IsosurfaceMesh m, javax.vecmath.Point3f toPt, javax.vecmath.Point3f ptRet, javax.vecmath.Vector3f normalRet)
private void getClosestPoint(IsosurfaceMesh m, int imin, javax.vecmath.Point3f toPt, javax.vecmath.Point3f ptRet, javax.vecmath.Vector3f normalRet)
private java.lang.String findValue(int x, int y, boolean isPicking, java.util.BitSet bsVisible)
public void merge(Shape shape)
MeshCollection
merge
in class MeshCollection