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