View Javadoc
1   package org.djutils.draw;
2   
3   import org.djutils.draw.bounds.Bounds3d;
4   import org.djutils.draw.point.Point3d;
5   
6   /**
7    * Drawable3d is the Interface that all drawable objects that use 3d coordinates must implement.
8    * <p>
9    * Copyright (c) 2020-2021 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
10   * BSD-style license. See <a href="https://djutils.org/docs/current/djutils/licenses.html">DJUTILS License</a>.
11   * </p>
12   * @author <a href="https://www.tudelft.nl/averbraeck">Alexander Verbraeck</a>
13   * @author <a href="https://www.tudelft.nl/pknoppers">Peter Knoppers</a>
14   */
15  public interface Drawable3d extends Drawable<Point3d, Space3d>
16  {
17      /**
18       * Retrieve the bounding box of the object.
19       * @return Bounds3d; the bounding box of the object
20       */
21      Bounds3d getBounds();
22  
23      /**
24       * Project the object onto the z=0 plane.
25       * @return Drawable2d; the projected object
26       * @throws DrawRuntimeException when projecting onto the z=0 plane results in an invalid object. E.g. a Line3d that consists
27       *             of points that all have the exact same x and y coordinates cannot be a line after projecting on the z=0
28       *             plane.
29       */
30      Drawable2d project() throws DrawRuntimeException;
31  
32  }