Class PointCloud_d
Class representing a collection of points (in dimension d)
- Version:
- jan 2014
- Author:
- Luca Castelli Aleardi, Ecole Polytechnique (INF562)
-
Field Summary
Fields inherited from class Jcg.geometry.PointCloud
dimension, points -
Constructor Summary
ConstructorsConstructorDescriptionPointCloud_d(int d) Create a new empty point cloudPointCloud_d(int n, int d) Create a point cloud of size nPointCloud_d(ArrayList<Point_d> points) Create a new point cloud (a copy) from a collection of points -
Method Summary
Modifier and TypeMethodDescriptionPoint_d[]Compute the bounding box (enclosing all points)max(int d) Return the point with greatest coordinate value (in direction d)min(int d) Return the point with smallest coordinate value (in direction d)static PointCloud_dpointsInSphere(int n, int d) Generate points inside a d-dimensional sphere at randomMethods inherited from class Jcg.geometry.PointCloud
add, dimension, listOfPoints, remove, size
-
Constructor Details
-
PointCloud_d
public PointCloud_d(int d) Create a new empty point cloud -
PointCloud_d
public PointCloud_d(int n, int d) Create a point cloud of size n- Parameters:
n- number of points
-
PointCloud_d
-
-
Method Details
-
boundingBox
Compute the bounding box (enclosing all points)- Specified by:
boundingBoxin classPointCloud<Point_d>- Returns:
- Point_3[] the array containing the min and max bounds
-
max
Return the point with greatest coordinate value (in direction d)- Specified by:
maxin classPointCloud<Point_d>- Parameters:
d- dimension (0 or 1, corresponding to x or y axis)- Returns:
- Point_2 the greatest point (with greatest d-coordinate)
-
min
Return the point with smallest coordinate value (in direction d)- Specified by:
minin classPointCloud<Point_d>- Parameters:
d- dimension (0 or 1, corresponding to x or y axis)- Returns:
- Point_2 the smallest point (with smallest d-coordinate)
-
pointsInSphere
Generate points inside a d-dimensional sphere at random- Parameters:
n- the number of points
-