public final class NodeArc
extends java.lang.Object
Graph
node from a source node.
Encapsulates data required by the Visibility
line-of-sight algorithm.
The Graph
node that defines the NodeArc
and the source node that
defines the viewpoint are not stored in the NodeArc
.Modifier and Type | Field and Description |
---|---|
double |
distance
The positive distance from the source node to the
NodeArc . |
Modifier and Type | Method and Description |
---|---|
int |
isObscured(NodeArc arc)
Determines whether the current
NodeArc completely obscures
the specified instance, or vice versa. |
double |
start()
Gets the starting angle of the
NodeArc . |
double |
sweep()
Gets the positive sweep angle of the
NodeArc . |
double |
visibleFraction()
Gets the visible fraction of the
NodeArc . |
public final double distance
NodeArc
.
Measured in world coordinates from the Graph.getWorldLocation(T)
result
for the source node to the nearest vertex of the Graph.getWorldRegion(T)
result for the graph node that defines the tangential arc.public double start()
NodeArc
.
Measured clockwise in radians from the x-axis, assuming y-coordinates increase upward.NodeArc
public double sweep()
NodeArc
.
Measured clockwise in radians, assuming y-coordinates increase upward.
Never zero or negative in published NodeArc
instances, but set to
zero for some instances internally used by the Visibility
algorithm.NodeArc
public double visibleFraction()
NodeArc
.
Defaults to one for a newly created NodeArc
. May be inaccurate if it is
smaller than the current Visibility.threshold()
, as the Visibility
algorithm stops updating a NodeArc
as soon as it is considered obscured.sweep()
angle that remains unobscured, from zero to onepublic int isObscured(NodeArc arc)