public class ConvexPolygon3d extends Polygon3d
Constructor and Description |
---|
ConvexPolygon3d() |
ConvexPolygon3d(double[] coords) |
ConvexPolygon3d(Point3d[] pnts) |
Modifier and Type | Method and Description |
---|---|
double |
area() |
<P extends Point3d> |
computeAndSetHull(java.util.List<P> input,
Vector3d nrml,
double angTol)
Computes the convex hull, with respect to a given normal direction, of a
set of input points, and places its contents in this
Polygon3d . |
void |
computeCentroid(Vector3d centroid) |
static <P extends Point3d> |
computeHull(java.util.List<P> input,
Vector3d nrml,
double angTol)
Computes the convex hull, with respect to a given normal direction, of a
set of input points.
|
static <P extends Point3d> |
computeHullIndices(java.util.List<P> input,
Vector3d nrml,
double angTol)
Computes the indices of the convex hull, with respect to a given normal
direction, of a set of input points.
|
void |
computeNormal(Vector3d nrm) |
static <P extends Point3d> |
computeOld(java.util.Collection<P> input,
Vector3d nrml,
double tol)
Computes the convex hull, with respect to a given normal direction, of a
set of input points.
|
double |
getTolerance() |
void |
intersectHalfSpace(Plane plane) |
void |
setTolerance(double tol) |
addVertexAfter, appendVertex, clear, computeCentroid, computePlanarArea, epsilonEquals, equals, getBounds, getFirstVertex, getLastVertex, getMaxCoordinate, getPoints, getVertices, inverseTransform, isConvex, isConvex, isEmpty, iterator, numVertices, prependVertex, scan, set, set, set, set, toString, toString, toString, transform, updateBounds
public ConvexPolygon3d()
public ConvexPolygon3d(double[] coords)
public ConvexPolygon3d(Point3d[] pnts)
public double getTolerance()
public void setTolerance(double tol)
public double area()
public void computeCentroid(Vector3d centroid)
public void intersectHalfSpace(Plane plane)
public void computeNormal(Vector3d nrm)
public static <P extends Point3d> java.util.ArrayList<P> computeOld(java.util.Collection<P> input, Vector3d nrml, double tol)
public static <P extends Point3d> int[] computeHullIndices(java.util.List<P> input, Vector3d nrml, double angTol)
computeHull(java.util.List<P>, maspack.matrix.Vector3d, double)
for
details.input
- points from which to compute the hullnrml
- normal vector for the plane with respect to which
the hull should be computedangTol
- if > 0
, specifies an angular tolerance which should
be used to remove nearly colinear pointsinput
which
form the hull, in counter-clockwise orderpublic static <P extends Point3d> java.util.ArrayList<P> computeHull(java.util.List<P> input, Vector3d nrml, double angTol)
ConvexPolygon2d.computeHullIndices(java.util.Collection<maspack.matrix.Point2d>, double)
.
Point values along the normal are
ignored.input
- points from which to compute the hullnrml
- normal vector for the plane with respect to which
the hull should be computedangTol
- if > 0
, specifies an angular tolerance which should
be used to remove nearly colinear pointsinput
, which form the hull
in counter-clockwise orderpublic <P extends Point3d> void computeAndSetHull(java.util.List<P> input, Vector3d nrml, double angTol)
Polygon3d
.
See computeHull(List,Vector3d,double)
for details.input
- points from which to compute the hullnrml
- normal vector for the plane with respect to which
the hull should be computedangTol
- if > 0
, specifies an angular tolerance which should
be used to remove nearly colinear points