public class ArrayBasedHalfedge extends java.lang.Object implements HalfedgeInterface, NavigationInterface
Constructor and Description |
---|
ArrayBasedHalfedge(int nVertices,
int nHalfedges) |
Modifier and Type | Method and Description |
---|---|
int |
getEdge(int v)
Return a half edge incident to the vertex
|
int[] |
getNeighborsArray(int v)
Return the list of (geometric points) neighbors of a given vertex
|
int |
getNext(int e)
Return the following edge in ccw orientation around the same face
|
float[] |
getNormalFloat(int v)
Return the normal to a vertex in the mesh
Fast version with simple Float precision, with no use of Point_ interface
|
int |
getOpposite(int e)
Return the opposite edge in the neighboring face (having opposite direction)
|
float[] |
getPoint(int v)
Return geometric position of a vertex
|
int |
getPrev(int e)
Return the previous edge in ccw orientation around the same face
|
int |
getSource(int e)
Return the origin vertex incident to the half edge
|
int |
getTarget(int e)
Return the target vertex incident to the half edge
|
java.lang.String |
name()
Return the name of the data structure
|
void |
setEdge(int v,
int e) |
void |
setNext(int e,
int eNext) |
void |
setOpposite(int e,
int eOpposite)
Return the opposite of an half edge
|
void |
setPoint(int v,
float x,
float y,
float z) |
void |
setVertex(int e,
int v) |
int |
sizeOfHalfedges()
Return the number of half edges
|
int |
sizeOfVertices()
Return the number of vertices
|
java.lang.String |
vectorToString(float[] u) |
int |
vertexDegree(int v)
Return the degree of a given vertex
|
int |
vertexDegreeSlow(int v)
Return the degree of a given vertex
Slow version: with function calls
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
computeFaceNormal, crossProduct
public void setOpposite(int e, int eOpposite)
setOpposite
in interface HalfedgeInterface
public void setNext(int e, int eNext)
setNext
in interface HalfedgeInterface
public void setVertex(int e, int v)
setVertex
in interface HalfedgeInterface
public void setEdge(int v, int e)
setEdge
in interface HalfedgeInterface
public void setPoint(int v, float x, float y, float z)
setPoint
in interface HalfedgeInterface
public int getNext(int e)
getNext
in interface HalfedgeInterface
public int getOpposite(int e)
getOpposite
in interface HalfedgeInterface
public int getPrev(int e)
getPrev
in interface HalfedgeInterface
public int getTarget(int e)
getTarget
in interface TriangulationInterface
public int getSource(int e)
getSource
in interface TriangulationInterface
public int getEdge(int v)
getEdge
in interface TriangulationInterface
public float[] getPoint(int v)
getPoint
in interface TriangulationInterface
public int sizeOfVertices()
sizeOfVertices
in interface HalfedgeInterface
sizeOfVertices
in interface TriangulationInterface
public int sizeOfHalfedges()
sizeOfHalfedges
in interface HalfedgeInterface
public int[] getNeighborsArray(int v)
public int vertexDegree(int v)
vertexDegree
in interface NavigationInterface
public int vertexDegreeSlow(int v)
public float[] getNormalFloat(int v)
getNormalFloat
in interface NavigationInterface
public java.lang.String vectorToString(float[] u)
public java.lang.String name()
name
in interface NavigationInterface