Apollo 11.0
自动驾驶开放平台
scene.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
17#pragma once
18
19#include <memory>
20#include <vector>
21
23
24namespace apollo {
25namespace perception {
26namespace fusion {
27
28class Scene {
29 public:
30 Scene();
31 ~Scene();
32
38 inline std::vector<TrackPtr>& GetForegroundTracks() {
39 return foreground_tracks_;
40 }
41
47 inline const std::vector<TrackPtr>& GetForegroundTracks() const {
48 return foreground_tracks_;
49 }
50
56 inline std::vector<TrackPtr>& GetBackgroundTracks() {
57 return background_tracks_;
58 }
59
65 inline const std::vector<TrackPtr>& GetBackgroundTracks() const {
66 return background_tracks_;
67 }
68
74 void AddForegroundTrack(TrackPtr track);
75
81 void AddBackgroundTrack(TrackPtr track);
82
83 protected:
84 std::vector<TrackPtr> foreground_tracks_;
85 std::vector<TrackPtr> background_tracks_;
86};
87
88typedef std::shared_ptr<Scene> ScenePtr;
89typedef std::shared_ptr<const Scene> SceneConstPtr;
90
91} // namespace fusion
92} // namespace perception
93} // namespace apollo
std::vector< TrackPtr > foreground_tracks_
Definition scene.h:84
const std::vector< TrackPtr > & GetBackgroundTracks() const
Get the background track objects
Definition scene.h:65
void AddBackgroundTrack(TrackPtr track)
Add a background track object
Definition scene.cc:30
void AddForegroundTrack(TrackPtr track)
Add a foreground track object
Definition scene.cc:26
std::vector< TrackPtr > & GetBackgroundTracks()
Get the background track objects
Definition scene.h:56
std::vector< TrackPtr > & GetForegroundTracks()
Get the foreground track objects
Definition scene.h:38
const std::vector< TrackPtr > & GetForegroundTracks() const
Get the foreground track objects
Definition scene.h:47
std::vector< TrackPtr > background_tracks_
Definition scene.h:85
std::shared_ptr< Track > TrackPtr
Definition track.h:397
std::shared_ptr< const Scene > SceneConstPtr
Definition scene.h:89
std::shared_ptr< Scene > ScenePtr
Definition scene.h:88
class register implement
Definition arena_queue.h:37