public class PointCloud_3 extends PointCloud<Point_3>
Constructor and Description |
---|
PointCloud_3()
Create a new empty point cloud
|
PointCloud_3(java.util.ArrayList<Point_3> points)
Create a new point cloud (a copy) from a collection of points
|
PointCloud_3(int n)
Create a point cloud of size n
|
Modifier and Type | Method and Description |
---|---|
Point_3[] |
boundingBox()
Compute the bounding box (enclosing all points)
|
Point_3 |
max(int d)
Return the point with greatest coordinate value (in direction d)
|
Point_3 |
min(int d)
Return the point with smallest coordinate value (in direction d)
|
static PointCloud_3 |
pointsInSphere(int n)
Generate points inside a sphere at random
|
add, dimension, listOfPoints, remove, size
public PointCloud_3()
public PointCloud_3(int n)
n
- number of pointspublic PointCloud_3(java.util.ArrayList<Point_3> points)
points
- list of points (stored as an ArrayList)public Point_3[] boundingBox()
boundingBox
in class PointCloud<Point_3>
public Point_3 max(int d)
max
in class PointCloud<Point_3>
d
- dimension (0, 1 or 2, corresponding to x or y axis)public Point_3 min(int d)
min
in class PointCloud<Point_3>
d
- dimension (0,1 or 2, corresponding to x or y axis)public static PointCloud_3 pointsInSphere(int n)
n
- the number of points