public final class IlvSegmentedHyperEdge.Segment extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
endsAt(IlvSegmentedHyperEdge.Segment segment,
IlvTransformer t)
Checks whether this segment ends at the input segment.
|
double |
getAngle()
Returns the angle of the segment in degree.
|
IlvHyperEdgeEnd[] |
getEnds()
Returns the hyperedge ends of the segment.
|
Object |
getExtension()
Returns the user extension of the segment.
|
IlvSegmentedHyperEdge |
getHyperEdge()
Returns the hyperedge that owns this segment.
|
IlvSegmentedHyperEdge.Segment |
getIncidentSegment(int i)
Returns the incident segment with index i.
|
IlvSegmentedHyperEdge.Segment[] |
getIncidentSegments()
Returns the incident segments of this segment.
|
int |
getIncidentSegmentsCount()
Returns the number of incident segments.
|
IlvPoint |
getIntersectionPoint(IlvSegmentedHyperEdge.Segment segment,
IlvTransformer t)
Returns the intersection point in view coordinates of the input segment
with this segment.
|
IlvSegmentedHyperEdge.Segment |
getOtherIncidentSegment(IlvSegmentedHyperEdge.Segment segment)
Returns an incident segment other than the input segment.
|
IlvPoint[] |
getPoints(IlvTransformer t,
IlvPoint[] pts)
Returns the start and end point of the segment in view coordinates.
|
IlvSegmentedHyperEdge.Segment[] |
getTerminatingSegments()
Returns the terminating segments.
|
boolean |
isColinear(IlvSegmentedHyperEdge.Segment seg)
Returns whether this segment and the input segment are colinear.
|
boolean |
isFullyTerminated()
Returns whether the segment is fully terminated.
|
boolean |
isIncident(IlvSegmentedHyperEdge.Segment segment)
Returns true if the input segment is incident to this segment.
|
boolean |
isSelected()
Returns
true if the segment is selected, and
false if the segment is not selected. |
boolean |
isVariable()
Returns whether the segment has a variable angle.
|
void |
setExtension(Object extension)
Sets the user extension of the segment.
|
void |
setSelected(boolean flag)
Selects the segment.
|
public IlvSegmentedHyperEdge getHyperEdge()
public boolean isVariable()
A segment with variable angle changes it angle on the fly when moving the end points of the segment. A segment with a variable angle can have two hyperedge ends, or one hyperedge end and one incident segment, or two incident segments.
A segment with constant angle never changes its angle. Moving one end of the segment will also move the other end in order to keep then angle constant. A segment with constant angle have have one hyperedge end, and additionally any arbitrary number of incident segments. Adjacent segments with constant angle must not be colinear.
public boolean isFullyTerminated()
If this segment has a fixed angle, it is never fully terminated, since it is always possible to add more segments. If this segment has a variable angle, it is fully terminated, if it has two incident segments, or one hyperedge end and one incident segments, or two hyperedge ends.
public IlvSegmentedHyperEdge.Segment[] getTerminatingSegments()
If this segment has a fixed angle, it is never fully terminated, since it is always possible to add more segments. Hence it never has any terminating segments. An array of size 0 is returned.
If this segment has a variable angle, it is fully terminated, if it has two incident segments, or one hyperedge end and one incident segments, or two hyperedge ends. In this case, an array with 0, 1 or 2 segments is returned.
public boolean endsAt(IlvSegmentedHyperEdge.Segment segment, IlvTransformer t)
segment
- The segment to be tested.t
- The transformer to draw the hyperedge,true
if this segment ends at the input segment.getTerminatingSegments()
public boolean isSelected()
true
if the segment is selected, and
false
if the segment is not selected.public void setSelected(boolean flag)
public IlvHyperEdgeEnd[] getEnds()
public double getAngle()
public boolean isColinear(IlvSegmentedHyperEdge.Segment seg)
public int getIncidentSegmentsCount()
public IlvSegmentedHyperEdge.Segment getIncidentSegment(int i)
public IlvSegmentedHyperEdge.Segment[] getIncidentSegments()
public IlvSegmentedHyperEdge.Segment getOtherIncidentSegment(IlvSegmentedHyperEdge.Segment segment)
public boolean isIncident(IlvSegmentedHyperEdge.Segment segment)
public IlvPoint[] getPoints(IlvTransformer t, IlvPoint[] pts)
t
- The transformer to draw the hyperedge.pts
- If an array of two points is passed, the array is filled with
the points and returned as result. If null is passed, a newly
allocated array is returned.public IlvPoint getIntersectionPoint(IlvSegmentedHyperEdge.Segment segment, IlvTransformer t)
segment
- The intersecting segment.t
- The transformer to draw the hyperedge.null
if the input segment
is not incident to this segment.public void setExtension(Object extension)
getExtension()
public Object getExtension()
setExtension(java.lang.Object)
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.