Class SubjectiveCar
java.lang.Object
org.djutils.event.EventProducer
org.opentrafficsim.core.gtu.AbstractGTU
org.opentrafficsim.road.network.factory.rti.communication.SubjectiveCar
- All Implemented Interfaces:
Serializable,Locatable,EventProducerInterface,Identifiable,Drawable,GTU
public class SubjectiveCar extends AbstractGTU
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class org.opentrafficsim.core.gtu.AbstractGTU
ALIGN_COUNT, ALIGNED, operationalPlanFields inherited from interface org.djutils.event.EventProducerInterface
FIRST_POSITION, LAST_POSITIONFields inherited from interface org.opentrafficsim.core.gtu.GTU
DESTROY_EVENT, INIT_EVENT, MOVE_EVENT -
Constructor Summary
Constructors Constructor Description SubjectiveCar(String id, GTUType type, OTSSimulatorInterface simulator, DirectedPoint initialLocation, OTSRoadNetwork network) -
Method Summary
Modifier and Type Method Description voiddestroy()javax.media.j3d.BoundsgetBounds()RelativePositiongetCenter()ImmutableSet<RelativePosition>getContourPoints()RelativePositiongetFront()LengthgetLength()DirectedPointgetLocation()SpeedgetMaximumSpeed()DirectedPointgetPosition()RelativePositiongetRear()ImmutableMap<RelativePosition.TYPE,RelativePosition>getRelativePositions()LengthgetWidth()voidsetPosition(DirectedPoint position)StringtoString()Methods inherited from class org.opentrafficsim.core.gtu.AbstractGTU
addGtu, equals, getAcceleration, getAcceleration, getChildren, getErrorHandler, getGTUType, getId, getMaximumAcceleration, getMaximumDeceleration, getNextMoveEvent, getOdometer, getOdometer, getOperationalPlan, getOperationalPlan, getParameters, getParent, getPerceivableContext, getReference, getSimulator, getSourceId, getSpeed, getSpeed, getStrategicalPlanner, getStrategicalPlanner, hashCode, init, interruptMove, isDestroyed, move, removeGtu, setErrorHandler, setMaximumAcceleration, setMaximumDeceleration, setParameters, setParentMethods inherited from class org.djutils.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, fireTimedEvent, getEventTypesWithListeners, getListenerReferences, hasListeners, numberOfListeners, removeAllListeners, removeAllListeners, removeListenerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.djutils.event.EventProducerInterface
addListener, addListener, addListener, addListener, getEventTypesWithListeners, hasListeners, numberOfListeners, removeListenerMethods inherited from interface org.opentrafficsim.core.gtu.GTU
getTacticalPlanner, getTacticalPlanner
-
Constructor Details
-
SubjectiveCar
public SubjectiveCar(String id, GTUType type, OTSSimulatorInterface simulator, DirectedPoint initialLocation, OTSRoadNetwork network) throws SimRuntimeException, GTUException, RemoteException, NamingException- Parameters:
id- String; car idtype- GTUType; GTU typesimulator- OTSSimulatorInterface; simulatorinitialLocation- DirectedPoint; locationnetwork- OTSRoadNetwork; the network in which the subjective car will be registered- Throws:
GTUException- when GTU cannot be initializedSimRuntimeException- when operational plan execution or perception execution cannot be scheduledNamingException- when animation cannot be registeredRemoteException- when animation context or simulator cannot be reached
-
-
Method Details
-
getLength
-
getWidth
-
getMaximumSpeed
-
getFront
-
getRear
-
getCenter
-
getRelativePositions
-
destroy
public final void destroy()- Specified by:
destroyin interfaceGTU- Overrides:
destroyin classAbstractGTU
-
getBounds
public final javax.media.j3d.Bounds getBounds() -
getPosition
- Returns:
- position
-
setPosition
- Parameters:
position- DirectedPoint; set position
-
getLocation
- Specified by:
getLocationin interfaceLocatable- Overrides:
getLocationin classAbstractGTU
-
getContourPoints
-
toString
-