public class TetgenConvexHullTest
extends java.lang.Object
java maspack.geometry.TetgenConvexHullTestwill cause TetgenTessellator to be tested on a number of randomly choosen input sets, with degenerate points added near the edges and vertices of the convex hull.
The command
java maspack.geometry.TetgenConvexHullTest -timingwill cause timing information to be produced instead.
| Constructor and Description | 
|---|
| TetgenConvexHullTest()Creates a testing object. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | explicitAndRandomTests()Runs a set of explicit and random tests on TetgenTessellator,
 and prints  Passedto System.out if all is well. | 
| boolean | faceIndicesEqual(int[] indices1,
                int[] indices2)Returns true if two face index sets are equal,
 modulo a cyclical permuation. | 
| static void | main(java.lang.String[] args)Runs a set of tests on the TetgenTessellator class, and
 prints  Passedif all is well. | 
| double[] | randomCubedPoints(int num,
                 double range,
                 double max)Returns the coordinates for  numpoints whose x, y, and
 z values are each randomly chosen to lie within a specified
 range, and then clipped to a maximum absolute
 value. | 
| double[] | randomGridPoints(int gridSize,
                double width)Returns randomly shuffled coordinates for points on a
 three-dimensional grid, with a presecribed width between each point. | 
| double[] | randomPoints(int num,
            double range)Returns the coordinates for  numpoints whose x, y, and
 z values are randomly chosen within a given range. | 
| double[] | randomSphericalPoints(int num,
                     double radius)Returns the coordinates for  numpoints whose x, y, and
 z values are randomly chosen to lie within a sphere. | 
| void | timingTests()Runs timing tests on TetgenTessellator, and prints
 the results to System.out. | 
public boolean faceIndicesEqual(int[] indices1,
                                int[] indices2)
indices1 - index set for first faceindices2 - index set for second facepublic double[] randomPoints(int num,
                             double range)
num points whose x, y, and
 z values are randomly chosen within a given range.num - number of points to producerange - coordinate values will lie between -range and rangepublic double[] randomSphericalPoints(int num,
                                      double radius)
num points whose x, y, and
 z values are randomly chosen to lie within a sphere.num - number of points to produceradius - radius of the spherepublic double[] randomCubedPoints(int num,
                                  double range,
                                  double max)
num points whose x, y, and
 z values are each randomly chosen to lie within a specified
 range, and then clipped to a maximum absolute
 value. This means a large number of points
 may lie on the surface of cube, which is useful
 for creating degenerate convex hull situations.num - number of points to producerange - coordinate values will lie between -range and
 range, before clippingmax - maximum absolute value to which the coordinates
 are clippedpublic double[] randomGridPoints(int gridSize,
                                 double width)
gridSize - number of points in each direction,
 so that the total number of points produced is the cube of
 gridSize.width - distance between each point along a particular
 directionpublic void explicitAndRandomTests()
Passed to System.out if all is well.public void timingTests()
public static void main(java.lang.String[] args)
Passed if all is well.
 Otherwise, an error message and stack trace
 are printed.
 If the option -timing is supplied,
 then timing information is produced instead.