public interface IIncrementalTin
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(List<Vertex> list,
IMonitorWithCancellation monitor)
Inserts a list of vertices into the collection of vertices managed by the
TIN.
|
boolean |
add(Vertex v)
Insert a vertex into the collection of vertices managed by
the TIN.
|
void |
addConstraints(List<IConstraint> constraints,
boolean restoreConformity)
Adds constraints to the TIN.
|
void |
clear()
Clears all internal state data of the TIN, preparing any allocated
resources for re-use.
|
TriangleCount |
countTriangles()
Performs a survey of the TIN to gather statistics about
the triangles formed during its construction.
|
void |
dispose()
Nullifies all internal data and references, preparing the
instance for garbage collection.
|
Iterable<IQuadEdge> |
edges()
Provides a convenience implementation of a wrapper class
that can be used in a Java enhanced-loop statement.
|
Rectangle2D |
getBounds()
Gets the bounds of the TIN.
|
IConstraint |
getConstraint(int index)
Gets the constraint associated with the index, or a null if
no such constraint exists.
|
List<IConstraint> |
getConstraints()
Gets a shallow copy of the list of constraints currently
stored in the TIN.
|
Iterator<IQuadEdge> |
getEdgeIterator()
Gets an iterator for stepping through the collection of edges
currently stored in the TIN.
|
List<IQuadEdge> |
getEdges()
Gets a list of edges currently allocated by an instance.
|
IIntegrityCheck |
getIntegrityCheck()
Gets an implementation of the integrity check interface suitable for
the referenced TIN implementation.
|
int |
getMaximumEdgeAllocationIndex()
Gets the maximum index of the currently allocated edges.
|
INeighborEdgeLocator |
getNeighborEdgeLocator()
Gets a new instance of the INeighborEdgeLocator interface.
|
INeighborhoodPointsCollector |
getNeighborhoodPointsCollector()
Gets a new instance of a neighborhood points collector.
|
double |
getNominalPointSpacing()
Gets the nominal point spacing used to determine numerical thresholds
for various proximity and inclusion tests.
|
List<IQuadEdge> |
getPerimeter()
Gets a list of edges currently defining the perimeter of the TIN.
|
int |
getSyntheticVertexCount()
Gets the number of synthetic vertices added to the TIN.
|
Thresholds |
getThresholds()
Gets the Thresholds object that is associated with this instance.
|
List<Vertex> |
getVertices()
Gets a list of vertices currently stored in the TIN.
|
boolean |
isBootstrapped()
Indicates whether the instance contains sufficient information
to represent a TIN.
|
boolean |
isPointInsideTin(double x,
double y)
Determines whether the point is inside the convex polygon boundary
of the TIN.
|
void |
preAllocateEdges(int nVertices)
Allocates a number of vertices roughly sufficient to represent a TIN
containing the specified number of vertices.
|
void |
printDiagnostics(PrintStream ps)
Print statistics and diagnostic information collected during the
TIN construction process.
|
void |
printEdges(PrintStream ps)
Provides a diagnostic print out of the edges comprising the TIN.
|
boolean |
remove(Vertex vRemove)
Removes the specified vertex from the TIN.
|
void |
setResolutionRuleForMergedVertices(VertexMergerGroup.ResolutionRule resolutionRule)
Specifies a rule for interpreting the Z value of a group of vertices that
were merged due to being coincident, or nearly coincident.
|
void clear()
TriangleCount countTriangles()
void dispose()
Rectangle2D getBounds()
List<IQuadEdge> getEdges()
Warning: For efficiency purposes, the edges return by this routine are the same objects as those currently being used in the instance. Any modification of the edge objects will damage the TIN. Therefore, applications must not modify the edges returned by this method.
Iterator<IQuadEdge> getEdgeIterator()
Warning: For efficiency purposes, the edges returned by this routine are the same objects as those currently being used in the instance. Any modification of the edge objects will damage the TIN. Therefore, applications must not modify the edges returned by this method. Caution: For reasons of efficiency, the iterator does not offer any protection against concurrent modification. Therefore applications using this iterator must never modify the TIN during iteration.
Iterable<IQuadEdge> edges()
IIncremntal tin = // some implementation
for(IQuadEdge e: tin.edges(){
// some processing logic
}
Please see the API documentation for getEdgeIterator() for cautions regarding the use of this method.
int getMaximumEdgeAllocationIndex()
Internally, Tinfour uses edge index values to manage edges in memory. The while there can be small gaps in the indexing sequence, this method provides a way of obtaining the absolute maximum value of currently allocated edges.
double getNominalPointSpacing()
Lidar applications sometimes refer to the point-spacing concept as "nominal pulse spacing", a term that reflects the origin of the data in a laser-based measuring system.
Thresholds getThresholds()
List<IQuadEdge> getPerimeter()
Warning: For efficiency purposes, the edges return by this routine are the same objects as those currently being used in the instance. Any modification of the edge objects will damage the TIN. Therefore, applications must not modify the edges returned by this method.
INeighborEdgeLocator getNeighborEdgeLocator()
INeighborhoodPointsCollector getNeighborhoodPointsCollector()
IIntegrityCheck getIntegrityCheck()
boolean add(Vertex v)
v - a valid vertexboolean add(List<Vertex> list, IMonitorWithCancellation monitor)
list - a valid list of vertices to be added to the TIN.monitor - an optional monitoring implementation; null if not used.void preAllocateEdges(int nVertices)
nVertices - the number of vertices expected to be added to the TIN.void printDiagnostics(PrintStream ps)
ps - A valid instance of a PrintStream to receive the output.List<Vertex> getVertices()
Note: For efficiency purposes, the vertices return by this routine are the same objects as those currently being used in the instance. The index and "reserved" elements of the Vertex class are not used by the TIN and may be modified by application code as required. However, the geometry related fields must not be modified once a vertex is added to a TIN.
boolean isBootstrapped()
boolean isPointInsideTin(double x,
double y)
x - The x coordinate of interesty - THe y coordinate of interestvoid printEdges(PrintStream ps)
ps - A valid print stream.boolean remove(Vertex vRemove)
vRemove - the vertex to be removedvoid setResolutionRuleForMergedVertices(VertexMergerGroup.ResolutionRule resolutionRule)
resolutionRule - The rule to be used for interpreting merged vertices.void addConstraints(List<IConstraint> constraints, boolean restoreConformity)
Using Constraints
There are a number of important restrictions to the use of constraints. Constraints must only be added to the TIN once, after all other vertices have already been added. Furthermore, the addConstraint method can only be called once. Logic is implemented as a safety measure to ensure that these restrictions are not accidentally violated.
There are also important restrictions on the geometry of constraints. Most importantly, constraints must never intersect each other except at the endpoints of the segments that define them (i.e. segments in constraints must never cross each other). Due to the high cost of processing required to check that this restriction is observed, it is not directly enforced by the Tinfour implementations.
Restoring Conformity
When constraints are added to a Delaunay triangulation, they often violate the Delaunay criterion and result in a non-conforming mesh. The addConstraint method can optionally restore conformity by inserting synthetic points into the the constraint edges. The cost of this process is additional processing time and an increase in the number of points in the TIN.
When points are synthesized, it is necessary to interpolate a value for the z-coordinate. At this time, the specific interpolation process is undefined. The current Tinfour implementations use linear interpolation between constraint points. While no viable alternative approach is currently under consideration, the choice of interpolation method is subject to change in the future.
constraints - a valid, potentially empty list.restoreConformity - restores conformityList<IConstraint> getConstraints()
IConstraint getConstraint(int index)
index - an arbitrary integer indexint getSyntheticVertexCount()
Copyright © 2019. All rights reserved.