public class Speed3D extends Object implements Serializable
Copyright (c) 2013-2017 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,
org.djunits.unit.SpeedUnit unit)
Construct a new Speed3D from three double Cartesian coordinates and a speed unit.
|
Speed3D(org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Direction theta,
org.djunits.value.vdouble.scalar.Direction phi)
Construct a new Speed3D from a strongly typed speed and polar coordinates.
|
Speed3D(org.djunits.value.vdouble.scalar.Speed x,
org.djunits.value.vdouble.scalar.Speed y,
org.djunits.value.vdouble.scalar.Speed z)
Construct a new Speed3D from three strongly typed Cartesian coordinates.
|
Speed3D(org.djunits.value.vdouble.vector.SpeedVector speed)
Construct a new Speed3D from vector of strongly typed Cartesian coordinates.
|
Modifier and Type | Method and Description |
---|---|
org.djunits.value.vdouble.scalar.Direction |
getPhi()
Retrieve the phi of this Speed3D.
|
org.djunits.value.vdouble.scalar.Speed |
getSpeed()
Retrieve the norm of this Speed3D.
|
org.djunits.value.vdouble.scalar.Direction |
getTheta()
Retrieve the theta of this Speed3D.
|
org.djunits.value.vdouble.scalar.Speed |
getX()
Retrieve the x-component of this Speed3D.
|
org.djunits.value.vdouble.scalar.Speed |
getY()
Retrieve the y-component of this Speed3D.
|
org.djunits.value.vdouble.scalar.Speed |
getZ()
Retrieve the z-component of this Speed3D.
|
String |
toString() |
public Speed3D(org.djunits.value.vdouble.vector.SpeedVector speed) throws org.djunits.value.ValueException
speed
- the speeds in 3D (YPR coded)org.djunits.value.ValueException
- in case the vector does not have exactly three elementspublic Speed3D(org.djunits.value.vdouble.scalar.Speed x, org.djunits.value.vdouble.scalar.Speed y, org.djunits.value.vdouble.scalar.Speed z) throws org.djunits.value.ValueException
x
- the speed in the x-directiony
- the speed in the y-directionz
- the speed in the z-directionorg.djunits.value.ValueException
- in case the units are incorrectpublic Speed3D(double x, double y, double z, org.djunits.unit.SpeedUnit unit) throws org.djunits.value.ValueException
x
- the speed in the x-directiony
- the speed in the y-directionz
- the speed in the z-directionunit
- the unit of the xyz parametersorg.djunits.value.ValueException
- in case the units are incorrectpublic Speed3D(org.djunits.value.vdouble.scalar.Speed speed, org.djunits.value.vdouble.scalar.Direction theta, org.djunits.value.vdouble.scalar.Direction phi) throws org.djunits.value.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 directionorg.djunits.value.ValueException
- in case the vector does not have exactly three elementspublic final org.djunits.value.vdouble.scalar.Speed getX()
public final org.djunits.value.vdouble.scalar.Speed getY()
public final org.djunits.value.vdouble.scalar.Speed getZ()
public final org.djunits.value.vdouble.scalar.Direction getTheta()
public final org.djunits.value.vdouble.scalar.Direction getPhi()
public final org.djunits.value.vdouble.scalar.Speed getSpeed()
Copyright © 2014–2017 Delft University of Technology. All rights reserved.