Modifier and Type | Field and Description |
---|---|
Tuple3f[] |
altVertices |
BS |
bsDisplay |
BS |
bsPolygons |
BS |
bsSlabDisplay |
BS |
bsSlabGhost |
BS |
bsTransPolygons |
private int |
checkCount |
short |
colix |
short |
colixBack |
private boolean |
doCap |
private boolean |
doClear |
private boolean |
doGhost |
boolean |
haveQuads |
protected int |
iA |
protected int |
iB |
protected int |
iC |
private int |
iD |
private int |
iE |
boolean |
isColorSolid |
boolean |
isMerged |
boolean |
isTriangleSet |
private short |
lastColix |
private int |
lastColor |
Matrix4f |
mat4 |
int |
mergePolygonCount0 |
int |
mergeVertexCount0 |
java.lang.String |
meshType |
int |
normalCount |
Tuple3f[] |
normals |
V3[] |
normalsTemp |
int |
normixCount |
int |
nSets |
P3 |
offset |
short[] |
polygonColixes |
int |
polygonCount |
int |
polygonCount0 |
int[][] |
polygonIndexes |
float[] |
polygonTranslucencies |
protected static int |
SEED_COUNT |
short |
slabColix |
int |
slabMeshType |
SB |
slabOptions |
V3[] |
spanningVectors |
BS[] |
surfaceSet |
short[] |
vertexColixes |
int |
vertexCount |
int |
vertexCount0 |
int[] |
vertexSets |
int[] |
vertexSource |
float[] |
vertexValues |
P3[] |
vertices |
Constructor and Description |
---|
MeshSurface() |
Modifier and Type | Method and Description |
---|---|
protected int |
addIntersectionVertex(P3 vertex,
float value,
int source,
int set,
java.util.Map<java.lang.String,java.lang.Integer> mapEdge,
int i1,
int i2) |
private int |
addPolygon(int[] polygon,
BS bs) |
protected int |
addPolygonC(int[] polygon,
int color,
BS bs) |
private int |
addPolygonV3(int vertexA,
int vertexB,
int vertexC,
int check,
int check2,
int color,
BS bs) |
void |
addQuad(int vertexA,
int vertexB,
int vertexC,
int vertexD) |
void |
addTriangle(int vertexA,
int vertexB,
int vertexC) |
int |
addTriangleCheck(int vertexA,
int vertexB,
int vertexC,
int check,
int check2,
int color) |
int |
addV(P3 vertex) |
int |
addVCVal(P3 vertex,
float value) |
private static float |
checkSlab(int tokType,
P3 v,
float val,
float distance,
P4 plane,
P3[] ptCenters,
BS bs) |
static java.lang.Object[] |
getCapSlabObject(java.lang.String s,
boolean isCap)
legacy -- for some scripts with early isosurface slabbing
|
private boolean |
getDE(float[] fracs,
int fD,
int i1,
int i2,
int i3,
boolean toss23) |
int[][] |
getFaces() |
void |
getIntersection(float distance,
P4 plane,
P3[] ptCenters,
JmolList<P3[]> vData,
float[] fData,
BS bsSource,
MeshSurface meshSurface,
boolean andCap,
boolean doClean,
int tokType,
boolean isGhost) |
java.lang.String |
getSlabColor() |
static java.lang.Object[] |
getSlabObject(int tok,
java.lang.Object data,
boolean isCap,
java.lang.Object colorData) |
java.lang.String |
getSlabTranslucency() |
java.lang.String |
getSlabType() |
static java.lang.Object[] |
getSlabWithinRange(float min,
float max) |
static MeshSurface |
getSphereData(int lvl)
Calculates the data (faces, vertices, normals) for a sphere.
|
static float |
getSphericalInterpolationFraction(double r,
double valueA,
double valueB,
double d) |
Tuple3f[] |
getVertices() |
private static P3 |
interpolateFraction(P3 v1,
P3 v2,
float f,
float val1,
float val2,
float[] values,
float[] fracs,
int i) |
private static P3 |
interpolatePoint(P3 v1,
P3 v2,
float d1,
float d2,
float val1,
float val2,
float[] values,
float[] fracs,
int i) |
private P3 |
interpolateSphere(P3 v1,
P3 v2,
float d1,
float d2,
double absD,
float val1,
float val2,
float[] values,
float[] fracs,
int i) |
void |
invalidatePolygons() |
private static float |
minDist(P3 pt,
P3[] ptCenters) |
static MeshSurface |
newMesh(boolean isAlt,
Tuple3f[] vertices,
int vertexCount,
int[][] polygonIndexes,
Tuple3f[] normals,
int nNormals) |
static MeshSurface |
newSlab(P3[] vertices,
int vertexCount,
float[] vertexValues,
int[][] polygonIndexes,
int polygonCount,
int checkCount) |
void |
resetSlab() |
void |
resetTransPolygons() |
protected boolean |
setABC(int i) |
void |
setColix(short colix) |
void |
setColixBack(short colix) |
private static int |
setPoint(float[] fracs,
int i,
int i0,
int i1) |
private void |
setPolygonColix(int index,
short colix) |
void |
setPolygonCount(int polygonCount) |
void |
setSlab(BS bsDisplay,
BS bsGhost,
java.lang.String type,
java.lang.String color,
float translucency) |
void |
setTranslucentVertices(BS bsVertices)
Must create bsTransPolygons, polygonTranslucencies,
and new triangle set for partially translucent polygons
|
protected void |
slabBrillouin(P3[] unitCellVectors) |
boolean |
slabPolygons(java.lang.Object[] slabObject,
boolean allowCap) |
void |
slabPolygonsList(JmolList<java.lang.Object[]> slabInfo,
boolean allowCap) |
protected static final int SEED_COUNT
public V3[] spanningVectors
public java.lang.String meshType
public int vertexCount
public P3[] vertices
public float[] vertexValues
public int[] vertexSource
public int polygonCount
public int[][] polygonIndexes
public float[] polygonTranslucencies
public boolean isTriangleSet
public boolean haveQuads
public short colix
public short colixBack
public boolean isColorSolid
public P3 offset
public Tuple3f[] altVertices
public short[] polygonColixes
public short[] vertexColixes
public Tuple3f[] normals
public V3[] normalsTemp
public int normalCount
public int normixCount
public BS bsPolygons
public Matrix4f mat4
public BS[] surfaceSet
public int[] vertexSets
public int nSets
private int checkCount
private int lastColor
private short lastColix
protected int iA
protected int iB
protected int iC
public int polygonCount0
public int vertexCount0
public BS bsSlabDisplay
public BS bsSlabGhost
public BS bsTransPolygons
public int slabMeshType
public short slabColix
public BS bsDisplay
public SB slabOptions
private boolean doClear
private boolean doGhost
private boolean doCap
private int iD
private int iE
public int mergeVertexCount0
public int mergePolygonCount0
public boolean isMerged
public static MeshSurface newMesh(boolean isAlt, Tuple3f[] vertices, int vertexCount, int[][] polygonIndexes, Tuple3f[] normals, int nNormals)
public static MeshSurface newSlab(P3[] vertices, int vertexCount, float[] vertexValues, int[][] polygonIndexes, int polygonCount, int checkCount)
public Tuple3f[] getVertices()
public int[][] getFaces()
public void setColix(short colix)
public void setColixBack(short colix)
public int addV(P3 vertex)
public void addTriangle(int vertexA, int vertexB, int vertexC)
public void addQuad(int vertexA, int vertexB, int vertexC, int vertexD)
public void setPolygonCount(int polygonCount)
public int addVCVal(P3 vertex, float value)
public int addTriangleCheck(int vertexA, int vertexB, int vertexC, int check, int check2, int color)
private int addPolygonV3(int vertexA, int vertexB, int vertexC, int check, int check2, int color, BS bs)
protected int addPolygonC(int[] polygon, int color, BS bs)
private int addPolygon(int[] polygon, BS bs)
private void setPolygonColix(int index, short colix)
public void invalidatePolygons()
protected boolean setABC(int i)
public void setTranslucentVertices(BS bsVertices)
bsVertices
- public void setSlab(BS bsDisplay, BS bsGhost, java.lang.String type, java.lang.String color, float translucency)
public java.lang.String getSlabColor()
public java.lang.String getSlabTranslucency()
public java.lang.String getSlabType()
public static java.lang.Object[] getSlabWithinRange(float min, float max)
public void resetTransPolygons()
public void resetSlab()
public static java.lang.Object[] getSlabObject(int tok, java.lang.Object data, boolean isCap, java.lang.Object colorData)
public static java.lang.Object[] getCapSlabObject(java.lang.String s, boolean isCap)
s
- isCap
- public void slabPolygonsList(JmolList<java.lang.Object[]> slabInfo, boolean allowCap)
public boolean slabPolygons(java.lang.Object[] slabObject, boolean allowCap)
protected void slabBrillouin(P3[] unitCellVectors)
unitCellVectors
- protected int addIntersectionVertex(P3 vertex, float value, int source, int set, java.util.Map<java.lang.String,java.lang.Integer> mapEdge, int i1, int i2)
public void getIntersection(float distance, P4 plane, P3[] ptCenters, JmolList<P3[]> vData, float[] fData, BS bsSource, MeshSurface meshSurface, boolean andCap, boolean doClean, int tokType, boolean isGhost)
distance
- a distance from a plane or pointplane
- a slabbing planeptCenters
- a set of atoms to measure distance fromvData
- when not null, this is a query, not an actual slabbingfData
- vertex values or other data to overlaybsSource
- TODOmeshSurface
- second surface; not implemented -- still some problems thereandCap
- to cap this off, crudely onlydoClean
- compact set - draw onlytokType
- type of slabisGhost
- translucent slab, so we mark slabbed trianglesprivate static int setPoint(float[] fracs, int i, int i0, int i1)
private boolean getDE(float[] fracs, int fD, int i1, int i2, int i3, boolean toss23)
private static float checkSlab(int tokType, P3 v, float val, float distance, P4 plane, P3[] ptCenters, BS bs)
private P3 interpolateSphere(P3 v1, P3 v2, float d1, float d2, double absD, float val1, float val2, float[] values, float[] fracs, int i)
private static P3 interpolatePoint(P3 v1, P3 v2, float d1, float d2, float val1, float val2, float[] values, float[] fracs, int i)
private static P3 interpolateFraction(P3 v1, P3 v2, float f, float val1, float val2, float[] values, float[] fracs, int i)
public static float getSphericalInterpolationFraction(double r, double valueA, double valueB, double d)
public static MeshSurface getSphereData(int lvl)
lvl
-