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>

public class StaticLocation2d extends OrientedPoint2d implements Locatable
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:
  • Constructor Details

    • StaticLocation2d

      public StaticLocation2d(double x, double y, double rotZ, Bounds2d bounds)
      constructs a new StaticLocation.
      Parameters:
      x - double; the x location
      y - double; the y location
      rotZ - double; rotation aroud z-axis
      bounds - Bounds3d; the bounds
    • StaticLocation2d

      public StaticLocation2d(Point2D point2D, double rotZ, Bounds2d bounds)
      constructs a new StaticLocation.
      Parameters:
      point2D - Point2D; the point2d
      rotZ - double; the rotation in the xy plane
      bounds - Bounds; the bounds
    • StaticLocation2d

      public StaticLocation2d(OrientedPoint2d location, Bounds2d bounds)
      constructs a new StaticLocation.
      Parameters:
      location - OrientedPoint3d; the location
      bounds - Bounds; the bounds
  • Method Details

    • getLocation

      public OrientedPoint2d 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:
      getLocation in interface Locatable
      Returns:
      Point<?>; the location
    • getBounds

      public Bounds2d 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.
      Specified by:
      getBounds in interface Drawable2d
      Specified by:
      getBounds in interface Locatable
      Overrides:
      getBounds in class Point2d
      Returns:
      Bounds<?, ?, ?, ?>; the bounds of the object around getLocation() as center of the box.