public class Speed3D extends Object implements Serializable
Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
Constructor and Description |
---|
Speed3D(double x,
double y,
double z,
SpeedUnit unit)
Construct a new Speed3D from three double Cartesian coordinates and a speed unit.
|
Speed3D(Speed speed,
Direction theta,
Direction phi)
Construct a new Speed3D from a strongly typed speed and polar coordinates.
|
Speed3D(Speed x,
Speed y,
Speed z)
Construct a new Speed3D from three strongly typed Cartesian coordinates.
|
Speed3D(SpeedVector speed)
Construct a new Speed3D from vector of strongly typed Cartesian coordinates.
|
Modifier and Type | Method and Description |
---|---|
Direction |
getPhi()
Retrieve the phi of this Speed3D.
|
Speed |
getSpeed()
Retrieve the norm of this Speed3D.
|
Direction |
getTheta()
Retrieve the theta of this Speed3D.
|
Speed |
getX()
Retrieve the x-component of this Speed3D.
|
Speed |
getY()
Retrieve the y-component of this Speed3D.
|
Speed |
getZ()
Retrieve the z-component of this Speed3D.
|
String |
toString() |
public Speed3D(SpeedVector speed) throws ValueException
speed
- SpeedVector; the speeds in 3D (YPR coded)ValueException
- in case the vector does not have exactly three elementspublic Speed3D(Speed x, Speed y, Speed z) throws ValueException
x
- Speed; the speed in the x-directiony
- Speed; the speed in the y-directionz
- Speed; the speed in the z-directionValueException
- in case the units are incorrectpublic Speed3D(double x, double y, double z, SpeedUnit unit) throws ValueException
x
- double; the speed in the x-directiony
- double; the speed in the y-directionz
- double; the speed in the z-directionunit
- SpeedUnit; the unit of the xyz parametersValueException
- in case the units are incorrectpublic Speed3D(Speed speed, Direction theta, Direction phi) throws ValueException
speed
- Speed; the speed in the direction of the angle along the vectortheta
- Direction; the angle from the z directionphi
- Direction; the projected angle in the xy-plane from the x directionValueException
- in case the vector does not have exactly three elementspublic final Speed getX()
public final Speed getY()
public final Speed getZ()
public final Direction getTheta()
public final Direction getPhi()
public final Speed getSpeed()
Copyright © 2014–2019 Delft University of Technology. All rights reserved.