public class IterativeTutteLayout
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean[] |
isInside
says whether a vertex in an inner vertex and thus must be drawn (boolean array of size 'n')
|
boolean[] |
isOnBoundary
says whether a vertex belongs to the exterior boundary
|
Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> |
mesh
input mesh to draw (with 'n' vertices)
|
int |
n
number of vertices
|
int |
nBoundaryVertices
number of the boundary vertices of the graph (on the outer cycle)
|
Jcg.geometry.Point_2[] |
points
2D positions of the vertices of the mesh giving the layout (to be computed)
|
Constructor and Description |
---|
IterativeTutteLayout(Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> mesh,
int faceIndex)
Initialize the class fields
|
Modifier and Type | Method and Description |
---|---|
void |
oneIteration()
Perform one iteration iterative barycentric method
|
void |
projectVertices()
Map each vertex (in the 3D mesh) to the 2D coordinates corresponding to a planar 2D layout
Each vertex v is assigned the coordinates (x, y, 0.), where 'x' and 'y' are the planar coordinates
|
public int n
public Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> mesh
public boolean[] isInside
public boolean[] isOnBoundary
public Jcg.geometry.Point_2[] points
public int nBoundaryVertices
public IterativeTutteLayout(Jcg.polyhedron.Polyhedron_3<Jcg.geometry.Point_3> mesh, int faceIndex)
public void oneIteration()
public void projectVertices()