Package com.anylogic.engine.markup
- Constructor Summary
- Method Summary
- Methods inherited from class com.anylogic.engine.markup.AbstractNetworkCurve
- Methods inherited from class com.anylogic.engine.markup.AbstractCurve
- Methods inherited from class java.lang.Object
- Methods inherited from interface java.lang.Iterable
- Constructor Detail
- Method Detail
- java.lang.Object
-
- com.anylogic.engine.markup.AbstractCurve<T>
-
- com.anylogic.engine.markup.AbstractNetworkCurve<MarkupSegment>
-
- com.anylogic.engine.markup.CircularCurve
- All Implemented Interfaces:
IPathData
,java.io.Serializable
,java.lang.Iterable<MarkupSegment>
- Direct Known Subclasses:
CircularCurveImpl
@AnyLogicInternalAPI public abstract class CircularCurve extends AbstractNetworkCurve<MarkupSegment>
- See Also:
- Serialized Form
CircularCurve() |
|
Constructor | Description |
---|
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)
|
java.awt.geom.Rectangle2D |
getBounds() |
Deprecated.
|
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. |
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. |
java.awt.geom.Path2D |
getPath2D() |
Returns the
Path2D representation of this curve |
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). |
void |
lineTo(double x,
double y,
double z) |
Adds line segment (available for markup elements created with no-argument constructor)
|
void |
lineTo(Point endPoint) |
Adds line segment (available for markup elements created with no-argument constructor)
|
void |
startDrawing(double x,
double y,
double z) |
Starts drawing (available for markup elements created with no-argument constructor)
|
void |
startDrawing(Point startPoint) |
Starts drawing (available for markup elements created with no-argument constructor)
|
Path3D |
toPath3D() |
Converts this markup element to
Path3D interface |
Modifier and Type | Method | Description |
---|
containsSq, getNearestPoint, getNearestPointOnRay, isClosed
addSegment, getEndPoint, getPositionAtOffset, getSegment, getSegmentCount, getStartPoint, isInitialized, iterator, length, segmentsStream, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
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:
AbstractCurve.getPositionAtOffset(double, Position)
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 java.awt.geom.Path2D getPath2D()
Returns the
Path2D
representation of this curve- Returns:
Path2D
representation of this curve
@Deprecated public java.awt.geom.Rectangle2D getBounds()
Deprecated.
-
How can we improve this article?
-