public class Triangle extends Object
Constructor and Description |
---|
Triangle()
Default constructor.
|
Triangle(int id)
Constructor.
|
Triangle(int id,
boolean border)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addEdge(Edge edge)
Add an edge to the triangle.
|
boolean |
addEdges(List<Edge> edges)
Add edges to the triangle.
|
boolean |
addNeighbour(Triangle triangle)
Add a neighbour triangle to the triangle.
|
boolean |
addNeighbours(List<Triangle> triangles)
Add neighbour triangles to the triangle.
|
List<Edge> |
getEdges()
Returns the edges which compose the triangle.
|
int |
getId()
Returns the ID of the triangle.
|
List<Triangle> |
getNeighbours()
Returns the neighbour triangles of the triangle.
|
boolean |
isBorder()
Returns true if the triangle is a border triangle
of the triangulation framework, false otherwise.
|
boolean |
removeEdge(Edge edge)
Remove an edge of the triangle.
|
boolean |
removeEdges(List<Edge> edges)
Remove edges of the triangle.
|
boolean |
removeNeighbour(Triangle triangle)
Remove a neighbour triangle of the triangle.
|
boolean |
removeNeighbours(List<Triangle> triangles)
Remove neighbour triangles of the triangle.
|
void |
setBorder(boolean border)
Defines the indicator to know if the triangle
is a border triangle of the triangulation framework.
|
void |
setEdges(List<Edge> edges)
Defines the edges which compose the triangle.
|
void |
setId(int id)
Defines the ID of the triangle.
|
void |
setNeighbours(List<Triangle> neighbours)
Defines the neighbour triangles of the triangle.
|
public Triangle()
public Triangle(int id)
id
- ID of the trianglepublic Triangle(int id, boolean border)
id
- ID of the triangleborder
- defines if the triangle is a border triangle
or not in the triangulation frameworkpublic int getId()
public void setId(int id)
id
- ID of the trianglepublic boolean isBorder()
public void setBorder(boolean border)
border
- true if the triangle is a border triangle,
false otherwisepublic List<Edge> getEdges()
public void setEdges(List<Edge> edges)
edges
- the edges which compose the trianglepublic List<Triangle> getNeighbours()
public void setNeighbours(List<Triangle> neighbours)
neighbours
- the neighbour triangles of the trianglepublic boolean addEdge(Edge edge)
public boolean addEdges(List<Edge> edges)
public boolean removeEdge(Edge edge)
public boolean removeEdges(List<Edge> edges)
public boolean addNeighbour(Triangle triangle)
public boolean addNeighbours(List<Triangle> triangles)
public boolean removeNeighbour(Triangle triangle)
Copyright © 2018. All rights reserved.