Class DirectEgoPerception<G extends GTU,P extends Perception<G>>
java.lang.Object
org.opentrafficsim.base.Type<AbstractPerceptionCategory<G,P>>
org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory<G,P>
org.opentrafficsim.core.gtu.perception.DirectEgoPerception<G,P>
- Type Parameters:
G- GTU typeP- perception type
- All Implemented Interfaces:
Serializable,EgoPerception<G,P>,PerceptionCategory<G,P>
public class DirectEgoPerception<G extends GTU,P extends Perception<G>> extends AbstractPerceptionCategory<G,P> implements EgoPerception<G,P>
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.
- Version:
- $Revision$, $LastChangedDate$, by $Author$, initial version Jul 29, 2016
- Author:
- Alexander Verbraeck, Peter Knoppers, Wouter Schakel
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description DirectEgoPerception(P perception) -
Method Summary
Modifier and Type Method Description AccelerationgetAcceleration()Returns the acceleration.LengthgetLength()Returns the length.SpeedgetSpeed()Returns the speed.TimeStampedObject<Acceleration>getTimeStampedAcceleration()Return the time stamped acceleration.TimeStampedObject<Length>getTimeStampedLength()Return the time stamped length.TimeStampedObject<Speed>getTimeStampedSpeed()Return the time stamped speed.TimeStampedObject<Length>getTimeStampedWidth()Return the time stamped width.LengthgetWidth()Returns the width.StringtoString()voidupdateAcceleration()Update acceleration.voidupdateLength()Update length.voidupdateSpeed()Update speed.voidupdateWidth()Update width.Methods inherited from class org.opentrafficsim.core.gtu.perception.AbstractPerceptionCategory
getGtu, getObjectOrNull, getPerception, getTimestamp
-
Constructor Details
-
DirectEgoPerception
- Parameters:
perception- P; perception
-
-
Method Details
-
updateSpeed
Update speed.- Specified by:
updateSpeedin interfaceEgoPerception<G extends GTU,P extends Perception<G>>- Throws:
GTUException- if the GTU has not been initialized
-
updateAcceleration
Update acceleration.- Specified by:
updateAccelerationin interfaceEgoPerception<G extends GTU,P extends Perception<G>>- Throws:
GTUException- if the GTU has not been initialized
-
updateLength
Update length.- Specified by:
updateLengthin interfaceEgoPerception<G extends GTU,P extends Perception<G>>- Throws:
GTUException- if the GTU has not been initialized
-
updateWidth
Update width.- Specified by:
updateWidthin interfaceEgoPerception<G extends GTU,P extends Perception<G>>- Throws:
GTUException- if the GTU has not been initialized
-
getAcceleration
Returns the acceleration.- Specified by:
getAccelerationin interfaceEgoPerception<G extends GTU,P extends Perception<G>>- Returns:
- acceleration
-
getSpeed
Returns the speed.- Specified by:
getSpeedin interfaceEgoPerception<G extends GTU,P extends Perception<G>>- Returns:
- speed
-
getLength
Returns the length.- Specified by:
getLengthin interfaceEgoPerception<G extends GTU,P extends Perception<G>>- Returns:
- length
-
getWidth
Returns the width.- Specified by:
getWidthin interfaceEgoPerception<G extends GTU,P extends Perception<G>>- Returns:
- width
-
getTimeStampedSpeed
Return the time stamped speed.- Returns:
- time stamped speed
-
getTimeStampedAcceleration
Return the time stamped acceleration.- Returns:
- time stamped acceleration
-
getTimeStampedLength
Return the time stamped length.- Returns:
- time stamped length
-
getTimeStampedWidth
Return the time stamped width.- Returns:
- time stamped width
-
toString
-