View Javadoc
1   /**
2    * 
3    */
4   package org.opentrafficsim.water;
5   
6   import java.rmi.RemoteException;
7   
8   import javax.media.j3d.BoundingSphere;
9   import javax.media.j3d.Bounds;
10  
11  import nl.tudelft.simulation.language.d3.DirectedPoint;
12  
13  /**
14   * Base abstract class for a located object.
15   * <p>
16   * Copyright (c) 2013-2018 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved. <br>
17   * BSD-style license. See <a href="http://opentrafficsim.org/docs/current/license.html">OpenTrafficSim License</a>.
18   * </p>
19   * <p>
20   * Based on software from the IDVV project, which is Copyright (c) 2013 Rijkswaterstaat - Dienst Water, Verkeer en Leefomgeving
21   * and licensed without restrictions to Delft University of Technology, including the right to sub-license sources and derived
22   * products to third parties.
23   * </p>
24   * $LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $,
25   * initial version Nov 6, 2016 <br>
26   * @author <a href="http://www.tbm.tudelft.nl/averbraeck">Alexander Verbraeck</a>
27   */
28  public abstract class AbstractLocated implements Located
29  {
30      /** */
31      private static final long serialVersionUID = 1L;
32  
33      /** coordinate on the map. */
34      private final DirectedPoint location;
35  
36      /**
37       * @param location the directed point of the location
38       */
39      public AbstractLocated(final DirectedPoint location)
40      {
41          this.location = location;
42      }
43  
44      /** {@inheritDoc} */
45      @Override
46      public final DirectedPoint getLocation()
47      {
48          return this.location;
49      }
50  
51      /** {@inheritDoc} */
52      @Override
53      public Bounds getBounds() throws RemoteException
54      {
55          return new BoundingSphere();
56      }
57      
58  }