CARLA
 
载入中...
搜索中...
未找到
CollisionEventSerializer.cpp
浏览该文件的文档.
1// Copyright (c) 2017 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
9
10// 命名空间 carla
11namespace carla {
12 // 命名空间 sensor
13 namespace sensor {
14 // 命名空间 s11n
15 namespace s11n {
16
17 // 函数 CollisionEventSerializer::Deserialize,接收一个右值引用的 RawData 作为参数
19 // 创建一个 SensorData 的共享指针,其指向一个新创建的 data::CollisionEvent 对象,使用 std::move 移动数据
20 return SharedPtr<SensorData>(new data::CollisionEvent(std::move(data)));
21 }
22
23 } // namespace s11n
24 } // namespace sensor
25} // namespace carla
包装一个传感器生成的原始数据以及一些有用的元信息。
Definition RawData.h:20
static SharedPtr< SensorData > Deserialize(RawData &&data)
CARLA模拟器的主命名空间。
Definition Carla.cpp:139
boost::shared_ptr< T > SharedPtr
使用这个SharedPtr(boost::shared_ptr)以保持与boost::python的兼容性, 但未来如果可能的话,我们希望能为std::shared_ptr制作一个Python适配器。
Definition Memory.h:19