AnyLogic
Expand
Font size
All Implemented Interfaces:
AggregatableAnimationElement, HasLevel, LevelElement, LevelMarkup, SVGElement, java.io.Serializable

public class BulkConveyorBelt
extends AbstractFluidMarkup<BulkConveyorDataSource>
See Also:
Serialized Form

Constructor Summary

Constructors 
BulkConveyorBelt()  
BulkConveyorBelt​(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double width, java.awt.Paint color, boolean drawStands, double standsLevel, MarkupSegment... segments)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
BulkConveyorBelt​(Agent owner, ShapeDrawMode drawMode, boolean isPublic, double width, java.awt.Paint color, MarkupSegment... segments)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Constructor Description

Method Summary

All Methods Instance Methods Concrete Methods 
void addSegment​(MarkupSegmentLine segment)
Adds segment to this markup element
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.
boolean contains​(double px, double py, double distance)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
boolean containsSq​(double px, double py, double squareDistance)
Test if the shape contains the point with the given coordinates (relative to this shape's container, i.e.
Point getEndPoint()
Returns the location of the end point
Point getEndPoint​(Point out)
Returns the location of the end point
Position getEndPosition()
Returns the end position
Position getEndPosition​(Position out)
Returns the end position
double getLineWidth()
Returns the width of the conveyor belt
Point getPointAtOffset​(double offset, LengthUnits units, Point out)
Returns the point located on the markup element with the given offset distance calculated from start point.
This method may be slightly faster in some cases but returns no orientation information (rotations).
Point getPointAtOffset​(double offset, Point out)
Returns the point located on the markup element with the given offset distance calculated from start point.
This method may be slightly faster in some cases but returns no orientation information (rotations).
Position getPositionAtOffset​(double offset, LengthUnits units, Position out)
Returns the point (+rotations) located on the markup element with the given offset distance calculated from start point.
Position getPositionAtOffset​(double offset, Position out)
Returns the point (+rotations) located on the markup element with the given offset distance calculated from start point.
MarkupSegment getSegment​(int index)
Returns the segment by its index
int getSegmentCount()
Returns the number of segments
double getStandsLevel()
Returns the base level Z-level to draw conveyor stands from.
Point getStartPoint()
Returns the location of the start point
Point getStartPoint​(Point out)
Returns the location of the start point
Position getStartPosition()
Returns the start position
Position getStartPosition​(Position out)
Returns the start position
boolean isDrawStands()
Returns true if this conveyor is drawn with stands
java.util.Iterator<MarkupSegment> iterator()
Creates and returns read-only iterator over segments
double length()
Returns the length of the markup element, calculated in 3D space.
double length​(LengthUnits units)
Returns the length of the markup element, calculated in 3D space.
void setDrawStands​(boolean drawStands)
Sets to draw stands for conveyor or not
void setLineWidth​(double width)
Sets the width of the conveyor belt
void setStandsLevel​(double standsLevel)
Set the base Z-level to draw conveyor stands from.
void startDrawing​(double x, double y, double z)
Starts drawing (available for markup elements created with no-argument constructor)
void updateDynamicProperties()
Updates dynamic properties of this shape only (without structural contents, if any) in a given context.
Method should be overridden for shapes with dynamic properties.
Modifier and Type Method Description

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

getColor, getDataSource, getTexture, setColor, setColor, setDataSource

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

getDrawMode, getLevel, setLevel

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

error, 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, 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

initializeInternal, onAggregatorVisibilityChanged, postInitialize

Constructor Detail

BulkConveyorBelt

public BulkConveyorBelt()

BulkConveyorBelt

@Deprecated
public BulkConveyorBelt​(Agent owner,
                        ShapeDrawMode drawMode,
                        boolean isPublic,
                        double width,
                        java.awt.Paint color,
                        MarkupSegment... segments)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Parameters:
owner -
drawMode -
isPublic -
width -
color -
segments -

BulkConveyorBelt

@Deprecated
public BulkConveyorBelt​(Agent owner,
                        ShapeDrawMode drawMode,
                        boolean isPublic,
                        double width,
                        java.awt.Paint color,
                        boolean drawStands,
                        double standsLevel,
                        MarkupSegment... segments)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
Parameters:
owner -
drawMode -
isPublic -
width -
color -
drawStands -
standsLevel -
segments -

Method Detail

setLineWidth

public void setLineWidth​(double width)
Sets the width of the conveyor belt
Parameters:
width - new width of the conveyor belt

getLineWidth

public double getLineWidth()
Returns the width of the conveyor belt
Returns:
width of the conveyor belt

setDrawStands

public void setDrawStands​(boolean drawStands)
Sets to draw stands for conveyor or not
Parameters:
drawStands - true to draw stands
See Also:
setStandsLevel(double)

isDrawStands

public boolean isDrawStands()
Returns true if this conveyor is drawn with stands
See Also:
getStandsLevel()

setStandsLevel

public void setStandsLevel​(double standsLevel)
Set the base Z-level to draw conveyor stands from. If the conveyor has sloped areas, it will be drawn with stands of different height - starting from the same base level.
Parameters:
standsLevel - the base level.

getStandsLevel

public double getStandsLevel()
Returns the base level Z-level to draw conveyor stands from.
See Also:
isDrawStands()

addSegment

public void addSegment​(MarkupSegmentLine segment)
Adds segment to this markup element
Parameters:
segment - the segment, should be initialized if it was created using no-argument constructor

getSegmentCount

public int getSegmentCount()
Returns the number of segments
Returns:
the number of segments

getSegment

public MarkupSegment getSegment​(int index)
Returns the segment by its index
Parameters:
index - the segment index, [0 .. getSegmentCount() - 1]
Returns:
the segment

iterator

public java.util.Iterator<MarkupSegment> iterator()
Creates and returns read-only iterator over segments

getStartPoint

public Point getStartPoint​(Point out)
Returns the location of the start point
Parameters:
out - output object to write to, may be null
Returns:
the Point object with coordinates of the first point

getStartPoint

public Point getStartPoint()
Returns the location of the start point
Returns:
the Point object with coordinates of the first point

getEndPoint

public Point getEndPoint​(Point out)
Returns the location of the end point
Parameters:
out - output object to write to, may be null
Returns:
the Point object with coordinates of the last point

getEndPoint

public Point getEndPoint()
Returns the location of the end point
Returns:
the Point object with coordinates of the last point

getStartPosition

public Position getStartPosition​(Position out)
Returns the start position
Parameters:
out - output object to write to, may be null
Returns:
the Position object with coordinates of the first position

getStartPosition

public Position getStartPosition()
Returns the start position
Returns:
the Position object with coordinates of the first position

getEndPosition

public Position getEndPosition​(Position out)
Returns the end position
Parameters:
out - output object to write to, may be null
Returns:
the Position object with coordinates of the last position

getEndPosition

public Position getEndPosition()
Returns the end position
Returns:
the Position object with coordinates of the last position

length

public final double length()
Returns the length of the markup element, calculated in 3D space.
Returns:
the length of the markup element (measured in pixels), a positive number

length

public final double length​(LengthUnits units)
Returns the length of the markup element, calculated in 3D space.
Parameters:
units - the units of length
Returns:
the length of the markup element, a positive number
Since:
7.1

getPointAtOffset

public final Point getPointAtOffset​(double offset,
                                    Point out)
Returns the point located on the markup element with the given offset distance calculated from start point.
This method may be slightly faster in some cases but returns no orientation information (rotations).
Parameters:
offset - offset, non-negative value, should be less or equal to the full length.
out - output object to write to, may be null
Returns:
the Point object with coordinates of the point with the given offset
See Also:
getPositionAtOffset(double, Position)

getPointAtOffset

public final Point getPointAtOffset​(double offset,
                                    LengthUnits units,
                                    Point out)
Returns the point located on the markup element with the given offset distance calculated from start point.
This method may be slightly faster in some cases but returns no orientation information (rotations).
Parameters:
offset - offset, non-negative value, should be less or equal to the full length.
units - the length units
out - output object to write to, may be null
Returns:
the Point object with coordinates of the point with the given offset
See Also:
getPositionAtOffset(double, Position)

getPositionAtOffset

public final Position getPositionAtOffset​(double offset,
                                          Position out)
Returns the point (+rotations) located on the markup element with the given offset distance calculated from start point.
Parameters:
offset - offset, non-negative value, should be less or equal to the full length.
out - output object to write to, may be null
Returns:
the Position object with coordinates of the point with the given offset and orientation along markup element line at this point

getPositionAtOffset

public final Position getPositionAtOffset​(double offset,
                                          LengthUnits units,
                                          Position out)
Returns the point (+rotations) located on the markup element with the given offset distance calculated from start point.
Parameters:
offset - offset, non-negative value, should be less or equal to the full length.
units - length units
out - output object to write to, may be null
Returns:
the Position object with coordinates of the point with the given offset and orientation along markup element line at this point

contains

public boolean contains​(double px,
                        double py)
Description copied from class: MarkupShape
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)
Specified by:
contains in class MarkupShape
Parameters:
px - the x coordinate relative to this shape's container
py - the y coordinate relative to this shape's container
Returns:
true if the shape contains the point with the given coordinates

contains

public boolean contains​(double px,
                        double py,
                        double distance)
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), using the given tolerance
Parameters:
px - the x coordinate relative to this shape's container
py - the y coordinate relative to this shape's container
distance - the distance tolerance to determine whether the given point lies on the markup element line or not
Returns:
true if the shape contains the point with the given coordinates

containsSq

public boolean containsSq​(double px,
                          double py,
                          double squareDistance)
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), using the given tolerance
Parameters:
px - the x coordinate relative to this shape's container
py - the y coordinate relative to this shape's container
squareDistance - the square of distance tolerance to determine whether the given point lies on the markup element line or not
Returns:
true if the shape contains the point with the given coordinates

startDrawing

public void startDrawing​(double x,
                         double y,
                         double z)
Starts drawing (available for markup elements created with no-argument constructor)
Parameters:
x - the x coordinate of the first point
y - the y coordinate of the first point
z - the z coordinate of the first point

updateDynamicProperties

@AnyLogicInternalCodegenAPI
public void updateDynamicProperties()
Description copied from class: AbstractMarkup
Updates dynamic properties of this shape only (without structural contents, if any) in a given context.
Method should be overridden for shapes with dynamic properties. Note that you should call super.updateDynamicProperties() at the end of overridden method
Overrides:
updateDynamicProperties in class AbstractMarkup
How can we improve this article?