Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear all reference in the virtual edge.
|
boolean |
equals(Object o) |
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.
|
SemiVirtualEdge |
getBaseReference()
Constructs a new instance of the virtual edge class referencing the base of
the current edge (may be a copy of the current edge if it is a base).
|
int |
getConstraintIndex()
Gets the index of the constraint associated with this edge.
|
SemiVirtualEdge |
getDual()
Constructs a new instance of the virtual edge class referencing the dual of
the current edge.
|
SemiVirtualEdge |
getDualFromForward()
Constructs a new instance of the virtual edge class referencing the dual of
the forward of the current edge
|
SemiVirtualEdge |
getDualFromReverse()
Constructs a new instance of the virtual edge class referencing the dual of
the current edge's reverse.
|
SemiVirtualEdge |
getForward()
Gets the forward reference of the edge.
|
SemiVirtualEdge |
getForwardFromDual()
Constructs a new instance of the virtual edge class referencing the forward
of the dual of the current edge
|
int |
getIndex()
Gets the index value for this edge.
|
double |
getLength()
Gets the length of the edge.
|
SemiVirtualEdge |
getReverse()
Constructs a new instance of the virtual edge class referencing the forward
of the current edge.
|
SemiVirtualEdge |
getReverseFromDual()
Constructs a new instance of the virtual edge class referencing the reverse
of the dual of the current edge
|
int |
getSide()
Gets the low-order bit of the index of the current edge
|
Vertex |
getTriangleApex()
When the edge exists within a TIN, this method gets the apex of a triangle
formed with the edge as the base.
|
int |
hashCode() |
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 |
isExterior()
Indicates if the edge is exterior to a TIN.
|
boolean |
isSynthetic()
Indicates whether the synthetic flag is set for the edge.
|
void |
loadForwardFromEdge(SemiVirtualEdge e)
Load the content of the forward of the specified edge
|
void |
loadReverseFromEdge(SemiVirtualEdge e)
Load the content of the reverse of the specified edge
|
Iterable<IQuadEdge> |
pinwheel()
Gets an instance of an iterable that performs a pinwheel operation.
|
void |
setA(Vertex a)
Sets the initial vertex of the current edge (and final vertex of its dual)
|
void |
setB(Vertex b)
Sets the final vertex of the current edge (and initial vertex of its dual)
|
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 |
setDualForward(SemiVirtualEdge forward)
Sets the forward link for the dual of the current edge.
|
void |
setDualReverse(SemiVirtualEdge reverse)
Sets the reverse link for the dual of the current edge.
|
void |
setForward(SemiVirtualEdge e)
Sets the forward link for the current edge.
|
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 |
setReverse(SemiVirtualEdge e)
Sets the reverse link for the current edge.
|
void |
setSynthetic(boolean status)
Sets the synthetic flag for the edge.
|
void |
setVertices(Vertex a,
Vertex b)
Sets both vertices for the current edge (and the opposite vertices of its
dual).
|
String |
toString() |
public void loadForwardFromEdge(SemiVirtualEdge e)
e
- a valid instancepublic void loadReverseFromEdge(SemiVirtualEdge e)
e
- a valid instancepublic Vertex getA()
IQuadEdge
public Vertex getB()
IQuadEdge
public SemiVirtualEdge getForward()
IQuadEdge
getForward
in interface IQuadEdge
public Vertex getTriangleApex()
public boolean isExterior()
public SemiVirtualEdge getReverse()
getReverse
in interface IQuadEdge
public SemiVirtualEdge getDualFromReverse()
getDualFromReverse
in interface IQuadEdge
public SemiVirtualEdge getDual()
public void clear()
public SemiVirtualEdge getBaseReference()
getBaseReference
in interface IQuadEdge
public int getBaseIndex()
IQuadEdge
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.
getBaseIndex
in interface IQuadEdge
public SemiVirtualEdge getForwardFromDual()
getForwardFromDual
in interface IQuadEdge
public SemiVirtualEdge getDualFromForward()
public SemiVirtualEdge getReverseFromDual()
getReverseFromDual
in interface IQuadEdge
public int getIndex()
IQuadEdge
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.
public double getLength()
IQuadEdge
public int getSide()
public void setA(Vertex a)
a
- a valid reference or a null.public void setB(Vertex b)
b
- a valid reference or a null.public void setDualForward(SemiVirtualEdge forward)
forward
- the forward reference/public void setDualReverse(SemiVirtualEdge reverse)
reverse
- the forward reference/public void setForward(SemiVirtualEdge e)
e
- the forward reference/public void setReverse(SemiVirtualEdge e)
e
- the forward reference/public void setVertices(Vertex a, Vertex b)
a
- the initial vertexb
- the final vertexpublic int getConstraintIndex()
IQuadEdge
getConstraintIndex
in interface IQuadEdge
public void setConstraintIndex(int constraintIndex)
IQuadEdge
setConstraintIndex
in interface IQuadEdge
constraintIndex
- a positive number indicating which constraint
a particular edge is associated with.public void setConstrained(int constraintIndex)
IQuadEdge
setConstrained
in interface IQuadEdge
constraintIndex
- positive number indicating which constraint
a particular edge is associated with.public boolean isConstrained()
IQuadEdge
isConstrained
in interface IQuadEdge
public boolean isConstrainedRegionBorder()
IQuadEdge
isConstrainedRegionBorder
in interface IQuadEdge
public boolean isConstrainedRegionInterior()
IQuadEdge
isConstrainedRegionInterior
in interface IQuadEdge
public boolean isConstrainedRegionMember()
IQuadEdge
isConstrainedRegionMember
in interface IQuadEdge
public void setConstrainedRegionBorderFlag()
IQuadEdge
setConstrainedRegionBorderFlag
in interface IQuadEdge
public void setConstrainedRegionInteriorFlag()
IQuadEdge
setConstrainedRegionInteriorFlag
in interface IQuadEdge
public boolean isConstraintLineMember()
IQuadEdge
isConstraintLineMember
in interface IQuadEdge
public void setConstraintLineMemberFlag()
IQuadEdge
setConstraintLineMemberFlag
in interface IQuadEdge
public Iterable<IQuadEdge> pinwheel()
IQuadEdge
for(IQuadEdge e: startingEdge.pinwheel()){ }
public void setSynthetic(boolean status)
IQuadEdge
setSynthetic
in interface IQuadEdge
status
- true if the edge is synthetic; otherwise, false.public boolean isSynthetic()
IQuadEdge
isSynthetic
in interface IQuadEdge
public void setLine2D(AffineTransform transform, Line2D l2d)
IQuadEdge
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.
Copyright © 2021. All rights reserved.