CARLA
CityAreaDescription.h
Go to the documentation of this file.
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 
7 #pragma once
8 
9 #include "GraphTypes.h"
10 
11 #include <vector>
12 
13 namespace MapGen {
14 
15  class CARLA_API CityAreaDescription : private NonCopyable
16  {
17  public:
18 
19  explicit CityAreaDescription(const GraphFace &Face) : _face(&Face) {}
20 
21  void Add(const GraphNode &Node) {
22  _nodes.emplace_back(&Node);
23  }
24 
25  const GraphFace &GetFace() const {
26  return *_face;
27  }
28 
29  const GraphNode &GetNodeAt(size_t i) const {
30  return *_nodes[i];
31  }
32 
33  size_t NodeCount() const {
34  return _nodes.size();
35  }
36 
37  private:
38 
39  const GraphFace *_face;
40 
41  std::vector<const GraphNode *> _nodes;
42  };
43 
44 } // namespace MapGen
const GraphFace & GetFace() const
const GraphNode & GetNodeAt(size_t i) const
void Add(const GraphNode &Node)
std::vector< const GraphNode * > _nodes
CityAreaDescription(const GraphFace &Face)