Class PointCloud<X extends Point_>

java.lang.Object
Jcg.geometry.PointCloud<X>
Direct Known Subclasses:
PointCloud_2, PointCloud_3, PointCloud_d

public abstract class PointCloud<X extends Point_> extends Object
Class representing a collection of points (in arbitrary dimension)
Version:
dec 2012
Author:
Luca Castelli Aleardi, Ecole Polytechnique (INF562)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected ArrayList<X>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(X p)
    Add a new point to the point cloud
    abstract X[]
    Compute the bounding box (enclosing all points)
    int
    Return the dimension of the space
    Return the list of points
    abstract X
    max(int d)
    Return the point with greatest coordinate value (in direction d)
    abstract X
    min(int d)
    Return the point with smallest coordinate value (in direction d)
    void
    remove(X p)
    Remove a point to the point cloud
    int
    Return the size of the point cloud

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • points

      protected ArrayList<X extends Point_> 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

      public void add(X p)
      Add a new point to the point cloud
      Parameters:
      p - the point to add
    • remove

      public void remove(X p)
      Remove a point to the point cloud
      Parameters:
      p - the point to remove
    • listOfPoints

      public Collection<X> listOfPoints()
      Return the list of points
      Returns:
      Collection the list of points
    • boundingBox

      public abstract X[] boundingBox()
      Compute the bounding box (enclosing all points)
      Returns:
      X[] the array containing the min and max bounds
    • min

      public abstract X min(int d)
      Return the point with smallest coordinate value (in direction d)
      Parameters:
      d - dimension
      Returns:
      X the smallest point (with smallest d-coordinate)
    • max

      public abstract X max(int d)
      Return the point with greatest coordinate value (in direction d)
      Parameters:
      d - dimension
      Returns:
      X the greatest point (with greatest d-coordinate)