Package com.anylogic.engine.markup
          
          
- java.lang.Object
- com.anylogic.engine.markup.AbstractMarkupSubunit<AreaNode>
- com.anylogic.engine.markup.Attractor
- All Implemented Interfaces:
- Serializable
public class Attractor extends AbstractMarkupSubunit<AreaNode>
Attractor markup element: defines (x, y) location + orientation (rotation) of a point within some area / node markup.
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
- 
RectangularNodePolygonalNodeSerialized Form
| Constructor | Description | 
|---|---|
| Attractor | Deprecated.
 use AreaNode#addAttractor(x, y, orientation) instead | 
| Modifier and Type | Method | Description | 
|---|---|---|
| double | getOrientation() | Returns the orientation. | 
| Position | getPosition | Returns the position associated with this attractor. | 
| double | getRelativeX() | Deprecated. | 
| double | getRelativeY() | Deprecated. | 
| double | getX() | Returns the absolute x coordinate | 
| double | getY() | Returns the absolute y coordinate | 
| double | getZ() | Returns the absolute z coordinate (which is defined by container node/area) | 
@Deprecated public Attractor(double x, double y, double orientation) 
Deprecated.
use AreaNode#addAttractor(x, y, orientation) instead
Creates new attractor object
- Parameters:
- x- the x coordinate relative to Area/Node, measured in pixels
- y- the y coordinate relative to Area/Node, measured in pixels
- orientation- the orientation in radians, clockwise, see also- Math.toRadians(double)
- See Also:
@Deprecated public double getRelativeX()
Deprecated.
Returns the x coordinate relative to Area/Node
- Returns:
- the x coordinate relative to Area/Node
@Deprecated public double getRelativeY()
Deprecated.
Returns the y coordinate relative to Area/Node
- Returns:
- the y coordinate relative to Area/Node
public double getX()
Returns the absolute x coordinate
- Returns:
- the absolute x coordinate
public double getY()
Returns the absolute y coordinate
- Returns:
- the absolute y coordinate
public double getZ()
Returns the absolute z coordinate (which is defined by container node/area)
- Returns:
- the absolute z coordinate
public double getOrientation()
Returns the orientation.
- Returns:
- the orientation in radians, clockwise
- See Also:
- 
Math.toDegrees(double)
public Position getPosition(Position out) 
Returns the position associated with this attractor.
 The vertical rotation is set to 
NaN- Parameters:
- out- the Position object to write to, may be- null
- Returns:
- the given outobject, if was notnull, or new instance otherwise