Class PointCloud<X extends Point_>
java.lang.Object
Jcg.geometry.PointCloud<X>
- Direct Known Subclasses:
PointCloud_2,PointCloud_3,PointCloud_d
Class representing a collection of points (in arbitrary dimension)
- Version:
- dec 2012
- Author:
- Luca Castelli Aleardi, Ecole Polytechnique (INF562)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new point to the point cloudabstract X[]Compute the bounding box (enclosing all points)intReturn the dimension of the spaceReturn the list of pointsabstract Xmax(int d) Return the point with greatest coordinate value (in direction d)abstract Xmin(int d) Return the point with smallest coordinate value (in direction d)voidRemove a point to the point cloudintsize()Return the size of the point cloud
-
Field Details
-
points
-
dimension
protected int dimension
-
-
Constructor Details
-
PointCloud
public PointCloud()
-
-
Method Details
-
size
public int size()Return the size of the point cloud- Returns:
- n the number of points
-
dimension
public int dimension()Return the dimension of the space- Returns:
- d the dimension
-
add
-
remove
-
listOfPoints
Return the list of points- Returns:
- Collection
the list of points
-
boundingBox
Compute the bounding box (enclosing all points)- Returns:
- X[] the array containing the min and max bounds
-
min
Return the point with smallest coordinate value (in direction d)- Parameters:
d- dimension- Returns:
- X the smallest point (with smallest d-coordinate)
-
max
Return the point with greatest coordinate value (in direction d)- Parameters:
d- dimension- Returns:
- X the greatest point (with greatest d-coordinate)
-