public abstract class ConveyorStation<T extends Agent> extends ConveyorPathPart<T>
Constructor and Description |
---|
ConveyorStation(ConveyorPath<? extends T> conveyor) |
ConveyorStation(ConveyorPath<? extends T> conveyor,
double offset,
double lengthInMeters)
Constructor
|
ConveyorStation(ConveyorPath<? extends T> conveyor,
ShapeDrawMode drawMode,
boolean isPublic,
double offset,
double lengthInMeters)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(double px,
double py)
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e. in the same system with the coordinates
of this shape, x and y)
|
double |
getLength(LengthUnits units)
Returns the length of this element
|
double |
getNearestPoint(Point givenPoint,
Point out)
Calculates (using the
output object) the point in this space markup element
nearest to the given point. |
Point |
randomPointInside(java.util.Random rng,
Point out)
Returns the randomly chosen point inside/along the given space markup element.
|
void |
setLength(double length,
LengthUnits units)
Sets length of this conveyor part in XY-projection, measured in the given units.
|
void |
setNetwork(ConveyorNetwork network)
Sets the network for this element.
|
getConveyor, getOffset, getOffset, setConveyor, setOffset, setOffset
getLevel, getNetwork
error, getDrawMode, getFullName, getOutsideLevelZ, getPresentable, getSpace, initialize, isClickHandled, isPublic, onClick, remove, setDrawMode, setOwner
discardOwner, executeUserAction, findSVGElement, getName, getSVGId, initializeInternal, isVisible, onAggregatorInitialized, onAggregatorVisibilityChanged, removeSVGFromOwner, resetSVGState, setVisible, updateDynamicProperties, updateDynamicPropertiesStructural, updateSVGProperties
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSpace, randomPointInside, randomPointInside, randomPointInside
postInitialize
public ConveyorStation(ConveyorPath<? extends T> conveyor)
public ConveyorStation(ConveyorPath<? extends T> conveyor, double offset, double lengthInMeters)
conveyor
- the conveyoroffset
- offset measured from the beginning of conveyor to the end of this station, in pixels.lengthInMeters
- the length of this station in meters.public ConveyorStation(ConveyorPath<? extends T> conveyor, ShapeDrawMode drawMode, boolean isPublic, double offset, double lengthInMeters)
conveyor
- the conveyordrawMode
- isPublic
- offset
- offset measured from the beginning of conveyor to the end of this station, in pixels.lengthInMeters
- the length of this station in meters.public void setNetwork(ConveyorNetwork network)
ConveyorMarkupElement
setNetwork
in class ConveyorMarkupElement<T extends Agent>
network
- new networkpublic double getLength(LengthUnits units)
units
- length unitspublic void setLength(double length, LengthUnits units)
length,
- measured in the given unitspublic double getNearestPoint(Point givenPoint, Point out)
INetworkMarkupElement
output
object) the point in this space markup element
nearest to the given point. Returns the square of distance to the point.givenPoint
- given pointout
- the output point to write result to.public Point randomPointInside(java.util.Random rng, Point out)
INetworkMarkupElement
rng
- the random number generator.out
- output object to write to, may be null
public boolean contains(double px, double py)
MarkupShape
contains
in interface INetworkMarkupElement
contains
in class MarkupShape
px
- the x coordinate relative to this shape's containerpy
- the y coordinate relative to this shape's containertrue
if the shape contains the point with the given
coordinatesCopyright © AnyLogic North America, LLC. All Rights Reserved.