public final class Trajectory extends Object
Copyright (c) 2013-2016 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.
| Constructor and Description |
|---|
Trajectory(org.opentrafficsim.core.gtu.GTU gtu,
boolean longitudinalEntry,
MetaData metaData) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(float xSI,
float vSI,
float aSI,
float tSI)
Adds si values of distance, speed, acceleration and time.
|
void |
add(org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Acceleration acceleration,
org.djunits.value.vdouble.scalar.Duration time)
Adds values of distance, speed, acceleration and time.
|
boolean |
contains(MetaDataType<?> metaDataType) |
boolean |
equals(Object obj) |
float[] |
getA() |
org.djunits.value.vfloat.vector.FloatAccelerationVector |
getAcceleration() |
org.djunits.value.vfloat.vector.FloatDurationVector |
getDuration() |
String |
getGtuId() |
org.djunits.value.vfloat.vector.FloatLengthVector |
getLength() |
<T> T |
getMetaData(MetaDataType<T> metaDataType) |
org.djunits.value.vfloat.vector.FloatSpeedVector |
getSpeed() |
float[] |
getT() |
org.djunits.value.vdouble.scalar.Duration |
getTotalDuration() |
org.djunits.value.vdouble.scalar.Length |
getTotalLength() |
float[] |
getV() |
float[] |
getX() |
int |
hashCode() |
boolean |
isLongitudinalEntry()
Returns whether GTU entered this trajectory longitudinally.
|
int |
size() |
Trajectory |
subSet(org.djunits.value.vdouble.scalar.Duration minTime,
org.djunits.value.vdouble.scalar.Duration maxTime)
Copies the trajectory but with a subset of the data.
|
Trajectory |
subSet(org.djunits.value.vdouble.scalar.Length minLength,
org.djunits.value.vdouble.scalar.Length maxLength)
Copies the trajectory but with a subset of the data.
|
Trajectory |
subSet(org.djunits.value.vdouble.scalar.Length minLength,
org.djunits.value.vdouble.scalar.Length maxLength,
org.djunits.value.vdouble.scalar.Duration minTime,
org.djunits.value.vdouble.scalar.Duration maxTime)
Copies the trajectory but with a subset of the data.
|
String |
toString() |
public Trajectory(org.opentrafficsim.core.gtu.GTU gtu,
boolean longitudinalEntry,
MetaData metaData)
gtu - GTU of this trajectory, only the id is stored.longitudinalEntry - whether GTU entered this trajectory longitudinallymetaData - meta datapublic boolean isLongitudinalEntry()
public void add(org.djunits.value.vdouble.scalar.Length distance,
org.djunits.value.vdouble.scalar.Speed speed,
org.djunits.value.vdouble.scalar.Acceleration acceleration,
org.djunits.value.vdouble.scalar.Duration time)
distance - distancespeed - speedacceleration - accelerationtime - timepublic void add(float xSI,
float vSI,
float aSI,
float tSI)
xSI - si distancevSI - si speedaSI - si accelerationtSI - si timepublic int size()
public String getGtuId()
public float[] getX()
public float[] getV()
public float[] getA()
public float[] getT()
public org.djunits.value.vfloat.vector.FloatLengthVector getLength()
public org.djunits.value.vfloat.vector.FloatSpeedVector getSpeed()
public org.djunits.value.vfloat.vector.FloatAccelerationVector getAcceleration()
public org.djunits.value.vfloat.vector.FloatDurationVector getDuration()
public org.djunits.value.vdouble.scalar.Length getTotalLength()
IllegalStateException - if trajectory is emptypublic org.djunits.value.vdouble.scalar.Duration getTotalDuration()
IllegalStateException - if trajectory is emptypublic boolean contains(MetaDataType<?> metaDataType)
metaDataType - meta data typepublic <T> T getMetaData(MetaDataType<T> metaDataType)
T - class of meta datametaDataType - meta data typepublic Trajectory subSet(org.djunits.value.vdouble.scalar.Length minLength, org.djunits.value.vdouble.scalar.Length maxLength)
minLength - minimum lengthmaxLength - maximum lengthNullPointerException - if an input is nullIllegalArgumentException - of minLength is smaller than maxLengthpublic Trajectory subSet(org.djunits.value.vdouble.scalar.Duration minTime, org.djunits.value.vdouble.scalar.Duration maxTime)
minTime - minimum timemaxTime - maximum timeNullPointerException - if an input is nullIllegalArgumentException - of minTime is smaller than maxTimepublic Trajectory subSet(org.djunits.value.vdouble.scalar.Length minLength, org.djunits.value.vdouble.scalar.Length maxLength, org.djunits.value.vdouble.scalar.Duration minTime, org.djunits.value.vdouble.scalar.Duration maxTime)
minLength - minimum lengthmaxLength - maximum lengthminTime - minimum timemaxTime - maximum timeNullPointerException - if an input is nullIllegalArgumentException - of minLength/Time is smaller than maxLength/TimeCopyright © 2014–2016 Delft University of Technology. All rights reserved.