View Javadoc

    1   /*
    2    * @(#) StaticLocation.java Mar 4, 2004
    3    *
    4    * Copyright (c) 2003 Delft University of Technology Jaffalaan 5, 2628 BX Delft,
    5    * the Netherlands All rights reserved.
    6    *
    7    * This software is proprietary information of Delft University of Technology
    8    * The code is published under the General Public License
    9    */
    10  package nl.tudelft.simulation.dsol.animation;
    11
    12  import java.awt.geom.Point2D;
    13
    14  import javax.media.j3d.Bounds;
    15
    16  import nl.tudelft.simulation.language.d3.DirectedPoint;
    17
    18  /***
    19   * A StaticLocation <br>
    20   * (c) copyright 2003 <a href="http://www.simulation.tudelft.nl">Delft
    21   * University of Technology </a>, the Netherlands. <br>
    22   * See for project information <a
    23   * href="http://www.simulation.tudelft.nl">www.simulation.tudelft.nl </a> <br>
    24   * License of use: <a href="http://www.gnu.org/copyleft/gpl.html">General Public
    25   * License (GPL) </a>, no warranty <br>
    26   *
    27   * @version 1.0 Mar 4, 2004 <br>
    28   * @author <a href="http://www.simulation.tudelft.nl/people/jacobs.html">Peter
    29   *         Jacobs </a>
    30   */
    31  public class StaticLocation extends DirectedPoint implements LocatableInterface
    32  {
    33  	/*** the bounds */
    34  	protected Bounds bounds = null;
    35
    36  	/***
    37  	 * constructs a new StaticLocation
    38  	 *
    39  	 * @param x the x location
    40  	 * @param y the y location
    41  	 * @param z the z location
    42  	 * @param theta theta
    43  	 * @param phi phi
    44  	 * @param rho rho
    45  	 * @param bounds the bounds
    46  	 */
    47  	public StaticLocation(final double x, final double y, final double z,
    48  			final double theta, final double phi, final double rho,
    49  			final Bounds bounds)
    50  	{
    51  		super(x, y, z, theta, phi, rho);
    52  		this.bounds = bounds;
    53  	}
    54
    55  	/***
    56  	 * constructs a new StaticLocation
    57  	 *
    58  	 * @param point2D the point2d
    59  	 * @param rotZ the rotation in the xy plane
    60  	 * @param bounds the bounds
    61  	 */
    62  	public StaticLocation(final Point2D point2D, final double rotZ,
    63  			final Bounds bounds)
    64  	{
    65  		super(point2D, rotZ);
    66  		this.bounds = bounds;
    67  	}
    68
    69  	/***
    70  	 * constructs a new StaticLocation
    71  	 *
    72  	 * @param location the location
    73  	 * @param bounds the bounds
    74  	 */
    75  	public StaticLocation(final DirectedPoint location, final Bounds bounds)
    76  	{
    77  		super(location);
    78  		this.bounds = bounds;
    79  	}
    80
    81
    82  	/***
    83  	 * @see nl.tudelft.simulation.dsol.animation.LocatableInterface
    84  	 *      #getLocation()
    85  	 */
    86  	public DirectedPoint getLocation()
    87  	{
    88  		return this;
    89  	}
    90
    91  	/***
    92  	 * @see nl.tudelft.simulation.dsol.animation.LocatableInterface #getBounds()
    93  	 */
    94  	public Bounds getBounds()
    95  	{
    96  		return this.bounds;
    97  	}
    98  }