JavaView© v3.95.000

jv.geom
Class PgUtil

java.lang.Object
  extended byjv.geom.PgUtil

public class PgUtil
extends java.lang.Object

Utility programs for geometry classes which operate on primitive data.


Constructor Summary
PgUtil()
           
 
Method Summary
static PiVector[] triangulate(PdVector[] polygon)
          Deprecated. use triangulate(PdVector[], int)
static PiVector[] triangulate(PdVector[] polygon, int numVertices)
          Triangulate a given simple closed, nearly planar polygon.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PgUtil

public PgUtil()
Method Detail

triangulate

public static PiVector[] triangulate(PdVector[] polygon,
                                     int numVertices)
Triangulate a given simple closed, nearly planar polygon. It is assumed that the 0-th and (numVertices-1)-th vertex are connected by an additional edge which closes the given sequence of vertices.

Method successively removes the vertex with the smallest interior angle. Method can handle non-convex polygons.

Polygon may have vertices of arbitrary ambient dimension larger than one. First and last vertex are implicitly connected to obtain a closed polygon.

ToDo: But until now it cannot handle situations where the edge introduced by removing a vertex intersects the polygon somewhere else. To solve this problem the above method checkTriangleCut must be employed.

Parameters:
polygon - Array with vertices described a closed polygon in R^n.
numVertices - Number of used entries in vertex array.
Since:
JavaView 2.36

triangulate

public static PiVector[] triangulate(PdVector[] polygon)
Deprecated. use triangulate(PdVector[], int)

Triangulate a given simple closed, nearly planar polygon. Method successively removes the vertex with the smallest interior angle. Method can handle non-convex polygons.

Polygon may have vertices of arbitrary ambient dimension larger than one. First and last vertex are implicitly connected to obtain a closed polygon.

ToDo: But until now it cannot handle situations where the edge introduced by removing a vertex intersects the polygon somewhere else. To solve this problem the above method checkTriangleCut must be employed.

Parameters:
polygon - Array with vertices described a closed polygon in R^n.

JavaView© v3.95.000

The software JavaView© is copyright protected. All Rights Reserved.