public class PointList
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
PointList()
Constructs a new PointList object
|
Modifier and Type | Method and Description |
---|---|
void |
addPoint(Point3D point)
Adds a new point to the point list
|
void |
centerPoints()
Centers the points (around the origin)
|
java.lang.Object |
clone()
Returns an identical PointList object
|
boolean |
equals(java.lang.Object other)
Returns true if the two point lists are identical
|
Jama.Matrix |
getAsMatrix()
Returns point coordinates in a 3xN matrix
|
Point3D |
getCentroid()
Returns the centroid of points
|
int |
getNumberOfPoints()
Returns the number of points in the list
|
Point3D |
getPoint(int i)
Returns the point of index i
|
java.util.ArrayList<Point3D> |
getPointsAsArrayList()
Returns points in an ArrayList
|
PointList |
getSubList(java.util.ArrayList<java.lang.Integer> indices)
Returns a subset of points defined by an ArrayList of indices
|
int |
hashCode()
Returns hash code
|
void |
loadFromMatrix(Jama.Matrix M)
Loads point coordinates from a 3xN matrix
|
void |
removePoint(int i)
Removes the point of index i from the point list
|
void |
removePoint(Point3D point)
Removes the given point from the point list
|
void |
rotate(Jama.Matrix rotationMatrix)
Rotates the points by a given 3x3 rotation matrix
|
void |
setPoint(int i,
Point3D point)
Replaces the point of index i with a given point
|
void |
setPointFromArrayList(java.util.ArrayList<Point3D> points)
Loads points from an ArrayList
|
java.lang.String |
toString()
Returns the String representation of point list
|
java.lang.String |
toStringInfo()
Returns summary information about the point list
|
void |
translate(Point3D vector)
Translates the points by a given vector
|
public java.util.ArrayList<Point3D> getPointsAsArrayList()
public void setPointFromArrayList(java.util.ArrayList<Point3D> points)
points
- ArrayList of pointspublic void addPoint(Point3D point)
point
- new pointpublic Point3D getPoint(int i)
i
- indexpublic void setPoint(int i, Point3D point)
i
- indexpoint
- new pointpublic void removePoint(int i)
i
- indexpublic void removePoint(Point3D point)
point
- point to removepublic int getNumberOfPoints()
public PointList getSubList(java.util.ArrayList<java.lang.Integer> indices)
indices
- ArrayList of indicespublic Jama.Matrix getAsMatrix()
public void loadFromMatrix(Jama.Matrix M)
M
- coordinate matrixpublic void centerPoints()
public Point3D getCentroid()
public void rotate(Jama.Matrix rotationMatrix)
rotationMatrix
- rotation matrixpublic void translate(Point3D vector)
vector
- translation vectorpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringInfo()
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other point listpublic int hashCode()
hashCode
in class java.lang.Object