AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, HasLevel, SVGElement, Serializable
Direct Known Subclasses:
AbstractRoadSidePart

@AnyLogicInternalAPI
public abstract class AbstractRoadPart
extends AbstractRoadMarkup
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
AbstractRoadPart() 
AbstractRoadPart(Road road, ShapeDrawMode drawMode, boolean isPublic, double offset) 

Method Summary

Modifier and TypeMethodDescription
doublegetOffset()
Returns offset (measured by guideline of lane adjacent to road part) from beginning of lane guideline to beginning of road part in XY-projection, in pixels.
doublegetOffset(LengthUnits units)
Returns offset (measured by guideline of lane adjacent to road part) from beginning of lane guideline to beginning of road part in XY-projection, measured in the given units.
RoadgetRoad()
Returns road segment on which the road part is located.
voidsetOffset(double offset)
Sets offset (measured by guideline of lane adjacent to road part) from beginning of lane guideline to beginning of road part in XY-projection, in pixels.
voidsetOffset(double offset, LengthUnits units)
Sets offset (measured by guideline of lane adjacent to road part) from beginning of lane guideline to beginning of road part in XY-projection, measured in the given units.
voidsetRoad(Road road)
Sets road segment on which the road part is located.

Methods inherited from class com.anylogic.engine.markup.AbstractRoadMarkup

contains, getLevel, getRoadNetwork, setDebugInfoVisible, setRoadNetwork

Methods inherited from class com.anylogic.engine.markup.MarkupShape

error, getDrawMode, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner

Methods inherited from class java.lang.Object

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

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

postInitialize

Constructor Details

AbstractRoadPart

public AbstractRoadPart()

AbstractRoadPart

public AbstractRoadPart(Road road,
 ShapeDrawMode drawMode,
 boolean isPublic,
 double offset)

Method Details

getRoad

public Road getRoad()
Returns road segment on which the road part is located.
Returns:
Road segment on which the road part is located.

setRoad

public void setRoad(Road road)
Sets road segment on which the road part is located.
Parameters:
road - segment on which the road part is located.

getOffset

public double getOffset()
Returns offset (measured by guideline of lane adjacent to road part) from beginning of lane guideline to beginning of road part in XY-projection, in pixels.
Returns:
Offset from beginning of lane guideline to beginning of road part in XY-projection, in pixels.

getOffset

public double getOffset(LengthUnits units)
Returns offset (measured by guideline of lane adjacent to road part) from beginning of lane guideline to beginning of road part in XY-projection, measured in the given units.
Returns:
Offset from beginning of lane guideline to beginning of road part in XY-projection, measured in the given units.

setOffset

public void setOffset(double offset)
Sets offset (measured by guideline of lane adjacent to road part) from beginning of lane guideline to beginning of road part in XY-projection, in pixels.
Parameters:
offset - offset from beginning of lane guideline to beginning of road part, in pixels

setOffset

public void setOffset(double offset,
 LengthUnits units)
Sets offset (measured by guideline of lane adjacent to road part) from beginning of lane guideline to beginning of road part in XY-projection, measured in the given units.
Parameters:
offset - offset from beginning of lane guideline to beginning of road part, measured in the given units