public class Horizon extends Object
TriangularFacet
which are merged.
The horizon is a polygon of all outer edges/vertices of the merged
TriangularFacet
.Modifier and Type | Field and Description |
---|---|
protected List<T> |
neighbors
The neighboring facets of this facet.
|
protected List<Vertex> |
vertices
The vertices of this facet in counter clock wise orientation.
|
Constructor and Description |
---|
Horizon(TriangularFacet f)
Create a new
Horizon from a TriangularFacet |
Modifier and Type | Method and Description |
---|---|
void |
complexMerge(TriangularFacet f)
Merges another facet to this facet.
|
boolean |
containsAll(List<Vertex> vertexList)
Returns true if all vertices are part of this polygon
|
Vertex |
getLastVertex()
Get the last vertex.
|
T |
getNeighbor(int position)
Get the neighbor at position.
|
List<T> |
getNeighbors()
Get all neighbors.
|
Vertex |
getVertex(int i)
Get the vertex at index i.
|
List<Vertex> |
getVertices()
The list of vertices.
|
boolean |
hasEdge(Vertex tail,
Vertex head)
Returns true if this facet has the edge from tail to head.
|
int |
indexOfNeighbor(T facet)
Get index of a neighbor.
|
int |
indexOfVertex(Vertex vertex)
Returns the index of the first occurrence of vertex.
|
void |
replaceNeighbor(int i,
T f)
Replaces a neighbor.
|
void |
setNeighbor(int position,
T n)
Sets the n-th neighbor of this facet.
|
void |
simpleMerge(TriangularFacet f)
Merges another facet to this facet.
|
int |
size()
Get the number of vertices.
|
protected List<Vertex> vertices
public Horizon(TriangularFacet f)
Horizon
from a TriangularFacet
f
- the facetpublic void simpleMerge(TriangularFacet f)
f
- the facet to merge into this facet.public void complexMerge(TriangularFacet f)
f
- the facet to merge into this facet.public int indexOfVertex(Vertex vertex)
vertex
- the vertexpublic Vertex getVertex(int i)
i
- the positionpublic int size()
public Vertex getLastVertex()
public boolean containsAll(List<Vertex> vertexList)
vertexList
- to checkpublic boolean hasEdge(Vertex tail, Vertex head)
tail
- vertex of the edgehead
- vertex of the edgepublic void setNeighbor(int position, T n)
position
- of the neighborn
- the neighborpublic T getNeighbor(int position)
position
- the positionpublic void replaceNeighbor(int i, T f)
i
- index of the neighbor to replacef
- the new neighborpublic int indexOfNeighbor(T facet)
facet
- the neighboring facetCopyright © 2014–2022 ImageJ. All rights reserved.