public class Vertices extends Object
| Constructor and Description |
|---|
Vertices()
Construct an empty list of vertices.
|
| Modifier and Type | Method and Description |
|---|---|
Point2D |
addVertex(double x,
double y)
Adds a vertex at the end of the list.
|
void |
clear()
Clear all the vertices in this list.
|
Point2D |
getVertex(int index)
Gets the vertex at the given index.
|
int |
getVertexCount()
Gets the number of vertices that are held in this object.
|
boolean |
isModified()
Returns a flag indicating whether the list of vertices, or any vertices in the list has been modified.
|
void |
removeVertex(int index)
Removes a vertex from this list.
|
void |
setModified(boolean mod)
Sets the modified flag.
|
public Point2D addVertex(double x, double y)
x - The X location of the vertexy - The y location of the vertexpublic Point2D getVertex(int index)
index - The index of the vertex in this list to get.public int getVertexCount()
public void removeVertex(int index)
index - The index of the vertex to remove.public boolean isModified()
public void setModified(boolean mod)
mod - The new value of the modified flag.public void clear()