public class Polygon3dCalc
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Polygon3dCalc.Plane
Decsribes the dominant axis-aligned plane uses for computations.
|
Modifier and Type | Field and Description |
---|---|
boolean |
debug |
static int |
numOutsideAmbiguous |
static int |
numOutsideTests |
Constructor and Description |
---|
Polygon3dCalc() |
Polygon3dCalc(Vector3d nrm,
double dtol) |
Modifier and Type | Method and Description |
---|---|
double |
computeArea(Vector3d p0,
Vector3d p1,
Vector3d p2) |
boolean |
insideTriangle(Vector3d px,
Vector3d p0,
Vector3d p1,
Vector3d p2) |
boolean |
intersectsSegment(Point3d q0,
Point3d q1,
Vertex3dList poly,
double atol) |
boolean |
isConvex(Vertex3dList poly) |
boolean |
leftTurn(Vector3d p0,
Vector3d p1,
Vector3d p2,
double tol) |
void |
mergeHoles(Vertex3dList poly,
java.util.List<Vertex3dList> holes,
double atol) |
void |
nearestFeature(Polygon3dFeature feat,
Point3d px,
Vertex3dList poly,
int side) |
boolean |
rightTurn(Vector3d p0,
Vector3d p1,
Vector3d p2,
double tol) |
boolean |
segmentsIntersect(maspack.geometry.Polygon3dCalc.PolyNode node0,
maspack.geometry.Polygon3dCalc.PolyNode node1,
maspack.geometry.Polygon3dCalc.PolyNode nodep,
Vertex3dNode nodeh,
double atol) |
boolean |
segmentsIntersect(Vector3d p0,
Vector3d p1,
Vector3d p2,
Vector3d p3,
double atol,
boolean debug) |
boolean |
segmentsOverlap(Vector3d p0,
Vector3d p1,
Vector3d p2,
double atol) |
void |
setPlane(Vector3d nrm) |
void |
triangulate(java.util.ArrayList<Vertex3d> triVtxs,
java.lang.Iterable<Vertex3d> vtxs,
java.util.List<? extends java.lang.Iterable<Vertex3d>> holes) |
boolean |
triangulate(java.util.ArrayList<Vertex3d> triVtxs,
Vertex3dList poly,
java.util.List<Vertex3dList> holes)
Triangulation based roughly on "FIST: Fast Industrial Strength
Triangulation of Polygons", by Martin Held.
|
boolean |
vertexIsReflex(Vertex3dNode node) |
public boolean debug
public static int numOutsideTests
public static int numOutsideAmbiguous
public Polygon3dCalc()
public Polygon3dCalc(Vector3d nrm, double dtol)
public void setPlane(Vector3d nrm)
public boolean vertexIsReflex(Vertex3dNode node)
public boolean segmentsIntersect(maspack.geometry.Polygon3dCalc.PolyNode node0, maspack.geometry.Polygon3dCalc.PolyNode node1, maspack.geometry.Polygon3dCalc.PolyNode nodep, Vertex3dNode nodeh, double atol)
public boolean segmentsIntersect(Vector3d p0, Vector3d p1, Vector3d p2, Vector3d p3, double atol, boolean debug)
public void triangulate(java.util.ArrayList<Vertex3d> triVtxs, java.lang.Iterable<Vertex3d> vtxs, java.util.List<? extends java.lang.Iterable<Vertex3d>> holes)
public boolean isConvex(Vertex3dList poly)
public boolean triangulate(java.util.ArrayList<Vertex3d> triVtxs, Vertex3dList poly, java.util.List<Vertex3dList> holes)
public void nearestFeature(Polygon3dFeature feat, Point3d px, Vertex3dList poly, int side)
public boolean intersectsSegment(Point3d q0, Point3d q1, Vertex3dList poly, double atol)
public void mergeHoles(Vertex3dList poly, java.util.List<Vertex3dList> holes, double atol)