@AnyLogicInternalAPI public abstract class NetworkMarkupElement extends MarkupShape implements INetworkMarkupElement
Constructor and Description |
---|
NetworkMarkupElement() |
NetworkMarkupElement(Agent owner) |
NetworkMarkupElement(Agent owner,
ShapeDrawMode drawMode,
boolean isPublic) |
Modifier and Type | Method and Description |
---|---|
ShapeDrawMode |
getDrawMode()
Returns the drawing mode of the shape (where to draw this shape: 2D, 3D or 2D+3D).
|
Level |
getLevel()
Returns level associated with this space markup element or
null
if this element has no level |
double |
getNearestPoint(double x,
double y,
double z,
LengthUnits units,
Point output)
Calculates (using the
output object) the point in this space markup element
nearest to the given (x, y, z) point. |
abstract double |
getNearestPoint(double x,
double y,
double z,
Point output)
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,
LengthUnits units,
Point output)
Calculates (using the
output object) the point in this space markup element
nearest to the given (x, y) point. |
abstract double |
getNearestPoint(double x,
double y,
Point output)
Calculates (using the
output object) the point in this space markup element
nearest to the given (x, y) point. |
double |
getNearestPoint(Point givenPoint,
Point out)
Calculates (using the
output object) the point in this space markup element
nearest to the given point. |
Network |
getNetwork() |
void |
setLevel(Level level)
Sets the level of this element.
|
contains, 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
contains, getSpace, randomPointInside, randomPointInside, randomPointInside, randomPointInside
postInitialize
public NetworkMarkupElement()
public NetworkMarkupElement(Agent owner)
public NetworkMarkupElement(Agent owner, ShapeDrawMode drawMode, boolean isPublic)
public ShapeDrawMode getDrawMode()
MarkupShape
getDrawMode
in class MarkupShape
public abstract double getNearestPoint(double x, double y, Point output)
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).x
- x coordinate of the pointy
- y coordinate of the pointoutput
- the output point to write result to. Note that output.z
is left unchanged.public double getNearestPoint(double x, double y, LengthUnits units, Point output)
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).x
- x coordinate of the pointy
- y coordinate of the pointunits
- the units of lengthoutput
- the output point to write result to. Note that output.z
is left unchanged.public abstract double getNearestPoint(double x, double y, double z, Point output)
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.x
- x coordinate of the pointy
- y coordinate of the pointz
- z coordinate of the pointoutput
- the output point to write result to.public double getNearestPoint(double x, double y, double z, LengthUnits units, Point output)
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.x
- x coordinate of the pointy
- y coordinate of the pointz
- z coordinate of the pointunits
- the units of lengthoutput
- the output point to write result to.public double getNearestPoint(Point givenPoint, Point out)
INetworkMarkupElement
output
object) the point in this space markup element
nearest to the given point. Returns the square of distance to the point.getNearestPoint
in interface INetworkMarkupElement
givenPoint
- given pointout
- the output point to write result to.public Network getNetwork()
getNetwork
in interface INetworkMarkupElement
null
if this element isn't a part of a networkpublic Level getLevel()
HasLevel
null
if this element has no levelgetLevel
in interface HasLevel
getLevel
in class MarkupShape
public void setLevel(Level level)
level
- new levelCopyright © AnyLogic North America, LLC. All Rights Reserved.