org.jmol.jvxl.readers
public abstract class SurfaceReader extends Object implements VertexDataServer
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowSigma |
(package private) static float |
ANGSTROMS_PER_BOHR |
protected float[] |
anisotropy |
private float |
assocCutoff |
protected Point3f |
center |
protected char |
cJvxlEdgeNaN |
protected int |
colorFractionBase |
protected int |
colorFractionRange |
private static String[] |
colorPhases |
protected int |
contourVertexCount |
protected float |
dataMax |
protected float |
dataMean |
protected float |
dataMin |
(package private) static float |
defaultCutoff |
(package private) static float |
defaultMappedDataMax |
(package private) static float |
defaultMappedDataMin |
protected Matrix3f |
eccentricityMatrix |
protected Matrix3f |
eccentricityMatrixInverse |
protected float |
eccentricityRatio |
protected float |
eccentricityScale |
private int |
edgeCount |
private String |
edgeData |
protected int |
edgeFractionBase |
protected int |
edgeFractionRange |
protected StringBuffer |
fractionData |
(package private) boolean |
hasColorData |
private boolean |
haveSetAnisotropy |
protected boolean |
haveSurfaceAtoms |
protected boolean |
isAnisotropic |
protected boolean |
isEccentric |
protected boolean |
isJvxl |
protected boolean |
isProgressive |
protected boolean |
isQuiet |
protected boolean |
isXLowToHigh |
protected String |
jvxlColorDataRead |
protected float |
jvxlCutoff |
protected JvxlData |
jvxlData |
protected boolean |
jvxlDataIs2dContour |
protected boolean |
jvxlDataIsColorDensity |
protected boolean |
jvxlDataIsColorMapped |
protected boolean |
jvxlDataIsPrecisionColor |
protected String |
jvxlEdgeDataRead |
protected StringBuffer |
jvxlFileHeaderBuffer |
protected int |
jvxlNSurfaceInts |
protected BitSet |
jvxlVoxelBitSet |
protected MarchingCubes |
marchingCubes |
protected MarchingSquares |
marchingSquares |
protected MeshData |
meshData |
protected MeshDataServer |
meshDataServer |
protected float[] |
minMax |
protected long |
nBytes |
protected int |
nDataPoints |
protected int |
nPointsX |
protected int |
nPointsY |
protected int |
nPointsZ |
protected Parameters |
params |
protected Point3f |
ptTemp |
protected QuantumPlaneCalculationInterface |
qpc |
protected SurfaceGenerator |
sg |
(package private) boolean |
vertexDataOnly |
protected VolumeData |
volumeData |
protected Point3f |
volumetricOrigin |
protected Vector3f[] |
volumetricVectors |
protected int[] |
voxelCounts |
protected float[][][] |
voxelData |
protected Point3f |
xyzMax |
protected Point3f |
xyzMin |
protected int |
yzCount |
protected float[][] |
yzPlanes |
Constructor and Description |
---|
SurfaceReader(SurfaceGenerator sg) |
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(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.
|
(package private) void |
applyColorScale() |
protected abstract void |
closeReader() |
private void |
colorData() |
(package private) void |
colorIsosurface() |
(package private) boolean |
createIsosurface(boolean justForPlane) |
(package private) void |
discardTempData(boolean discardAll) |
(package private) void |
excludeMaximumSet() |
(package private) void |
excludeMinimumSet() |
protected void |
finalizeMapping() |
private void |
generateSurfaceData() |
(package private) static int |
getColorPhaseIndex(String color) |
float[] |
getMinMaxMappedValues(boolean haveData) |
private float |
getPhase(Point3f pt) |
float[] |
getPlane(int x) |
int |
getSurfaceAtomIndex() |
protected float |
getSurfacePointAndFraction(float cutoff,
boolean isCutoffAbsolute,
float valueA,
float valueB,
Point3f pointA,
Vector3f edgeVector,
int x,
int y,
int z,
int vA,
int vB,
float[] fReturn,
Point3f ptReturn) |
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
|
float |
getValueAtPoint(Point3f pt) |
protected boolean |
gotoAndReadVoxelData(boolean isMapData) |
protected void |
gotoData(int n,
int nPoints) |
protected void |
initializeMapping() |
protected void |
initializeVolumetricData() |
protected void |
initPlanes() |
(package private) void |
jvxlUpdateInfo() |
protected void |
newVoxelDataCube() |
protected void |
postProcessVertices() |
(package private) boolean |
readAndSetVolumeParameters(boolean isMapData) |
protected String |
readColorData() |
protected abstract void |
readSurfaceData(boolean isMapData) |
protected abstract boolean |
readVolumeData(boolean isMapData) |
protected abstract boolean |
readVolumeParameters(boolean isMapData) |
(package private) void |
resetIsosurface() |
void |
selectPocket(boolean doExclude) |
private void |
setBoundingBox() |
protected void |
setBoundingBox(Point3f pt,
float margin) |
protected void |
setOutputStream(OutputStream os) |
protected void |
setVectorAnisotropy(Vector3f v) |
protected void |
setVertexAnisotropy(Point3f pt) |
protected void |
setVolumeData(VolumeData v) |
protected void |
setVolumetricAnisotropy() |
protected void |
setVolumetricOriginAnisotropy() |
void |
slabIsosurface(List<Object[]> slabInfo) |
(package private) void |
updateSurfaceData() |
(package private) void |
updateTriangles() |
protected SurfaceGenerator sg
protected MeshDataServer meshDataServer
protected Parameters params
protected MeshData meshData
protected JvxlData jvxlData
protected VolumeData volumeData
private String edgeData
protected boolean haveSurfaceAtoms
protected boolean allowSigma
protected boolean isProgressive
protected boolean isXLowToHigh
private float assocCutoff
protected boolean isQuiet
boolean vertexDataOnly
boolean hasColorData
protected float dataMin
protected float dataMax
protected float dataMean
protected Point3f xyzMin
protected Point3f xyzMax
protected Point3f center
protected float[] anisotropy
protected boolean isAnisotropic
protected Matrix3f eccentricityMatrix
protected Matrix3f eccentricityMatrixInverse
protected boolean isEccentric
protected float eccentricityScale
protected float eccentricityRatio
static final float ANGSTROMS_PER_BOHR
static final float defaultMappedDataMin
static final float defaultMappedDataMax
static final float defaultCutoff
private int edgeCount
protected Point3f volumetricOrigin
protected Vector3f[] volumetricVectors
protected int[] voxelCounts
protected float[][][] voxelData
protected long nBytes
protected int nDataPoints
protected int nPointsX
protected int nPointsY
protected int nPointsZ
protected boolean isJvxl
protected int edgeFractionBase
protected int edgeFractionRange
protected int colorFractionBase
protected int colorFractionRange
protected StringBuffer jvxlFileHeaderBuffer
protected StringBuffer fractionData
protected String jvxlEdgeDataRead
protected String jvxlColorDataRead
protected BitSet jvxlVoxelBitSet
protected boolean jvxlDataIsColorMapped
protected boolean jvxlDataIsPrecisionColor
protected boolean jvxlDataIs2dContour
protected boolean jvxlDataIsColorDensity
protected float jvxlCutoff
protected int jvxlNSurfaceInts
protected char cJvxlEdgeNaN
protected int contourVertexCount
protected MarchingSquares marchingSquares
protected MarchingCubes marchingCubes
protected float[][] yzPlanes
protected int yzCount
protected QuantumPlaneCalculationInterface qpc
protected final Point3f ptTemp
private static final String[] colorPhases
protected float[] minMax
private boolean haveSetAnisotropy
SurfaceReader(SurfaceGenerator sg)
protected abstract void closeReader()
protected void setOutputStream(OutputStream os)
os
- protected void newVoxelDataCube()
protected void setVolumeData(VolumeData v)
protected abstract boolean readVolumeParameters(boolean isMapData)
protected abstract boolean readVolumeData(boolean isMapData)
void jvxlUpdateInfo()
boolean readAndSetVolumeParameters(boolean isMapData)
boolean createIsosurface(boolean justForPlane)
void resetIsosurface()
void discardTempData(boolean discardAll)
protected void initializeVolumetricData()
protected abstract void readSurfaceData(boolean isMapData) throws Exception
Exception
protected boolean gotoAndReadVoxelData(boolean isMapData)
protected void gotoData(int n, int nPoints) throws Exception
n
- nPoints
- Exception
protected String readColorData()
public float[] getPlane(int x)
getPlane
in interface VertexDataServer
protected void initPlanes()
public float getValue(int x, int y, int z, int ptyz)
VertexDataServer
getValue
in interface VertexDataServer
private void generateSurfaceData()
protected void postProcessVertices()
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 Bprotected float getSurfacePointAndFraction(float cutoff, boolean isCutoffAbsolute, float valueA, float valueB, Point3f pointA, Vector3f edgeVector, int x, int y, int z, int vA, int vB, float[] fReturn, Point3f ptReturn)
cutoff
- isCutoffAbsolute
- valueA
- valueB
- pointA
- edgeVector
- x
- TODOy
- TODOz
- TODOvA
- vB
- fReturn
- ptReturn
- public 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
- TODOvoid colorIsosurface()
void applyColorScale()
private void colorData()
static int getColorPhaseIndex(String color)
private float getPhase(Point3f pt)
public float[] getMinMaxMappedValues(boolean haveData)
void updateTriangles()
void updateSurfaceData()
public void selectPocket(boolean doExclude)
doExclude
- void excludeMinimumSet()
void excludeMaximumSet()
protected void setVertexAnisotropy(Point3f pt)
protected void setVectorAnisotropy(Vector3f v)
protected void setVolumetricAnisotropy()
protected void setVolumetricOriginAnisotropy()
private void setBoundingBox()
protected void setBoundingBox(Point3f pt, float margin)
public float getValueAtPoint(Point3f pt)
pt
- protected void initializeMapping()
protected void finalizeMapping()
public int getSurfaceAtomIndex()