CARLA
 
载入中...
搜索中...
未找到
MapLayer.cpp
浏览该文件的文档.
1// Copyright (c) 2020 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#include "MapLayer.h"
8
9namespace carla {
10namespace rpc {
11
12std::string MapLayerToString(MapLayer MapLayerValue) //将MapLayer枚举值转换为其对应的字符串表示形式的函数
13{
14 switch(MapLayerValue) //检查MapLayerValue的值
15 {
16 case MapLayer::None: return "None";
17 case MapLayer::Buildings: return "Buildings"; //表示地图上的建筑物
18 case MapLayer::Decals: return "Decals"; //表示路面标记
19 case MapLayer::Foliage: return "Foliage"; //表示植被
20 case MapLayer::Ground: return "Ground"; //表示地图的地面层
21 case MapLayer::ParkedVehicles: return "Parked_Vehicles"; //停放车辆层
22 case MapLayer::Particles: return "Particles"; //表示烟雾或火焰等粒子效果
23 case MapLayer::Props: return "Props"; //环境中的杂项道具
24 case MapLayer::StreetLights: return "StreetLights"; //表示街道照明
25 case MapLayer::Walls: return "Walls"; //表示墙壁或障碍物
26 case MapLayer::All: return "All"; //表示所有可用层
27 default: return "Invalid"; //对于无效的MapLayer值的后备处理
28 }
29}
30
31
32} // namespace rpc
33} // namespace carla
std::string MapLayerToString(MapLayer MapLayerValue)
Definition MapLayer.cpp:12
CARLA模拟器的主命名空间。
Definition Carla.cpp:139