public interface IIncrementalTin
The main difference between the two implementations is that standard incremental-TIN implementation represents each edge as an explicitly constructed pair of objects (using the QuadEdge class) while the semi-virtual implementation stores the raw data for vertices in memory and constructs edge objects on-the-fly (using the SemiVirtualEdge class). The semi-virtual approach has some processing overhead in that each time an edge is required, it must be constructed and then allowed to go out-of-scope. This approach results in about a 30 percent reduction in the speed at which vertices can be added to the TIN. But by relying on short-persistence edge objects, the semi-virtual class reduces the number of objects kept in memory and the overall memory use. The standard implementation classes uses about 7.005 objects per vertex (including vertices, edges, and collections for management), while the semi-virtual implementation uses about persistent 1.012 objects per vertex.
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
that can be used with a Java enhanced-loop statement to access the set
of edges that form the structure of the incremental TIN.
|
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.
|
IConstraint |
getLinearConstraint(IQuadEdge edge)
Gets the linear constraint associated with the edge, if any.
|
int |
getMaximumEdgeAllocationIndex()
Gets the maximum index of the currently allocated edges.
|
IIncrementalTinNavigator |
getNavigator()
Gets a new instance of the IIncrementalTinNavigator interface.
|
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.
|
IConstraint |
getRegionConstraint(IQuadEdge edge)
Gets the region constraint associated with the edge, if any.
|
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.
|
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.
|
Vertex |
splitEdge(IQuadEdge eInput,
double zSplit,
boolean restoreConformity)
Split an existing edge into two at the midpoint, using the
specified zSplit value as the z coordinate for the edge.
|
Iterable<SimpleTriangle> |
triangles()
Provides a convenience implementation
that can be used with a Java enhanced-loop statement to access the set
of SimpleTriangles implicit in the structure of the incremental TIN.
|
Iterable<Vertex> |
vertices()
Provides a convenience implementation
that can be used with a Java enhanced-loop statement to access the set
of vertices stored in an incremental TIN.
|
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()
Note that this loop produces only the "base side" of each edge. To access the counterpart (the side of the edge in the other direction), an application needs to access its dual using the edge's getDual() method.
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()
For example, this method could be used in the following manner:
IIncremntal tin = // some implementation for(IQuadEdge e: tin.edges(){ // some processing logic }
Note that this loop produces only the "base side" of each edge. To access the counterpart (the side of the edge in the other direction), an application needs to access its dual using the edge's getDual() method.
Please see the API documentation for getEdgeIterator() for cautions regarding the use of this method.
Iterable<SimpleTriangle> triangles()
For example, this method could be used in the following manner:
IIncremntal tin = // a valid instance for(SimpleTriangle t: tin.triangles(){ // some processing logic }
Please see the API documentation for SimpleTriangleIterator 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()
This method is obsolete. Use getNavigator instead.
IIncrementalTinNavigator getNavigator()
Instances observe the contract of the IProcessUsingTin interface in that they access the TIN on a read-only basis and may be used in parallel threads provided that the TIN is not modified.
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()
void 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()
Vertex splitEdge(IQuadEdge eInput, double zSplit, boolean restoreConformity)
WARNING The restoreDelaunay feature is not yet implemented.
eInput
- a valid edgezSplit
- the z coordinate for the new vertexrestoreConformity
- restore Delaunay conformance after
insertion NOT YET IMPLEMENTEIConstraint getRegionConstraint(IQuadEdge edge)
edge
- a valid edge instance.IConstraint getLinearConstraint(IQuadEdge edge)
edge
- a valid edge instance.Iterable<Vertex> vertices()
For example, this method could be used in the following manner:
IIncremntal tin = // a valid instance for(Vertex v: tin.verticess(){ // some processing logic }
Please see the API documentation for VertexIterator for cautions regarding the use of this method.
Copyright © 2021. All rights reserved.