Package com.anylogic.engine.markup
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.AbstractWall
- Methods inherited from class com.anylogic.engine.markup.AbstractLevelMarkup
- Methods inherited from class com.anylogic.engine.markup.MarkupShape
- Methods inherited from class com.anylogic.engine.markup.AbstractMarkup
- Methods inherited from class java.lang.Object
- Methods inherited from interface com.anylogic.engine.markup.AggregatableAnimationElement
- Constructor Details
- Method Details
- All Implemented Interfaces:
AggregatableAnimationElement
,HasLevel
,LevelElement
,LevelMarkup
,SVGElement
,Serializable
public class Wall extends AbstractWall
- See Also:
- Serialized Form
Constructor | Description |
---|---|
Wall() | |
Wall |
Deprecated.
deprecated in version 8.4, will be removed in the future releases
|
Modifier and Type | Method | Description |
---|---|---|
void | addSegment |
Adds segment to this markup element
|
void | arcTo |
Adds arc segment with two circular arcs (available for markup elements created with no-argument constructor)
|
boolean | contains |
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e.
|
boolean | contains |
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e.
|
boolean | containsSq |
Test if the shape contains the point with the given coordinates (relative
to this shape's container, i.e.
|
BoundingRectangle | getBoundingRectangle() | |
double | getNearestPoint |
Calculates (using the
output object) the point in this space markup element
nearest to the given (x, y, z) point. |
double | getNearestPoint |
Calculates (using the
output object) the point in this space markup element
nearest to the given (x, y) point. |
MarkupSegment | getSegment |
Returns the segment by its index
|
int | getSegmentCount() |
Returns the number of segments
|
Iterator<MarkupSegment> | iterator() |
Creates and returns read-only iterator over segments
|
final double | length() |
Returns the length of the markup element, calculated in 3D space.
|
void | lineTo |
Adds line segment (available for markup elements created with no-argument constructor)
|
void | startDrawing |
Starts drawing (available for markup elements created with no-argument constructor)
|
Path3D | toPath3D() |
Converts this markup element to
Path3D interface |
getColor, getFillingType, getLineWidth, getTexture, getZHeight, setColor, setColor, setFillingType, setLineWidth, setZHeight
error, 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
public Wall()
@Deprecated public Wall(Agent owner, ShapeDrawMode drawMode, boolean isPublic, WallFillingType fillingType, Paint color, double lineWidth, double zHeight, MarkupSegment... segments)
Deprecated.
deprecated in version 8.4, will be removed in the future releases
- Parameters:
owner
-drawMode
-isPublic
-fillingType
-color
-lineWidth
-zHeight
-segments
-
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)
- Overrides:
contains
in classAbstractWall
- Parameters:
px
- the x coordinate relative to this shape's containerpy
- the y coordinate relative to this shape's container- Returns:
true
if the shape contains the point with the given coordinates
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 containerpy
- the y coordinate relative to this shape's containersquareDistance
- 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
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 containerpy
- the y coordinate relative to this shape's containersquareDistance
- 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
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 pointy
- the y coordinate of the first pointz
- the z coordinate of the first point
public void lineTo(double x, double y, double z)
Adds line segment (available for markup elements created with no-argument constructor)
- Parameters:
x
- the x coordinate of the segment end pointy
- the y coordinate of the segment end pointz
- the z coordinate of the segment end point
public void arcTo(double x, double y, double z, double startAngle, double endAngle, double ratioStartToEnd)
Adds arc segment with two circular arcs (available for markup elements created with no-argument constructor)
- Parameters:
x
- the x coordinate of the segment end pointy
- the y coordinate of the segment end pointz
- the z coordinate of the segment end pointstartAngle
- orientation of segment line startendAngle
- orientation of segment line endratioStartToEnd
- ratio between two circular arcs
public void addSegment(MarkupSegment segment)
Adds segment to this markup element
- Parameters:
segment
- the segment, should be initialized if was created using no-argument constructor
public int getSegmentCount()
Returns the number of segments
- Returns:
- the number of segments
public MarkupSegment getSegment(int index)
Returns the segment by its index
- Parameters:
index
- the segment index, [0 ..getSegmentCount()
- 1]- Returns:
- the segment
public Iterator<MarkupSegment> iterator()
Creates and returns read-only iterator over segments
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
public double getNearestPoint(double x, double y, Point out)
Calculates (using the
output
object) the point in this space markup element
nearest to the given (x, y) point. Returns the square of distance to the point
(in the XY-projection).
All the calculations are performed in the horizontal projection (z-coordinates aren't used,
as if all of the z coordinates were zero).- Parameters:
x
- x coordinate of the pointy
- y coordinate of the pointoutput
- the output point to write result to. Note thatoutput.z
is left unchanged.- Returns:
- the square of distance to the nearest point in the horizontal (XY) projection
public double getNearestPoint(double x, double y, double z, Point out)
Calculates (using the
output
object) the point in this space markup element
nearest to the given (x, y, z) point. Returns the square of distance to the point.- Parameters:
x
- x coordinate of the pointy
- y coordinate of the pointz
- z coordinate of the pointoutput
- the output point to write result to.- Returns:
- the square of distance to the nearest point
public Path3D toPath3D()
Converts this markup element to
Path3D
interface@AnyLogicInternalAPI public BoundingRectangle getBoundingRectangle()