public interface IQuadEdge
In general, get operations can be performed without any degradation of performance. However, set operations on quad-edges often require down casting (narrow casting) of object references. In ordinary applications, the performance cost of down casting is small. But for TIN applications require very large data sets with repeated modifications to the edge structure of the TIN, this cost can degrade processing rates by as much as 25 percent. Thus this interface avoids specifying any methods that set edge relationships (connections).
See the definition of IConstraint for a discussion of constrained regions.
Modifier and Type | Method and Description |
---|---|
Vertex |
getA()
Gets the initial vertex for this edge.
|
Vertex |
getB()
Gets the second vertex for this edge.
|
int |
getBaseIndex()
Gets the index of the "base" side of a bi-directional edge.
|
IQuadEdge |
getBaseReference()
Gets the reference to the side-zero edge of the pair.
|
int |
getConstraintIndex()
Gets the index of the constraint associated with this edge.
|
IQuadEdge |
getDual()
Gets the dual edge to this instance.
|
IQuadEdge |
getDualFromReverse()
Gets the dual of the reverse reference of the edge.
|
IQuadEdge |
getForward()
Gets the forward reference of the edge.
|
IQuadEdge |
getForwardFromDual()
Gets the forward reference of the dual.
|
int |
getIndex()
Gets the index value for this edge.
|
double |
getLength()
Gets the length of the edge.
|
IQuadEdge |
getReverse()
Gets the reverse reference of the edge.
|
IQuadEdge |
getReverseFromDual()
Gets the reverse link of the dual.
|
int |
getSide()
Indicates which side of an edge a particular IQuadEdge instance is
attached to.
|
boolean |
isConstrained()
Indicates whether an edge is constrained.
|
boolean |
isConstrainedRegionBorder()
Indicates whether an edge represents the border of a constrained
region.
|
boolean |
isConstrainedRegionInterior()
Indicates whether the edge is in the interior of a constrained region.
|
boolean |
isConstrainedRegionMember()
Indicates whether the edge is a member of a constrained region
(is in the interior or serves as the border of a polygon-based constraint).
|
boolean |
isConstraintLineMember()
Indicates whether the edge is a member of a constraint line, In some
cases, a constraint line member edge may lie within a constrained region
but will not lie on one of its borders.
|
boolean |
isSynthetic()
Indicates whether the synthetic flag is set for the edge.
|
Iterable<IQuadEdge> |
pinwheel()
Gets an instance of an iterable that performs a pinwheel operation.
|
void |
setConstrained(int constraintIndex)
Sets an edge as constrained and sets its constraint index.
|
void |
setConstrainedRegionBorderFlag()
Sets a flag indicating that the edge is an edge of a constrained region.
|
void |
setConstrainedRegionInteriorFlag()
Sets the constrained region membership flag for the edge to true.
|
void |
setConstraintIndex(int constraintIndex)
Sets the constraint index for this edge.
|
void |
setConstraintLineMemberFlag()
Sets the constraint-line member flag for the edge to true.
|
void |
setLine2D(AffineTransform transform,
Line2D l2d)
Provides a convenience method for rendering edges by setting the
Line2D argument with the transformed coordinates of the edge.
|
void |
setSynthetic(boolean status)
Sets the synthetic flag for the edge.
|
Vertex getA()
Vertex getB()
IQuadEdge getBaseReference()
From the perspective of application code, the Tinfour implementations of the two elements associated with a bi-directional edge are symmetrical. Neither side of an edge is more significant than the other.
IQuadEdge getDual()
IQuadEdge getForwardFromDual()
IQuadEdge getReverseFromDual()
int getIndex()
In Tinfour implementations, edges are bi-directional. In effect, the edge is implemented as a pair of unidirectional elements. Each element is assigned a separate index.
One common use for the index code by applications is to main a record of processing performed using edge-traversal operations. For example, some applications use the index to maintain a bitmap of visited edges when performing surface analysis.
When an edge is allocated, it is set with an arbitrary index value. This value will not change while the edge remains allocated by and edge-pool instance. As soon as the edge is released, it is likely to have its index value reassigned.
int getBaseIndex()
This method can be useful in cases where an application needs to track a complete edge without regard to which side of the edge is being considered.
int getSide()
double getLength()
IQuadEdge getForward()
IQuadEdge getReverse()
IQuadEdge getDualFromReverse()
int getConstraintIndex()
void setConstraintIndex(int constraintIndex)
constraintIndex
- a positive number indicating which constraint
a particular edge is associated with.boolean isConstrained()
void setConstrained(int constraintIndex)
constraintIndex
- positive number indicating which constraint
a particular edge is associated with.boolean isConstrainedRegionMember()
boolean isConstraintLineMember()
void setConstraintLineMemberFlag()
boolean isConstrainedRegionInterior()
boolean isConstrainedRegionBorder()
void setConstrainedRegionBorderFlag()
void setConstrainedRegionInteriorFlag()
void setSynthetic(boolean status)
status
- true if the edge is synthetic; otherwise, false.boolean isSynthetic()
Iterable<IQuadEdge> pinwheel()
for(IQuadEdge e: startingEdge.pinwheel()){ }
void setLine2D(AffineTransform transform, Line2D l2d)
This method is intended to support rendering operations that may render a large number of edges using Java's Line2D class. In such cases, this method avoids the overhead involved in creating multiple Line2D instances by allowing an application to reuse a single instance multiple times.
transform
- a valid affine transforml2d
- a valid Line2D instanceCopyright © 2021. All rights reserved.