public class Polyhedron_3<X extends Point_>
extends java.lang.Object
This is a 'minimal' space-efficient implementation: faces are not represented
for the Manipulation of an orientable surface
Modifier and Type | Field and Description |
---|---|
float[] |
coordF |
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 |
---|---|
void |
DecorateVertices() |
java.lang.String |
edgesToString()
Return a string representing the list of faces
|
float[] |
getPoint(int v)
Return the geometric coordinates of vertex v
|
float |
getX(int v)
Return the x-coordinate of vertex v
|
float |
getY(int v)
Return the y-coordinate of vertex v
|
float |
getZ(int v)
Return the z-coordinate of vertex v
|
boolean |
isPureBivalent()
returns true if all vertices have exactly two incident edges
|
boolean |
isPureTriangle()
true iff the every face is a triangle
|
boolean |
isPureTrivalent()
returns true if all vertices have exactly three incident edges
|
boolean |
isValid(boolean borders)
returns true if the polyhedral surface is combinatorially consistent.
|
void |
resetMeshIndices()
Reset indices for all: vertices, faces and halfedges.
|
void |
setPoint(int v,
float x,
float y,
float z)
Set the geometric coordinates of vertex v
|
int |
sizeOfHalfedges() |
int |
sizeOfVertices() |
int |
vertexDegree(Vertex<X> v)
compute the degree of a vertex
|
java.lang.String |
vertexToString(Vertex v)
Return a string representing the list of vertices
|
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 sizeOfHalfedges()
public boolean isPureBivalent()
public boolean isPureTrivalent()
public boolean isPureTriangle()
public boolean isValid(boolean borders)
public void resetMeshIndices()
Indices correspond to the order of storage in the collections (e.g., vertex v0 is the first in the ArrayList 'vertices')
public java.lang.String verticesToString()
public java.lang.String vertexToString(Vertex v)
public java.lang.String edgesToString()
public float[] getPoint(int v)
v
- the index of the vertexpublic void setPoint(int v, float x, float y, float z)
v
- the index of the vertexpublic float getX(int v)
public float getY(int v)
public float getZ(int v)