public class PnPolygon
extends java.lang.Object
| Constructor and Description |
|---|
PnPolygon() |
| Modifier and Type | Method and Description |
|---|---|
static PdVector |
computeCurvature(PgPolygon poly,
PdVector curvature,
boolean integrated)
Computes the curvature of the given polygon.
|
static PdVector |
computeCurvature(PgPolygon poly,
PdVector curvature,
double integrationRadius)
Computes the curvature of the given polygon.
|
static PdVector[] |
computeCurvatureVectors(PgPolygon poly,
PdVector[] out)
Computes the vertex-based curvature vectors for a polygon whose length
is an approximation of the pointwise curvature via the tangens-formula:
roughly like: curvature = length(edge)*tan(outerangle/2).
|
static void |
computeEdgeLengths(PgPolygon poly,
PdVector es)
Computes the lengths of edges and stores them in the output array es.
|
static void |
computeFrenetFrame(PgPolygon poly)
Adds a Frenet frame as two vector fields to the polygon.
|
static PgFrame[] |
computeFrenetFrame(PgPolygon poly,
PgFrame[] vertframe)
Computes the Frenet frame for a given polygon.
|
static void |
computeParallelFrame(PgPolygon poly)
Adds a parallel frame as two vector fields to the polygon.
|
static PgFrame[] |
computeParallelFrame(PgPolygon poly,
PgFrame[] vertframe)
Computes a parallel moving frame for the given polygon with 'random' initial frame.
|
static void |
identifyVertices(PgPolygon poly)
Identifies successive vertices, whose distance is less than PuMath.EPS.
|
static void |
identifyVertices(PgPolygon poly,
double eps)
Identifies successive vertices, whose distance is less than eps.
|
static void |
reverse(PgPolygon polygon)
Reverses the order of the vertices of a given polygon.
|
public static PdVector computeCurvature(PgPolygon poly, PdVector curvature, boolean integrated)
poly - Polygon to compute the curvature of.curvature - Output. May be null. Resized to numVertices if smaller.integrated - If true, the integrated curvatures are calculated (length * k).public static PdVector computeCurvature(PgPolygon poly, PdVector curvature, double integrationRadius)
poly - Polygon to compute the curvature of.curvature - Output. May be null. Resized to numVertices if smaller.public static PdVector[] computeCurvatureVectors(PgPolygon poly, PdVector[] out)
poly - Polygon.out - Output, resized to numVertices if smaller. May be null.out (or newly allocated array) which
contains the vertex-based curvature vectors.public static void computeEdgeLengths(PgPolygon poly, PdVector es)
public static PgFrame[] computeFrenetFrame(PgPolygon poly, PgFrame[] vertframe)
public static PgFrame[] computeParallelFrame(PgPolygon poly, PgFrame[] vertframe)
vertframe - output, resized to numVertices if smaller; may be nullpublic static void computeParallelFrame(PgPolygon poly)
public static void computeFrenetFrame(PgPolygon poly)
public static void identifyVertices(PgPolygon poly)
public static void identifyVertices(PgPolygon poly, double eps)
public static void reverse(PgPolygon polygon)
"