public class Scarst_ot extends CompactTriangleMesh
Modifier and Type | Field and Description |
---|---|
int[] |
A
Auxiliary array storing additional references for special edges (if needed)
|
TableWithFiveServiceBits |
table
Table storing the 'first references' and the service bits, for each edge
|
Constructor and Description |
---|
Scarst_ot(int n) |
Modifier and Type | Method and Description |
---|---|
boolean |
adjacent(int v,
int w)
Check whether two vertices 'v' and 'w' are adjacent.
|
boolean |
adjacentCW(int v,
int w)
Check whether two vertices 'v' and 'w' are adjacent.
|
int |
getAdditionalBit(int e)
return the additional 5th service bit (e.g.
|
int |
getEdge(int v)
Return an edge incident to vertex v
|
int |
getFirstRef(int e) |
int |
getLeftBackBit(int e) |
int |
getLeftFrontBit(int e) |
java.lang.String |
getMemoryCost()
Get the total memory cost for storing the combinatorial structure (no geometry)
|
float[] |
getNormalFloat(int v)
Return the normal to a vertex in the mesh (simple float precision)
Fast version with simple Float precision, with no use of Point_ interface
|
int |
getRightBackBit(int e) |
int |
getRightFrontBit(int e) |
int |
getSecondRef(int e) |
int |
getSource(int e)
Return the vertex source 'u' of edge 'e'=(u, v)
|
int |
getTarget(int e)
Return the target vertex 'v' of edge 'e'=(u, v)
|
boolean |
isOutgoing(int e,
int v)
Check whether edge e is outgoing from vertex v
|
int |
leftBack(int e)
Return the 'LeftBack' edge, neighbor of 'e'
|
int |
leftFront(int e)
Return the 'LeftFront' edge of the input edge 'e'.
|
int[] |
listing(int v)
Return an array storing all neighbors of vertex 'v'.
|
int[] |
listingCCW(int v)
Return an array storing all neighbors of vertex 'v'.
|
java.lang.String |
name()
Return the name of the data structure
|
static java.lang.String |
printEdge(int e) |
int |
rightBack(int e)
Return the 'RightBack' edge, neighbor of 'e'
|
int |
rightFront(int e)
Return the 'RightFront' edge, neighbor of 'e'
|
void |
setAdditionalBit(int e)
Store the fifth service bit of an edge: it encodes special cases (e.g.
|
void |
setFirstRef(int e,
int ref) |
void |
setLeftBackServiceBit(int e)
Set the first service bit of an edge: leftback is incoming.
|
void |
setLeftFrontServiceBit(int e) |
void |
setRightBackServiceBit(int e) |
void |
setRightFrontServiceBit(int e) |
int |
sizeOfEdges() |
int |
sizeOfVertices() |
java.lang.String |
toString()
Return a String which represents the reference table encoding of the data structure
|
int |
vertexDegree(int v)
Return the degree of a given vertex (cw direction)
|
int |
vertexDegreeCCW(int v)
Return the degree of a given vertex (ccw direction)
|
int |
vertexDegreeFast(int v)
Return the degree of a given vertex (cw direction)
|
getPoint, getX, getY, getZ, nextColor, prevColor, setPoint, vectorToString
public TableWithFiveServiceBits table
public int[] A
public void setFirstRef(int e, int ref)
public void setLeftBackServiceBit(int e)
public void setLeftFrontServiceBit(int e)
public void setRightBackServiceBit(int e)
public void setRightFrontServiceBit(int e)
public void setAdditionalBit(int e)
public int getFirstRef(int e)
public int getSecondRef(int e)
public int getLeftBackBit(int e)
public int getLeftFrontBit(int e)
public int getRightBackBit(int e)
public int getRightFrontBit(int e)
public int getAdditionalBit(int e)
public int sizeOfVertices()
public int sizeOfEdges()
public int leftFront(int e)
Every integer is encoded on 32 bits and stores two informations:
-) a reference on 30 bits (the index of the edge 'e')
-) 2 service bits (the two rightmost bits: less significant bits)
leftFront
in interface Jcg.mesh.arraybased.WingededgeInterface
leftFront
in class CompactTriangleMesh
e
- the index of the input edge 'e'public int rightFront(int e)
CompactTriangleMesh
rightFront
in interface Jcg.mesh.arraybased.WingededgeInterface
rightFront
in class CompactTriangleMesh
e
- an edgepublic int leftBack(int e)
CompactTriangleMesh
leftBack
in interface Jcg.mesh.arraybased.WingededgeInterface
leftBack
in class CompactTriangleMesh
e
- an edgepublic int rightBack(int e)
CompactTriangleMesh
rightBack
in interface Jcg.mesh.arraybased.WingededgeInterface
rightBack
in class CompactTriangleMesh
e
- an edgepublic int getSource(int e)
The 3 outgoing edges of vertex 'u' have numbers: 3u, 3u+1, 3u+2
getSource
in interface Jcg.mesh.arraybased.TriangulationInterface
getSource
in interface Jcg.mesh.arraybased.WingededgeInterface
getSource
in class CompactTriangleMesh
e
- the index of an edge (a number between 0..3n-1)public int getTarget(int e)
Remark
'optimized' implementation: it turns in cw direction for red edges, and turns in ccw direction for blue/clack edges.
getTarget
in interface Jcg.mesh.arraybased.TriangulationInterface
getTarget
in interface Jcg.mesh.arraybased.WingededgeInterface
getTarget
in class CompactTriangleMesh
e
- the index of an edge (a number between 0..3n-1)public int getEdge(int v)
CompactTriangleMesh
getEdge
in interface Jcg.mesh.arraybased.TriangulationInterface
getEdge
in class CompactTriangleMesh
v
- the index of the vertexpublic boolean isOutgoing(int e, int v)
isOutgoing
in interface Jcg.mesh.arraybased.WingededgeInterface
isOutgoing
in class CompactTriangleMesh
e
- an edgev
- the index of a vertexpublic int vertexDegree(int v)
public int vertexDegreeCCW(int v)
public int vertexDegreeFast(int v)
To check
public float[] getNormalFloat(int v)
public boolean adjacentCW(int v, int w)
public boolean adjacent(int v, int w)
public int[] listing(int v)
v
- index of a vertexpublic int[] listingCCW(int v)
v
- index of a vertexpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String name()
public java.lang.String getMemoryCost()
public static java.lang.String printEdge(int e)