public class Polyhedron_3<X extends Point_>
extends java.lang.Object
for the Manipulation of an orientable surface
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<Face<X>> |
facets |
java.util.ArrayList<Halfedge<X>> |
halfedges |
java.util.ArrayList<Vertex<X>> |
vertices |
Constructor and Description |
---|
Polyhedron_3() |
Polyhedron_3(int n,
int e,
int f) |
Modifier and Type | Method and Description |
---|---|
Halfedge<X> |
addTriangleToBorder(Halfedge h,
X point)
creates a new triangle facet within the hole incident to h by connecting
the tip of h with two new halfedges and a new vertex.
|
void |
createCenterVertex(Face<X> f)
Split a face by inserting a new vertex
|
void |
DecorateVertices() |
java.lang.String |
edgesToString()
Return a string representing the list of faces
|
void |
eraseCenterVertex(Vertex<X> v)
replace the star of a vertex v by a new face
|
java.lang.String |
facesToString()
Return a string representing the list of faces
|
Halfedge<X> |
fillHole(Halfedge h) |
void |
flipEdge(Halfedge<X> e)
Perform the flip of an edge
|
int |
genus()
Return the genus of the mesh (given by Euler formula)
Warning: works only for meshes with one connected component
|
boolean |
isClosed()
returns true if there are no border edges
|
boolean |
isPureBivalent()
returns true if all vertices have exactly two incident edges
|
boolean |
isPureQuad()
true iff the every face is a quadrangle
|
boolean |
isPureTriangle()
true iff the every face is a triangle
|
boolean |
isPureTrivalent()
returns true if all vertices have exactly three incident edges
|
boolean |
isTriangle(Halfedge<X> h)
true iff the connected component denoted by h is a triangle
|
boolean |
isValid(boolean borders)
returns true if the polyhedral surface is combinatorially consistent.
|
Halfedge<X> |
makeHole(Halfedge<X> h) |
Halfedge<X> |
makeTriangle(X p1,
X p2,
X p3)
a triangle with border edges is added to the polyhedral surface.
|
int |
numberOfBoundaries()
Compute and return the number of boundaries
|
int |
sizeOfFacets() |
int |
sizeOfHalfedges() |
int |
sizeOfVertices() |
Halfedge<X> |
splitEdge(Halfedge<X> h,
X point)
splits the edge inserting a new vertex, with coordinates given by point.
|
Halfedge<X> |
splitFacet(Halfedge<X> h,
Halfedge<X> g)
splits the facet incident to h and g into two facets with a new diagonal
between the two vertices denoted by h and g respectively.
|
int |
vertexDegree(Vertex<X> v)
compute the degree of a vertex
|
java.lang.String |
verticesToString()
Return a string representing the list of vertices
|
public Polyhedron_3()
public Polyhedron_3(int n, int e, int f)
public void DecorateVertices()
public int sizeOfVertices()
public int sizeOfFacets()
public int sizeOfHalfedges()
public boolean isClosed()
public boolean isPureBivalent()
public boolean isPureTrivalent()
public boolean isPureTriangle()
public boolean isPureQuad()
public boolean isTriangle(Halfedge<X> h)
public int genus()
public int numberOfBoundaries()
public boolean isValid(boolean borders)
public void eraseCenterVertex(Vertex<X> v)
public Halfedge<X> addTriangleToBorder(Halfedge h, X point)
public Halfedge<X> makeTriangle(X p1, X p2, X p3)
public Halfedge<X> splitFacet(Halfedge<X> h, Halfedge<X> g)
public Halfedge<X> splitEdge(Halfedge<X> h, X point)
public java.lang.String verticesToString()
public java.lang.String facesToString()
public java.lang.String edgesToString()