public abstract class PolyLineConstraintAdapter extends Object implements IConstraint, Iterable<Vertex>
Modifier and Type | Field and Description |
---|---|
protected Object |
applicationData |
protected int |
constraintIndex |
protected IQuadEdge |
constraintLinkingEdge |
protected boolean |
isComplete |
protected double |
length |
protected List<Vertex> |
list |
protected IIncrementalTin |
maintainingTin |
Modifier and Type | Method and Description |
---|---|
void |
add(Vertex v)
Adds a vertex to the polyline feature.
|
Object |
getApplicationData()
Gets the application data (if any) stored in the constraint.
|
Rectangle2D |
getBounds()
Gets the bounds of the feature.
|
int |
getConstraintIndex()
Gets an index value used for internal bookkeeping by Tinfour code.
|
IQuadEdge |
getConstraintLinkingEdge() |
double |
getLength()
Gets the total length of the feature.
|
IIncrementalTin |
getManagingTin()
Gets the instance of the incremental TIN interface that
is managing this constraint, if any.
|
List<Vertex> |
getVertices()
Gets the vertices for this feature.
|
boolean |
isPointInsideConstraint(double x,
double y)
Indicates if a point at the specified coordinates is unambiguously
inside the constraint.
|
Iterator<Vertex> |
iterator() |
void |
setApplicationData(Object applicationData)
Permits an application to add data elements to the constraint for
its own uses.
|
void |
setConstraintIndex(IIncrementalTin tin,
int index)
Sets an index value used for internal bookkeeping by Tinfour code;
not intended for use by application code.
|
void |
setConstraintLinkingEdge(IQuadEdge edge)
Sets a reference to an arbitrarily selected edge that was produced
when the constraint was added to a TIN.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
definesConstrainedRegion, getConstraintWithNewGeometry, getPath2D
complete, getNominalPointSpacing, isPolygon, isValid, refactor
forEach, spliterator
protected Object applicationData
protected int constraintIndex
protected IQuadEdge constraintLinkingEdge
protected IIncrementalTin maintainingTin
protected boolean isComplete
protected double length
public List<Vertex> getVertices()
IPolyline
getVertices
in interface IPolyline
public final void add(Vertex v)
IPolyline
public Rectangle2D getBounds()
IPolyline
Caution: Implementations of this method expose the Rectangle2D object used by the feature instance. Although this approach supports efficiency for the potentially intense processing conducted by the Tinfour classes, it does not provide a safe implementation for careless developers. Therefore, applications should not manipulate or modify the rectangle instance returned by this routine at any time.
public void setApplicationData(Object applicationData)
IConstraint
setApplicationData
in interface IConstraint
applicationData
- an object or null according to the needs of the
calling application.public Object getApplicationData()
IConstraint
getApplicationData
in interface IConstraint
public void setConstraintIndex(IIncrementalTin tin, int index)
IConstraint
setConstraintIndex
in interface IConstraint
tin
- the IIncrementalTin instance to while this constraint has been
added (or null if not applicable).index
- a positive integer.public int getConstraintIndex()
IConstraint
getConstraintIndex
in interface IConstraint
public double getLength()
IPolyline
public IQuadEdge getConstraintLinkingEdge()
getConstraintLinkingEdge
in interface IConstraint
public void setConstraintLinkingEdge(IQuadEdge edge)
IConstraint
This method is not intended for use by application code. Application code that sets a constraint index runs the risk of damaging the internal data relations maintained by Tinfour.
setConstraintLinkingEdge
in interface IConstraint
edge
- a valid edge referencepublic IIncrementalTin getManagingTin()
IConstraint
getManagingTin
in interface IConstraint
public boolean isPointInsideConstraint(double x, double y)
IConstraint
This method will only return true for polygon constraints. For all other constraint implementations, it will return a value of false.
isPointInsideConstraint
in interface IConstraint
x
- the Cartesian coordinate for the pointy
- the Cartesian coordinate for the pointCopyright © 2021. All rights reserved.