Package com.anylogic.engine.markup
- java.lang.Object
- com.anylogic.engine.markup.AbstractCurve<T>
- com.anylogic.engine.markup.AbstractNetworkCurve<MarkupSegment>
- com.anylogic.engine.markup.CircularCurve
- All Implemented Interfaces:
IPathData
,Serializable
,Iterable<MarkupSegment>
- Direct Known Subclasses:
CircularCurveImpl
@AnyLogicInternalAPI public abstract class CircularCurve extends AbstractNetworkCurve<MarkupSegment>
- See Also:
- Serialized Form
Constructor | Description |
---|---|
CircularCurve() |
Modifier and Type | Method | Description |
---|---|---|
void | arcTo |
Adds arc segment with two circular arcs (available for markup elements created with no-argument constructor)
|
Rectangle2D | getBounds() |
Deprecated.
|
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. |
Path2D | getPath2D() |
Returns the
Path2D representation of this curve |
final Point | getPointAtOffset |
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). |
void | lineTo |
Adds line segment (available for markup elements created with no-argument constructor)
|
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)
|
void | startDrawing |
Starts drawing (available for markup elements created with no-argument constructor)
|
Path3D | toPath3D() |
Converts this markup element to
Path3D interface |
addSegment, getEndPoint, getOffset3D, getPositionAt2DOffset, getPositionAtOffset, getSegment, getSegmentCount, getStartPoint, isInitialized, iterator, length, segmentsStream, toString
public CircularCurve()
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 startDrawing(Point startPoint)
Description copied from class:
AbstractNetworkCurve
Starts drawing (available for markup elements created with no-argument constructor)
- Specified by:
startDrawing
in classAbstractNetworkCurve<MarkupSegment>
- Parameters:
startPoint
- starting 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 lineTo(Point endPoint)
Description copied from class:
AbstractNetworkCurve
Adds line segment (available for markup elements created with no-argument constructor)
- Specified by:
lineTo
in classAbstractNetworkCurve<MarkupSegment>
- Parameters:
endPoint
- 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 final Point getPointAtOffset(double offset, Point out)
Returns the point located on the markup element with the given
This method may be slightly faster in some cases but returns no orientation information (rotations).
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 benull
- Returns:
- the Point object with coordinates of the point with the given offset
- See Also:
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 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 Path3D toPath3D()
Converts this markup element to
Path3D
interfacepublic Path2D getPath2D()
Returns the
Path2D
representation of this curve- Returns:
Path2D
representation of this curve
@Deprecated public Rectangle2D getBounds()
Deprecated.