JavaView® v2.00.008

jv.geom
Class PgUtil

java.lang.Object
  |
  +--jv.object.PsObject
        |
        +--jv.geom.PgUtil
All Implemented Interfaces:
java.lang.Cloneable, PsUpdateIf, java.io.Serializable

public class PgUtil
extends PsObject

Utility programs for geometry classes which operate on primitive data.

Version:
10.09.98, 1.00 revised (kp)
10.09.98, 1.00 created (kp)
Author:
Konrad Polthier
See Also:
Serialized Form

Fields inherited from class jv.object.PsObject
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS
 
Constructor Summary
PgUtil()
           
 
Method Summary
static PiVector[] triangulate(PdVector[] polygon)
          Triangulate a given simple closed, nearly planar polygon.
 
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, hasInspector, hasTag, hasUpdateListener, init, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, update, updatePanels
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PgUtil

public PgUtil()
Method Detail

triangulate

public static PiVector[] triangulate(PdVector[] polygon)
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:
Array - with vertices described a closed polygon in R^n.

JavaView® v2.00.008

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