Documentation of 'math.geom3d.PointSet3D' Java class
PointSet3D
math.geom3d

Class PointSet3D

  • All Implemented Interfaces:
    java.lang.Iterable<Point3D>, Shape3D


    public class PointSet3D
    extends java.lang.Object
    implements Shape3D, java.lang.Iterable<Point3D>
    • Constructor Summary

      Constructors 
      Constructor and Description
      PointSet3D() 
      PointSet3D(java.util.Collection<? extends Point3D> points)
      Points must be a collection of java.awt.Point.
      PointSet3D(int n)
      Creates a new point set and allocate memory for storing the points.
      PointSet3D(Point3D[] points)
      Instances of Point3D are directly added, other Point are converted to Point3D with the same location.
    • Constructor Detail

      • PointSet3D

        public PointSet3D()
      • PointSet3D

        public PointSet3D(int n)
        Creates a new point set and allocate memory for storing the points.
        Parameters:
        n - the number of points to store
      • PointSet3D

        public PointSet3D(Point3D[] points)
        Instances of Point3D are directly added, other Point are converted to Point3D with the same location.
      • PointSet3D

        public PointSet3D(java.util.Collection<? extends Point3D> points)
        Points must be a collection of java.awt.Point. Instances of Point3D are directly added, other Point are converted to Point3D with the same location.
        Parameters:
        points -
    • Method Detail

      • addPoint

        public void addPoint(Point3D point)
        Adds a new point to the set of point. If point is not an instance of Point3D, a Point3D with same location is added instead of point.
        Parameters:
        point -
      • addPoints

        public void addPoints(Point3D[] points)
        Add a series of points
        Parameters:
        points - an array of points
      • addPoints

        public void addPoints(java.util.Collection<Point3D> points)
      • getPoints

        public java.util.Iterator<Point3D> getPoints()
        Returns an iterator on the internal point collection.
        Returns:
        the collection of points
      • clearPoints

        public void clearPoints()
        Removes all points of the set.
      • pointNumber

        public int pointNumber()
        Returns the number of points in the set.
        Returns:
        the number of points
      • distance

        public double distance(Point3D p)
        Description copied from interface: Shape3D
        Gets the distance of the shape to the given point, or the distance of point to the frontier of the shape in the case of a plain shape.
        Specified by:
        distance in interface Shape3D
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface Shape3D
      • isBounded

        public boolean isBounded()
        Description copied from interface: Shape3D
        Returns true if the shape is bounded, that is if we can draw a finite rectangle enclosing the shape. For example, a straight line or a parabola are not bounded.
        Specified by:
        isBounded in interface Shape3D
      • iterator

        public java.util.Iterator<Point3D> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<Point3D>

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.