Package org.jmol.util
Class MeshCapper.CapVertex
- java.lang.Object
-
- javajs.util.T3
-
- org.jmol.util.MeshCapper.CapVertex
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Comparator<MeshCapper.CapVertex>,javajs.api.JSONEncodable
- Enclosing class:
- MeshCapper
private class MeshCapper.CapVertex extends javajs.util.T3 implements java.lang.Cloneable, java.util.Comparator<MeshCapper.CapVertex>
A class to provide linked vertices for MeshCapper
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.Stringidfor debugging(package private) intiptexternal reference(package private) MeshCapper.CapVertexnextprotected intokunique vertex test(package private) MeshCapper.CapVertexprevedge double linksprotected MeshCapper.CapVertexqnextY-X scan queue forward link(package private) MeshCapper.CapVertex[]regiondynamic region pointers
-
Constructor Summary
Constructors Constructor Description CapVertex(javajs.util.T3 p, int i)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidclear()Free all links.MeshCapper.CapVertexcloneV()intcompare(MeshCapper.CapVertex v1, MeshCapper.CapVertex v2)private intdisable(MeshCapper.CapVertex v1, MeshCapper.CapVertex v2)private java.lang.StringdumpRegion()for debuggingprotected floatinterpolateX(MeshCapper.CapVertex v1, MeshCapper.CapVertex v2)Get interpolated x for the scan line intersection with an edge.protected voidlink(MeshCapper.CapVertex v)Link this vertex with v or remove it from the chain.MeshCapper.CapVertexsort(MeshCapper.CapVertex[] vs)Generate qnext links based on scanning Y large to Y small and if Y1==Y2, then X small to largejava.lang.StringtoString()Returns a string that contains the values of this Tuple3f.-
Methods inherited from class javajs.util.T3
add, add2, add3, ave, cross, distance, distanceSquared, dot, equals, hashCode, length, lengthSquared, normalize, scale, scaleAdd2, scaleT, set, setA, setT, sub, sub2, toJSON
-
-
-
-
Field Detail
-
ipt
int ipt
external reference
-
id
java.lang.String id
for debugging
-
qnext
protected MeshCapper.CapVertex qnext
Y-X scan queue forward link
-
prev
MeshCapper.CapVertex prev
edge double links
-
next
MeshCapper.CapVertex next
-
region
MeshCapper.CapVertex[] region
dynamic region pointers
-
ok
protected int ok
unique vertex test
-
-
Method Detail
-
cloneV
public MeshCapper.CapVertex cloneV()
-
sort
public MeshCapper.CapVertex sort(MeshCapper.CapVertex[] vs)
Generate qnext links based on scanning Y large to Y small and if Y1==Y2, then X small to large- Parameters:
vs-- Returns:
- null if there are two identical points (edge crossings)
-
compare
public int compare(MeshCapper.CapVertex v1, MeshCapper.CapVertex v2)
- Specified by:
comparein interfacejava.util.Comparator<MeshCapper.CapVertex>
-
disable
private int disable(MeshCapper.CapVertex v1, MeshCapper.CapVertex v2)
-
interpolateX
protected float interpolateX(MeshCapper.CapVertex v1, MeshCapper.CapVertex v2)
Get interpolated x for the scan line intersection with an edge. This method is used both in finding the last point for a split and for checking winding on same-side addition. determine- Parameters:
v1-v2-- Returns:
- x
-
link
protected void link(MeshCapper.CapVertex v)
Link this vertex with v or remove it from the chain.- Parameters:
v- null to remove
-
clear
protected void clear()
Free all links.
-
dumpRegion
private java.lang.String dumpRegion()
for debugging- Returns:
- listing of vertices currently in a region
-
toString
public java.lang.String toString()
Description copied from class:javajs.util.T3Returns a string that contains the values of this Tuple3f. The form is (x,y,z).- Overrides:
toStringin classjavajs.util.T3- Returns:
- the String representation
-
-