Eclipse SUMO - Simulation of Urban MObility
MSDynamicShapeUpdater.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2019-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 //
16 /****************************************************************************/
17 
18 // ===========================================================================
19 // included modules
20 // ===========================================================================
21 #include "MSDynamicShapeUpdater.h"
23 
24 //#define DEBUG_DYNAMIC_SHAPES
25 
26 void
27 MSDynamicShapeUpdater::vehicleStateChanged(const SUMOVehicle* const vehicle, MSNet::VehicleState to, const std::string& /* info */) {
28 
30  switch (to) {
33 #ifdef DEBUG_DYNAMIC_SHAPES
34  std::cout << "MSDynamicShapeUpdater: Vehicle '" << vehicle->getID() << "' has arrived. Informing ShapeContainer." << std::endl;
35 #endif
37  }
38  break;
41  // TODO: can this lead to removal without calling arrived?
42  break;
43  default:
44  {}
45  }
46 }
virtual const std::string & getID() const =0
Get the vehicle&#39;s ID.
ShapeContainer & myShapeContainer
void vehicleStateChanged(const SUMOVehicle *const vehicle, MSNet::VehicleState to, const std::string &info="") override
Constructor.
The vehicle arrived at his destination (is deleted)
Definition: MSNet.h:546
The vehicle is involved in a collision.
Definition: MSNet.h:558
Representation of a vehicle.
Definition: SUMOVehicle.h:61
VehicleState
Definition of a vehicle state.
Definition: MSNet.h:536
virtual void removeTrackers(std::string objectID)
Remove all tracking polygons for the given object.