Package com.anylogic.engine.markup
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkupSegment
- 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 | Description |
---|---|
AbstractMarkupSegment() |
Modifier and Type | Method | Description |
---|---|---|
double | getAngle() |
Returns the angle between the segment and XY plane
|
abstract Position | getEnd |
Returns the location of the end position of the segment
|
abstract Position | getStart |
Returns the location of the start position of the segment
|
boolean | is2D() |
Returns true, if the segment is flat in XY plane (dz = 0), false otherwise
|
double | length() |
Returns the length of the path segment
|
double | length2D() |
Returns the length of the projection of the path segment on XY plane
|
public AbstractMarkupSegment()
public double length()
Returns the length of the path segment
- Specified by:
length
in interfaceIMarkupSegment
- Returns:
- the length of the path segment, a positive number
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
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
public double getAngle()
Returns the angle between the segment and XY plane
- Returns:
- the angle between the segment and XY plane
public abstract Position getEnd(Position out)
Returns the location of the end position of the segment
- Parameters:
out
- output object to write to, may benull
- Returns:
- the Position object with coordinates of the segment end
public abstract Position getStart(Position out)
Returns the location of the start position of the segment
- Parameters:
out
- output object to write to, may benull
- Returns:
- the Position object with coordinates of the segment start