Top Description Fields Constructors Methods
org.apache.commons.math3.geometry.spherical.twod

public Class Edge

extends Object
Class Inheritance
Imports
java.util.List, org.apache.commons.math3.geometry.euclidean.threed.Vector3D, org.apache.commons.math3.geometry.spherical.oned.Arc, org.apache.commons.math3.util.FastMath, .MathUtils

Spherical polygons boundary edge.
Since
3.3
See Also
SphericalPolygonsSet#getBoundaryLoops(), Vertex

Field Summary

Modifier and TypeField and Description
private final Circle
circle

Circle supporting the edge.

private Vertex
end

End vertex.

private final double
length

Length of the arc.

private final Vertex
start

Start vertex.

Constructor Summary

AccessConstructor and Description
pack-priv
Edge(final Vertex
start vertex
start
,
final Vertex
end vertex
end
,
final double
length of the arc (it can be greater than \( \pi \))
length
,
final Circle
circle supporting the edge
circle
)

Build an edge not contained in any node yet.

Method Summary

Modifier and TypeMethod and Description
private Vertex

Returns:

end vertex of the edge (subEnd if the edge was long enough and really added, subStart if the edge was too small and therefore ignored)
addSubEdge
(final Vertex
start of the sub-edge
subStart
,
final Vertex
end of the sub-edge
subEnd
,
final double
length of the sub-edge
subLength
,
final List<Edge>
list where to put the sub-edge
list
,
final Circle
circle splitting the edge in several parts
splitCircle
)

Add a sub-edge to a list if long enough.

public Circle

Returns:

circle supporting this edge
getCircle
()

Get the circle supporting this edge.

public Vertex

Returns:

end vertex
getEnd
()

Get end vertex.

public double

Returns:

length of the arc (can be greater than \( \pi \))
getLength
()

Get the length of the arc.

public Vector3D

Returns:

an intermediate point
getPointAt
(final double
angle along the edge, counted from getStart()
alpha
)

Get an intermediate point.

public Vertex

Returns:

start vertex
getStart
()

Get start vertex.

pack-priv void
setNextEdge(final Edge
edge following the instance
next
)

Connect the instance with a following edge.

pack-priv void
split(final Circle
circle splitting the edge in several parts
splitCircle
,
final List<Edge>
list where to put parts that are outside of the split circle
outsideList
,
final List<Edge>
list where to put parts that are inside the split circle
insideList
)

Split the edge.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

circleback to summary
private final Circle circle

Circle supporting the edge.

endback to summary
private Vertex end

End vertex.

lengthback to summary
private final double length

Length of the arc.

startback to summary
private final Vertex start

Start vertex.

Constructor Detail

Edgeback to summary
pack-priv Edge(final Vertex start, final Vertex end, final double length, final Circle circle)

Build an edge not contained in any node yet.

Parameters
start:Vertex

start vertex

end:Vertex

end vertex

length:double

length of the arc (it can be greater than \( \pi \))

circle:Circle

circle supporting the edge

Method Detail

addSubEdgeback to summary
private Vertex addSubEdge(final Vertex subStart, final Vertex subEnd, final double subLength, final List<Edge> list, final Circle splitCircle)

Add a sub-edge to a list if long enough.

If the length of the sub-edge to add is smaller than the Circle#getTolerance() tolerance of the support circle, it will be ignored.

Parameters
subStart:Vertex

start of the sub-edge

subEnd:Vertex

end of the sub-edge

subLength:double

length of the sub-edge

list:List<Edge>

list where to put the sub-edge

splitCircle:Circle

circle splitting the edge in several parts

Returns:Vertex

end vertex of the edge (subEnd if the edge was long enough and really added, subStart if the edge was too small and therefore ignored)

getCircleback to summary
public Circle getCircle()

Get the circle supporting this edge.

Returns:Circle

circle supporting this edge

getEndback to summary
public Vertex getEnd()

Get end vertex.

Returns:Vertex

end vertex

getLengthback to summary
public double getLength()

Get the length of the arc.

Returns:double

length of the arc (can be greater than \( \pi \))

getPointAtback to summary
public Vector3D getPointAt(final double alpha)

Get an intermediate point.

The angle along the edge should normally be between 0 and getLength() in order to remain within edge limits. However, there are no checks on the value of the angle, so user can rebuild the full circle on which an edge is defined if they want.

Parameters
alpha:double

angle along the edge, counted from getStart()

Returns:Vector3D

an intermediate point

getStartback to summary
public Vertex getStart()

Get start vertex.

Returns:Vertex

start vertex

setNextEdgeback to summary
pack-priv void setNextEdge(final Edge next)

Connect the instance with a following edge.

Parameters
next:Edge

edge following the instance

splitback to summary
pack-priv void split(final Circle splitCircle, final List<Edge> outsideList, final List<Edge> insideList)

Split the edge.

Once split, this edge is not referenced anymore by the vertices, it is replaced by the two or three sub-edges and intermediate splitting vertices are introduced to connect these sub-edges together.

Parameters
splitCircle:Circle

circle splitting the edge in several parts

outsideList:List<Edge>

list where to put parts that are outside of the split circle

insideList:List<Edge>

list where to put parts that are inside the split circle