AnyLogic
Expand
Font size
All Implemented Interfaces:
IMarkupSegment, Serializable
Direct Known Subclasses:
GISMarkupSegment, MarkupSegment

public abstract class AbstractMarkupSegment
extends Object
implements IMarkupSegment, Serializable
This class represents a segment of IPath.
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
AbstractMarkupSegment() 

Method Summary

Modifier and TypeMethodDescription
doublegetAngle()
Returns the angle between the segment and XY plane
abstract PositiongetEnd(Position out)
Returns the location of the end position of the segment
abstract PositiongetStart(Position out)
Returns the location of the start position of the segment
booleanis2D()
Returns true, if the segment is flat in XY plane (dz = 0), false otherwise
doublelength()
Returns the length of the path segment
doublelength2D()
Returns the length of the projection of the path segment on XY plane

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Methods inherited from interface com.anylogic.engine.markup.IMarkupSegment

addTo, getDistanceSq, getEnd, getNearestPoint, getNearestPointOnRay2D, getOffsetOfPoint, getStart, setEnd, setStart, setStartNextTo

Constructor Details

AbstractMarkupSegment

public AbstractMarkupSegment()

Method Details

length

public double length()
Returns the length of the path segment
Specified by:
length in interface IMarkupSegment
Returns:
the length of the path segment, a positive number

is2D

public boolean is2D()
Returns true, if the segment is flat in XY plane (dz = 0), false otherwise
Returns:
true, if the segment is flat in XY plane (dz = 0), false otherwise

length2D

public double length2D()
Returns the length of the projection of the path segment on XY plane
Returns:
the length of the projection of the path segment on XY plane, a positive number

getAngle

public double getAngle()
Returns the angle between the segment and XY plane
Returns:
the angle between the segment and XY plane

getEnd

public abstract Position getEnd(Position out)
Returns the location of the end position of the segment
Parameters:
out - output object to write to, may be null
Returns:
the Position object with coordinates of the segment end

getStart

public abstract Position getStart(Position out)
Returns the location of the start position of the segment
Parameters:
out - output object to write to, may be null
Returns:
the Position object with coordinates of the segment start