Class StaticLocation2d
java.lang.Object
org.djutils.draw.point.Point2d
org.djutils.draw.point.OrientedPoint2d
nl.tudelft.simulation.dsol.animation.StaticLocation2d
- All Implemented Interfaces:
Serializable,Locatable,Drawable<Point2d>,Drawable2d,Oriented<OrientedPoint2d>,Oriented2d<OrientedPoint2d>,Point<Point2d>
A StaticLocation in 2 dimensions.
Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Author:
- Peter Jacobs
- See Also:
-
Field Summary
Fields inherited from class org.djutils.draw.point.OrientedPoint2d
dirZ -
Constructor Summary
ConstructorsConstructorDescriptionStaticLocation2d(double x, double y, double rotZ, Bounds2d bounds) constructs a new StaticLocation.StaticLocation2d(Point2D point2D, double rotZ, Bounds2d bounds) constructs a new StaticLocation.StaticLocation2d(OrientedPoint2d location, Bounds2d bounds) constructs a new StaticLocation. -
Method Summary
Modifier and TypeMethodDescriptionreturns the bounds of the locatable object.returns the location of an object.Methods inherited from class org.djutils.draw.point.OrientedPoint2d
abs, epsilonEquals, equals, getDirZ, getPoints, hashCode, interpolate, neg, normalize, rotate, scale, toString, toString, translate, translateMethods inherited from class org.djutils.draw.point.Point2d
circleIntersections, closestPointOnLine, closestPointOnLine, closestPointOnLine, closestPointOnSegment, closestPointOnSegment, directionTo, distance, distanceSquared, epsilonEquals, fractionalPositionOnLine, getX, getY, interpolate, intersectionOfLines, intersectionOfLines, intersectionOfLines, intersectionOfLineSegments, intersectionOfLineSegments, intersectionOfLineSegments, size, toPoint2DMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.djutils.draw.Drawable
getPointList, toString, toStringMethods inherited from interface org.djutils.draw.Drawable2d
getDimensions
-
Constructor Details
-
StaticLocation2d
constructs a new StaticLocation.- Parameters:
x- double; the x locationy- double; the y locationrotZ- double; rotation aroud z-axisbounds- Bounds3d; the bounds
-
StaticLocation2d
constructs a new StaticLocation.- Parameters:
point2D- Point2D; the point2drotZ- double; the rotation in the xy planebounds- Bounds; the bounds
-
StaticLocation2d
constructs a new StaticLocation.- Parameters:
location- OrientedPoint3d; the locationbounds- Bounds; the bounds
-
-
Method Details
-
getLocation
returns the location of an object. This value may be null, e.g., when the object is still being constructed or being destroyed.- Specified by:
getLocationin interfaceLocatable- Returns:
- Point<?>; the location
-
getBounds
returns the bounds of the locatable object. The bounds is the not rotated bounds around [0;0;0]. In contrast to the getLocation() method the getBounds() method should never return null.
-