public class PointSet3D extends Object implements Shape3D, Iterable<Point3D>
Shape3D.EmptySet3D
Modifier and Type | Field and Description |
---|---|
protected Collection<Point3D> |
points |
Constructor and Description |
---|
PointSet3D() |
PointSet3D(Collection<? extends Point3D> points)
Points must be a collection of java.awt.Point.
|
PointSet3D(Point3D[] points)
Instances of Point3D are directly added, other Point are converted to
Point3D with the same location.
|
PointSet3D(javax.vecmath.Tuple3d[] points)
Instances of Point3D are directly added, other Point are converted to
Point3D with the same location.
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(Point3D point)
Adds a new point to the set of point.
|
void |
addPoint(javax.vecmath.Tuple3d point)
Adds a new point to the set of point.
|
void |
addPoints(Collection<Point3D> points) |
void |
addPoints(Point3D[] points)
Add a series of points
|
void |
clearPoints()
Removes all points of the set.
|
Shape3D |
clip(Box3D box) |
boolean |
contains(Point3D point) |
Box3D |
getBoundingBox() |
double |
getDistance(Point3D p)
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.
|
Iterator<Point3D> |
getPoints()
Returns an iterator on the internal point collection.
|
int |
getPointsNumber()
Returns the number of points in the set.
|
boolean |
isBounded()
Returns true if the shape is bounded, that is if we can draw a finite
rectangle enclosing the shape.
|
boolean |
isEmpty() |
Iterator<Point3D> |
iterator() |
Shape3D |
transform(AffineTransform3D trans) |
protected Collection<Point3D> points
public PointSet3D()
public PointSet3D(Point3D[] points)
public PointSet3D(javax.vecmath.Tuple3d[] points)
public PointSet3D(Collection<? extends Point3D> points)
points
- public void addPoint(Point3D point)
point
- public void addPoint(javax.vecmath.Tuple3d point)
point
- public void addPoints(Point3D[] points)
points
- an array of pointspublic void addPoints(Collection<Point3D> points)
public Iterator<Point3D> getPoints()
public void clearPoints()
public int getPointsNumber()
public Box3D getBoundingBox()
getBoundingBox
in interface Shape3D
public double getDistance(Point3D p)
Shape3D
getDistance
in interface Shape3D
public boolean isBounded()
Shape3D
public Shape3D transform(AffineTransform3D trans)
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.