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

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

Constructor Summary

Constructors 
AbstractRoadPart()  
AbstractRoadPart​(Road road, ShapeDrawMode drawMode, boolean isPublic, double offset)  
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods 
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.
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.
Road getRoad()
Returns road segment on which the road part is located.
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.
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.
void setRoad​(Road road)
Sets road segment on which the road part is located.
Modifier and Type Method Description

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 com.anylogic.engine.markup.AbstractMarkup

discardOwner, executeUserAction, findSVGElement, getName, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties

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 Detail

AbstractRoadPart

public AbstractRoadPart()

AbstractRoadPart

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

Method Detail

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
How can we improve this article?