public class Edge extends Object
Constructor and Description |
---|
Edge()
Default constructor.
|
Edge(int id)
Constructor.
|
Edge(int id,
boolean border)
Constructor.
|
Edge(int id,
com.vividsolutions.jts.geom.LineSegment geometry)
Constructor.
|
Edge(int id,
com.vividsolutions.jts.geom.LineSegment geometry,
boolean border)
Constructor.
|
Edge(int id,
com.vividsolutions.jts.geom.LineSegment geometry,
Vertex oV,
Vertex eV,
boolean border)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addIncidentEdge(Edge edge)
Add an incident edge in relationship with the edge.
|
boolean |
addIncidentEdges(List<Edge> edges)
Add incident edges in relationship with the edge.
|
boolean |
addTriangle(Triangle triangle)
Add a triangle in relationship with the edge.
|
boolean |
addTriangles(List<Triangle> triangles)
Add triangles in relationship with the edge.
|
Vertex |
getEV()
Returns the end vertex of the edge.
|
com.vividsolutions.jts.geom.LineSegment |
getGeometry()
Returns the geometry of the edge.
|
int |
getId()
Returns the ID of the edge.
|
List<Edge> |
getIncidentEdges()
Returns the edges in relationship with the edge.
|
Vertex |
getOV()
Returns the origin vertex of the edge.
|
List<Triangle> |
getTriangles()
Returns the triangles in relationship with the edge.
|
boolean |
isBorder()
Returns true if the edge is a border edge
of the triangulation framework, false otherwise.
|
boolean |
removeAllIncidentEdges(List<Edge> edges)
Remove incident edges in relationship with the edge.
|
boolean |
removeIncidentEdge(Edge edge)
Remove an incident edge in relationship with the edge.
|
boolean |
removeTriangle(Triangle triangle)
Remove a triangle in relationship with the edge.
|
boolean |
removeTriangles(List<Triangle> triangles)
Remove triangles in relationship with the edge.
|
void |
setBorder(boolean border)
Defines the indicator to know if the edge
is a border edge of the triangulation framework.
|
void |
setEV(Vertex eV)
Defines the end vertex of the edge.
|
void |
setGeometry(com.vividsolutions.jts.geom.LineSegment geometry)
Defines the geometry of the edge.
|
void |
setId(int id)
Defines the ID of the edge.
|
void |
setIncidentEdges(List<Edge> edges)
Defines the edges in relationship with the edge.
|
void |
setOV(Vertex oV)
Defines the origin vertex of the edge.
|
void |
setTriangles(List<Triangle> triangles)
Defines the triangles in relationship with the edge.
|
public Edge()
public Edge(int id)
id
- ID of the edgepublic Edge(int id, com.vividsolutions.jts.geom.LineSegment geometry)
id
- ID of the edgegeometry
- geometry of the edge (segment)public Edge(int id, boolean border)
id
- ID of the edgeborder
- defines if the edge is a border edge
or not in the triangulation frameworkpublic Edge(int id, com.vividsolutions.jts.geom.LineSegment geometry, boolean border)
id
- ID of the edgegeometry
- geometry of the edge (segment)border
- defines if the edge is a border edge
or not in the triangulation frameworkpublic Edge(int id, com.vividsolutions.jts.geom.LineSegment geometry, Vertex oV, Vertex eV, boolean border)
id
- ID of the edgegeometry
- geometry of the edge (segment)oV
- origin vertexeV
- end vertexborder
- defines if the edge is a border edge
or not in the triangulation frameworkpublic int getId()
public void setId(int id)
id
- ID of the edgepublic com.vividsolutions.jts.geom.LineSegment getGeometry()
public void setGeometry(com.vividsolutions.jts.geom.LineSegment geometry)
geometry
- geometry of the edge (segment)public boolean isBorder()
public void setBorder(boolean border)
border
- true if the edge is a border edge,
false otherwisepublic Vertex getOV()
public void setOV(Vertex oV)
oV
- origin vertex of the edgepublic Vertex getEV()
public void setEV(Vertex eV)
eV
- end vertex of the edgepublic List<Triangle> getTriangles()
public void setTriangles(List<Triangle> triangles)
triangles
- the triangles in relationship with the edgepublic List<Edge> getIncidentEdges()
public void setIncidentEdges(List<Edge> edges)
edges
- the edges in relationship with the edgepublic boolean addTriangle(Triangle triangle)
public boolean addTriangles(List<Triangle> triangles)
public boolean removeTriangle(Triangle triangle)
public boolean removeTriangles(List<Triangle> triangles)
public boolean addIncidentEdge(Edge edge)
public boolean addIncidentEdges(List<Edge> edges)
public boolean removeIncidentEdge(Edge edge)
Copyright © 2018. All rights reserved.