Package | com.yworks.yfiles.layout.router.polyline |
Class | public class OrthogonalInterval |
Inheritance | OrthogonalInterval YObject Object |
During a com.yworks.yfiles.layout.router.polyline.PathSearch, orthogonal intervals are used to describe where an edge enters or leaves a com.yworks.yfiles.layout.router.polyline.PartitionCell.
See also
Property | Defined By | ||
---|---|---|---|
center : YPoint [read-only]
Returns the center of this orthogonal interval in the 2d-coordinate system. | OrthogonalInterval | ||
location : Number [read-only]
Returns the vertical coordinate for horizontal intervals or the horizontal coordinate for vertical intervals, respectively. | OrthogonalInterval | ||
max : Number [read-only]
Returns the upper bound of the orthogonal interval. | OrthogonalInterval | ||
min : Number [read-only]
Returns the lower bound of the orthogonal interval. | OrthogonalInterval | ||
range : Interval [read-only]
Returns the range of this orthogonal interval. | OrthogonalInterval | ||
size : Number [read-only]
Returns the length of the orthogonal interval. | OrthogonalInterval | ||
vertical : Boolean [read-only]
Determines whether the orthogonal interval is oriented vertically. | OrthogonalInterval |
Method | Defined By | ||
---|---|---|---|
OrthogonalInterval(range:Interval, location:Number, isVertical:Boolean, init:Boolean = true)
Creates a new instance using the range as interval bounds. | OrthogonalInterval | ||
[static]
Calculates the intersection of the given orthogonal intervals. | OrthogonalInterval | ||
[static]
Calculates the union of the given orthogonal intervals. | OrthogonalInterval | ||
coveredBy(other:OrthogonalInterval):Boolean
Checks if the given orthogonal interval covers this one fully. | OrthogonalInterval | ||
crosses(other:OrthogonalInterval):Boolean
Determines whether this orthogonal interval crosses the given one. | OrthogonalInterval | ||
distanceTo(other:OrthogonalInterval):Number
Returns the distance of the range s of this orthogonal interval and the given orthogonal interval. | OrthogonalInterval | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | OrthogonalInterval | ||
hashCode():int | YObject | ||
hasSameRange(other:OrthogonalInterval):Boolean
Checks if this orthogonal interval and the given orthogonal interval cover the same range. | OrthogonalInterval | ||
intersects(other:OrthogonalInterval):Boolean
Checks if this orthogonal interval intersects the given orthogonal interval. | OrthogonalInterval | ||
intersects2(other:OrthogonalInterval, minIntersection:Number):Boolean
Checks if this orthogonal interval intersects the given orthogonal interval and the intersection has a minimal size of minIntersection. | OrthogonalInterval | ||
manhattanDistanceTo(other:OrthogonalInterval):Number
Returns the manhattan distance of this orthogonal interval and the given orthogonal interval. | OrthogonalInterval | ||
[static]
Creates a new instance using the range as interval bounds. | OrthogonalInterval | ||
newOrthogonalInterval2(from:Number, to:Number, location:Number, isVertical:Boolean):OrthogonalInterval [static]
Creates a new instance using the from and to value as interval bounds. | OrthogonalInterval | ||
toString():String | OrthogonalInterval |
Method | Defined By | ||
---|---|---|---|
initOrthogonalInterval1(range:Interval, location:Number, isVertical:Boolean):void
Initializes this object. | OrthogonalInterval | ||
initOrthogonalInterval2(from:Number, to:Number, location:Number, isVertical:Boolean):void
Initializes this object. | OrthogonalInterval |
center | property |
center:YPoint
[read-only] Returns the center of this orthogonal interval in the 2d-coordinate system.
public function get center():YPoint
location | property |
location:Number
[read-only] Returns the vertical coordinate for horizontal intervals or the horizontal coordinate for vertical intervals, respectively.
public function get location():Number
max | property |
max:Number
[read-only] Returns the upper bound of the orthogonal interval.
public function get max():Number
min | property |
min:Number
[read-only] Returns the lower bound of the orthogonal interval.
public function get min():Number
range | property |
range:Interval
[read-only] Returns the range of this orthogonal interval.
public function get range():Interval
size | property |
size:Number
[read-only] Returns the length of the orthogonal interval.
public function get size():Number
See also
vertical | property |
vertical:Boolean
[read-only] Determines whether the orthogonal interval is oriented vertically.
public function get vertical():Boolean
OrthogonalInterval | () | Constructor |
public function OrthogonalInterval(range:Interval, location:Number, isVertical:Boolean, init:Boolean = true)
Creates a new instance using the range
as interval bounds.
range:Interval — the range
| |
location:Number — the location in the 2D coordinate system
| |
isVertical:Boolean — true , if the orthogonal interval is vertical; false , if it is horizontal.
| |
init:Boolean (default = true ) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
IllegalArgumentException — if range is null
|
calculateIntersection | () | method |
public static function calculateIntersection(i1:OrthogonalInterval, i2:OrthogonalInterval):OrthogonalInterval
Calculates the intersection of the given orthogonal intervals.
If the created orthogonal interval is vertical, it will have the same horizontal location as i2 and the shared vertical range of both intervals. If it is horizontal, it will have the same vertical location as i2 and the shared horizontal range of both intervals. The orthogonal intervals must have same orientation.
Parameters
i1:OrthogonalInterval — The first orthogonal interval.
| |
i2:OrthogonalInterval — The second orthogonal interval.
|
OrthogonalInterval — The shared orthogonal interval of both given orthogonal intervals.
|
IllegalArgumentException — if the orthogonal intervals have different orientations
|
See also
calculateUnion | () | method |
public static function calculateUnion(i1:OrthogonalInterval, i2:OrthogonalInterval):OrthogonalInterval
Calculates the union of the given orthogonal intervals.
If the created orthogonal interval is vertical, it will have the same horizontal location as i2 and the shared vertical range of both orthogonal intervals. If it is horizontal, it will have the same vertical location as i2 and the shared vertical range of both orthogonal intervals. The orthogonal intervals must have same orientation.
Parameters
i1:OrthogonalInterval — The first orthogonal interval.
| |
i2:OrthogonalInterval — The second orthogonal interval.
|
OrthogonalInterval — The union of both given orthogonal intervals.
|
IllegalArgumentException — if the orthogonal intervals have different orientations
|
See also
coveredBy | () | method |
public function coveredBy(other:OrthogonalInterval):Boolean
Checks if the given orthogonal interval covers this one fully.
The given orthogonal interval covers this orthogonal interval, if this interval's range is covered by the given interval's range. The location of both orthogonal intervals is ignored. The orthogonal intervals must have same orientation.
Parameters
other:OrthogonalInterval — The other orthogonal interval
|
Boolean — true , if this orthogonal interval is fully covered by the other orthogonal interval, false otherwise.
|
IllegalArgumentException — if the orthogonal intervals have different orientations
|
See also
crosses | () | method |
public function crosses(other:OrthogonalInterval):Boolean
Determines whether this orthogonal interval crosses the given one.
The orthogonal intervals must have different orientations.
Parameters
other:OrthogonalInterval — The other orthogonal interval.
|
Boolean — true if this orthogonal interval crosses the given one, false otherwise.
|
IllegalArgumentException — if orthogonal intervals have same orientation
|
distanceTo | () | method |
public function distanceTo(other:OrthogonalInterval):Number
Returns the distance of the range s of this orthogonal interval and the given orthogonal interval.
The orthogonal intervals must have same orientation.
Parameters
other:OrthogonalInterval — The second orthogonal interval.
|
Number — 0 if the orthogonal intervals intersects(), otherwise the minimal distance between the orthogonal intervals.
|
IllegalArgumentException — if the orthogonal intervals have different orientations
|
See also
getClass | () | method |
override public function getClass():Class
ReturnsClass |
hasSameRange | () | method |
public function hasSameRange(other:OrthogonalInterval):Boolean
Checks if this orthogonal interval and the given orthogonal interval cover the same range.
If both orthogonal intervals cover the same range, they are considered same. The location of both orthogonal intervals is ignored. The orthogonal intervals must have same orientation.
Parameters
other:OrthogonalInterval — The second orthogonal interval
|
Boolean — true , if the orthogonal intervals cover the same range, false otherwise.
|
IllegalArgumentException — if the orthogonal intervals have different orientations
|
See also
initOrthogonalInterval1 | () | method |
protected final function initOrthogonalInterval1(range:Interval, location:Number, isVertical:Boolean):void
Initializes this object. See the documentation of the corresponding factory method newOrthogonalInterval1()
for details.
Parameters
range:Interval | |
location:Number | |
isVertical:Boolean |
See also
initOrthogonalInterval2 | () | method |
protected final function initOrthogonalInterval2(from:Number, to:Number, location:Number, isVertical:Boolean):void
Initializes this object. See the documentation of the corresponding factory method newOrthogonalInterval2()
for details.
Parameters
from:Number | |
to:Number | |
location:Number | |
isVertical:Boolean |
See also
intersects | () | method |
public function intersects(other:OrthogonalInterval):Boolean
Checks if this orthogonal interval intersects the given orthogonal interval.
Orthogonal intervals intersect each other, if their ranges intersect each other. The location of both orthogonal intervals is ignored. The orthogonal intervals must have same orientation.
Parameters
other:OrthogonalInterval — the second orthogonal interval.
|
Boolean — true if both orthogonal intervals intersect, false otherwise.
|
IllegalArgumentException — if the orthogonal intervals have different orientations
|
See also
intersects2 | () | method |
public function intersects2(other:OrthogonalInterval, minIntersection:Number):Boolean
Checks if this orthogonal interval intersects the given orthogonal interval and the intersection has a minimal size of minIntersection
.
Orthogonal intervals intersect each other, if their ranges intersect each other by at least minIntersection
. The location of both orthogonal intervals is ignored. The orthogonal intervals must have same orientation.
Parameters
other:OrthogonalInterval — the second orthogonal interval.
| |
minIntersection:Number — The minimal size of the intersection.
|
Boolean — true if both orthogonal intervals intersect, false otherwise.
|
IllegalArgumentException — if the orthogonal intervals have different orientations
|
See also
manhattanDistanceTo | () | method |
public function manhattanDistanceTo(other:OrthogonalInterval):Number
Returns the manhattan distance of this orthogonal interval and the given orthogonal interval.
If both intervals have the same orientation, the manhattan distance is the sum of the distance between the intervals' ranges and the distance between the intervals' locations.
If the intervals have different orientations, the manhattan distance is the sum of the distances between one interval's range with the other interval's location.
Parameters
other:OrthogonalInterval — The second orthogonal interval.
|
Number — The manhattan distance between this interval and the given one.
|
newOrthogonalInterval1 | () | method |
public static function newOrthogonalInterval1(range:Interval, location:Number, isVertical:Boolean):OrthogonalInterval
Creates a new instance using the range
as interval bounds.
Parameters
range:Interval — the range
| |
location:Number — the location in the 2D coordinate system
| |
isVertical:Boolean — true , if the orthogonal interval is vertical; false , if it is horizontal.
|
OrthogonalInterval |
IllegalArgumentException — if range is null
|
newOrthogonalInterval2 | () | method |
public static function newOrthogonalInterval2(from:Number, to:Number, location:Number, isVertical:Boolean):OrthogonalInterval
Creates a new instance using the from
and to
value as interval bounds.
Parameters
from:Number — the start of the interval bounds
| |
to:Number — the end of the interval bounds
| |
location:Number — the location in the 2D coordinate system
| |
isVertical:Boolean — true , if the orthogonal interval is vertical; false , if it is horizontal vertical.
|
OrthogonalInterval |
toString | () | method |
public function toString():String
ReturnsString |