AnyLogic
Expand
Font size
All Implemented Interfaces:
IPathData, Serializable, Iterable<MarkupSegment>
Direct Known Subclasses:
CircularCurveImpl

@AnyLogicInternalAPI
public abstract class CircularCurve
extends AbstractNetworkCurve<MarkupSegment>
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
CircularCurve() 

Method Summary

Modifier and TypeMethodDescription
voidarcTo(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)
Rectangle2DgetBounds()
Deprecated.
doublegetNearestPoint(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.
doublegetNearestPoint(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.
Path2DgetPath2D()
Returns the Path2D representation of this curve
final PointgetPointAtOffset(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).
voidlineTo(double x, double y, double z)
Adds line segment (available for markup elements created with no-argument constructor)
voidlineTo(Point endPoint)
Adds line segment (available for markup elements created with no-argument constructor)
voidstartDrawing(double x, double y, double z)
Starts drawing (available for markup elements created with no-argument constructor)
voidstartDrawing(Point startPoint)
Starts drawing (available for markup elements created with no-argument constructor)
Path3DtoPath3D()
Converts this markup element to Path3D interface

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

containsSq, getNearestPoint, getNearestPointOnRay, isClosed

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

addSegment, getEndPoint, getPositionAtOffset, getSegment, getSegmentCount, getStartPoint, isInitialized, iterator, length, segmentsStream, toString

Methods inherited from class java.lang.Object

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

Methods inherited from interface java.lang.Iterable

forEach, spliterator

Constructor Details

CircularCurve

public CircularCurve()

Method Details

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

startDrawing

public void startDrawing(Point startPoint)
Description copied from class: AbstractNetworkCurve
Starts drawing (available for markup elements created with no-argument constructor)
Specified by:
startDrawing in class AbstractNetworkCurve<MarkupSegment>
Parameters:
startPoint - starting point

lineTo

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 point
y - the y coordinate of the segment end point
z - the z coordinate of the segment end point

lineTo

public void lineTo(Point endPoint)
Description copied from class: AbstractNetworkCurve
Adds line segment (available for markup elements created with no-argument constructor)
Specified by:
lineTo in class AbstractNetworkCurve<MarkupSegment>
Parameters:
endPoint - the segment end point

arcTo

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 point
y - the y coordinate of the segment end point
z - the z coordinate of the segment end point
startAngle - orientation of segment line start
endAngle - orientation of segment line end
ratioStartToEnd - ratio between two circular arcs

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:

getNearestPoint

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 point
y - y coordinate of the point
z - z coordinate of the point
output - the output point to write result to.
Returns:
the square of distance to the nearest point

getNearestPoint

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 point
y - y coordinate of the point
output - the output point to write result to. Note that output.z is left unchanged.
Returns:
the square of distance to the nearest point in the horizontal (XY) projection

toPath3D

public Path3D toPath3D()
Converts this markup element to Path3D interface

getPath2D

public Path2D getPath2D()
Returns the Path2D representation of this curve
Returns:
Path2D representation of this curve

getBounds

@Deprecated
public Rectangle2D getBounds()
Deprecated.