Modifier and Type | Field and Description |
---|---|
javajs.util.T3[] |
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 |
javajs.util.M4 |
mat4 |
int |
mergePolygonCount0 |
int |
mergeVertexCount0 |
String |
meshType |
int |
normalCount |
javajs.util.T3[] |
normals |
javajs.util.V3[] |
normalsTemp |
int |
normixCount |
int |
nSets |
javajs.util.P3 |
offset |
short[] |
polygonColixes |
int |
polygonCount |
int |
polygonCount0 |
int[][] |
polygonIndexes |
float[] |
polygonTranslucencies |
protected static int |
SEED_COUNT |
short |
slabColix |
int |
slabMeshType |
javajs.util.SB |
slabOptions |
javajs.util.V3[] |
spanningVectors |
BS[] |
surfaceSet |
short[] |
vertexColixes |
int |
vertexCount |
int |
vertexCount0 |
int[] |
vertexSets |
int[] |
vertexSource |
float[] |
vertexValues |
javajs.util.P3[] |
vertices |
Constructor and Description |
---|
MeshSurface() |
Modifier and Type | Method and Description |
---|---|
protected int |
addIntersectionVertex(javajs.util.P3 vertex,
float value,
int source,
int set,
Map<String,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(javajs.util.P3 vertex) |
int |
addVCVal(javajs.util.P3 vertex,
float value) |
private static float |
checkSlab(int tokType,
javajs.util.P3 v,
float val,
float distance,
javajs.util.P4 plane,
javajs.util.P3[] ptCenters,
BS bs) |
static Object[] |
getCapSlabObject(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,
javajs.util.P4 plane,
javajs.util.P3[] ptCenters,
javajs.util.List<javajs.util.P3[]> vData,
float[] fData,
BS bsSource,
MeshSurface meshSurface,
boolean andCap,
boolean doClean,
int tokType,
boolean isGhost) |
String |
getSlabColor() |
String |
getSlabTranslucency() |
String |
getSlabType() |
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) |
javajs.util.T3[] |
getVertices() |
private static javajs.util.P3 |
interpolateFraction(javajs.util.P3 v1,
javajs.util.P3 v2,
float f,
float val1,
float val2,
float[] values,
float[] fracs,
int i) |
private static javajs.util.P3 |
interpolatePoint(javajs.util.P3 v1,
javajs.util.P3 v2,
float d1,
float d2,
float val1,
float val2,
float[] values,
float[] fracs,
int i) |
private javajs.util.P3 |
interpolateSphere(javajs.util.P3 v1,
javajs.util.P3 v2,
float d1,
float d2,
double absD,
float val1,
float val2,
float[] values,
float[] fracs,
int i) |
void |
invalidatePolygons() |
private static float |
minDist(javajs.util.P3 pt,
javajs.util.P3[] ptCenters) |
static MeshSurface |
newMesh(boolean isAlt,
javajs.util.T3[] vertices,
int vertexCount,
int[][] polygonIndexes,
javajs.util.T3[] normals,
int nNormals) |
static MeshSurface |
newSlab(javajs.util.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,
String type,
String color,
float translucency) |
void |
setTranslucentVertices(BS bsVertices)
Must create bsTransPolygons, polygonTranslucencies,
and new triangle set for partially translucent polygons
|
protected void |
slabBrillouin(javajs.util.P3[] unitCellVectors) |
boolean |
slabPolygons(Object[] slabObject,
boolean allowCap) |
void |
slabPolygonsList(javajs.util.List<Object[]> slabInfo,
boolean allowCap) |
protected static final int SEED_COUNT
public javajs.util.V3[] spanningVectors
public String meshType
public int vertexCount
public javajs.util.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 javajs.util.P3 offset
public javajs.util.T3[] altVertices
public short[] polygonColixes
public short[] vertexColixes
public javajs.util.T3[] normals
public javajs.util.V3[] normalsTemp
public int normalCount
public int normixCount
public BS bsPolygons
public javajs.util.M4 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 javajs.util.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, javajs.util.T3[] vertices, int vertexCount, int[][] polygonIndexes, javajs.util.T3[] normals, int nNormals)
public static MeshSurface newSlab(javajs.util.P3[] vertices, int vertexCount, float[] vertexValues, int[][] polygonIndexes, int polygonCount, int checkCount)
public javajs.util.T3[] getVertices()
public int[][] getFaces()
public void setColix(short colix)
public void setColixBack(short colix)
public int addV(javajs.util.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(javajs.util.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, String type, String color, float translucency)
public String getSlabColor()
public String getSlabTranslucency()
public String getSlabType()
public void resetTransPolygons()
public void resetSlab()
public static Object[] getCapSlabObject(String s, boolean isCap)
s
- isCap
- public void slabPolygonsList(javajs.util.List<Object[]> slabInfo, boolean allowCap)
public boolean slabPolygons(Object[] slabObject, boolean allowCap)
protected void slabBrillouin(javajs.util.P3[] unitCellVectors)
unitCellVectors
- protected int addIntersectionVertex(javajs.util.P3 vertex, float value, int source, int set, Map<String,Integer> mapEdge, int i1, int i2)
public void getIntersection(float distance, javajs.util.P4 plane, javajs.util.P3[] ptCenters, javajs.util.List<javajs.util.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, javajs.util.P3 v, float val, float distance, javajs.util.P4 plane, javajs.util.P3[] ptCenters, BS bs)
private static float minDist(javajs.util.P3 pt, javajs.util.P3[] ptCenters)
private javajs.util.P3 interpolateSphere(javajs.util.P3 v1, javajs.util.P3 v2, float d1, float d2, double absD, float val1, float val2, float[] values, float[] fracs, int i)
private static javajs.util.P3 interpolatePoint(javajs.util.P3 v1, javajs.util.P3 v2, float d1, float d2, float val1, float val2, float[] values, float[] fracs, int i)
private static javajs.util.P3 interpolateFraction(javajs.util.P3 v1, javajs.util.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
-