CARLA
载入中...
搜索中...
未找到
Unreal
CarlaUE4
Plugins
Carla
Source
Carla
MapGen
CityAreaDescription.h
浏览该文件的文档.
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
// 命名空间 MapGen
14
namespace
MapGen
{
15
16
// 类 CityAreaDescription,不可复制
17
class
CARLA_API
CityAreaDescription
:
private
NonCopyable
18
{
19
public
:
20
21
// 显式构造函数,接受一个 GraphFace 类型的参数
22
explicit
CityAreaDescription
(
const
GraphFace
&Face) : _face(&Face) {}
23
24
// 添加节点到节点容器
25
void
Add
(
const
GraphNode
&Node) {
26
_nodes.emplace_back(&Node);
27
}
28
29
// 获取面(GraphFace)
30
const
GraphFace
&
GetFace
()
const
{
31
return
*_face;
32
}
33
34
// 获取指定索引的节点
35
const
GraphNode
&
GetNodeAt
(
size_t
i)
const
{
36
return
*_nodes[i];
37
}
38
39
// 获取节点数量
40
size_t
NodeCount
()
const
{
41
return
_nodes.size();
42
}
43
44
private
:
45
46
// 面(GraphFace)
47
const
GraphFace
*
_face
;
48
49
// 节点容器
50
std::vector<const GraphNode *>
_nodes
;
51
};
52
53
}
// namespace MapGen
GraphTypes.h
GraphFace
GraphNode
MapGen::CityAreaDescription
Definition
CityAreaDescription.h:18
MapGen::CityAreaDescription::GetNodeAt
const GraphNode & GetNodeAt(size_t i) const
Definition
CityAreaDescription.h:35
MapGen::CityAreaDescription::_nodes
std::vector< const GraphNode * > _nodes
Definition
CityAreaDescription.h:50
MapGen::CityAreaDescription::NodeCount
size_t NodeCount() const
Definition
CityAreaDescription.h:40
MapGen::CityAreaDescription::CityAreaDescription
CityAreaDescription(const GraphFace &Face)
Definition
CityAreaDescription.h:22
MapGen::CityAreaDescription::Add
void Add(const GraphNode &Node)
Definition
CityAreaDescription.h:25
MapGen::CityAreaDescription::GetFace
const GraphFace & GetFace() const
Definition
CityAreaDescription.h:30
MapGen::CityAreaDescription::_face
const GraphFace * _face
Definition
CityAreaDescription.h:47
NonCopyable
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Util/NonCopyable.h:3
MapGen
Definition
CityAreaDescription.h:14
制作者
1.10.0