CARLA
 
载入中...
搜索中...
未找到
| 类型定义 | 枚举 | 函数 | 变量
MapGen 命名空间参考

class  CityAreaDescription
 
class  DoublyConnectedEdgeList
 简单的双连通边链表结构。它只允许添加元素,不允许删除元素。 更多...
 
class  GraphGenerator
 随机双连通边链表 DoublyConnectedEdgeList 生成器。 更多...
 
class  GraphParser
 
class  Position
 
class  RoadSegmentBuilder
 
class  RoadSegmentDescription
 

类型定义

using Graph = DoublyConnectedEdgeList
 

枚举

enum class  EIntersectionType { Turn90Deg , TIntersection , XIntersection }
 

函数

static std::pair< DoublyConnectedEdgeList::HalfEdge *, DoublyConnectedEdgeList::HalfEdge * > FindPositionInNode (DoublyConnectedEdgeList::HalfEdge &halfEdge)
 返回一对 {prev, next},其中 prev/next 是围绕边的源节点逆时针方向的前一条/后一条边。即,边的位置介于 prev 和 next 之间
 
static void fixGraphData (Graph &graph)
 
static Graph::Position getDirection (const Graph::HalfEdge &edge)
 
static int getQuadrant (float angle)
 
static std::pair< Graph::HalfEdge *, Graph::HalfEdge * > getRandomOpposingEdges (Graph::Face &face, FRandomStream &random)
 
static float getRotation (float angle0, float angle1)
 
static float getRotation (float angle0, float angle1, float angle2)
 
static const Graph::PositiongetSourcePosition (const Graph::HalfEdge &edge)
 
static const Graph::PositiongetTargetPosition (const Graph::HalfEdge &edge)
 
struct GraphHalfEdge INHERIT_GRAPH_TYPE_BASE_CLASS ('e')
 
struct GraphFace INHERIT_GRAPH_TYPE_BASE_CLASS ('f')
 
struct GraphNode INHERIT_GRAPH_TYPE_BASE_CLASS ('n')
 
static void randomize (Graph &graph, const int32 seed)
 
static int32 signOf (int32 val)
 
static Graph::FacesplitFace (Graph &graph, Graph::Face &face, FRandomStream &random)
 

变量

static constexpr int32 MARGIN = 6
 

类型定义说明

◆ Graph

在文件 GraphGenerator.cpp16 行定义.

枚举类型说明

◆ EIntersectionType

enum class MapGen::EIntersectionType
strong
枚举值
Turn90Deg 
TIntersection 
XIntersection 

在文件 CityMapDefinitions.h11 行定义.

函数说明

◆ FindPositionInNode()

static std::pair< DoublyConnectedEdgeList::HalfEdge *, DoublyConnectedEdgeList::HalfEdge * > MapGen::FindPositionInNode ( DoublyConnectedEdgeList::HalfEdge & halfEdge)
static

返回一对 {prev, next},其中 prev/next 是围绕边的源节点逆时针方向的前一条/后一条边。即,边的位置介于 prev 和 next 之间

注意:始终返回从节点指向外的半边

时间复杂度为 O(n*log(n)),其中 n 是边的源节点的边数

在文件 DoublyConnectedEdgeList.cpp39 行定义.

引用了 MapGen::DoublyConnectedEdgeList::GetAngle().

被这些函数引用 MapGen::DoublyConnectedEdgeList::AddNode(), MapGen::DoublyConnectedEdgeList::ConnectNodes() , 以及 MapGen::DoublyConnectedEdgeList::SplitEdge().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ fixGraphData()

static void MapGen::fixGraphData ( Graph & graph)
static

在文件 GraphParser.cpp58 行定义.

引用了 MapGen::DoublyConnectedEdgeList::GetAngle(), MapGen::DoublyConnectedEdgeList::GetLeavingHalfEdge(), MapGen::DoublyConnectedEdgeList::GetNextInNode(), MapGen::DoublyConnectedEdgeList::GetNodes(), getRotation(), TIntersection, Turn90Deg , 以及 XIntersection.

被这些函数引用 MapGen::GraphParser::GraphParser().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ getDirection()

static Graph::Position MapGen::getDirection ( const Graph::HalfEdge & edge)
static

在文件 GraphGenerator.cpp45 行定义.

引用了 getSourcePosition() , 以及 getTargetPosition().

被这些函数引用 splitFace().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ getQuadrant()

static int MapGen::getQuadrant ( float angle)
static

在文件 GraphParser.cpp24 行定义.

被这些函数引用 getRotation() , 以及 getRotation().

+ 这是这个函数的调用关系图:

◆ getRandomOpposingEdges()

static std::pair< Graph::HalfEdge *, Graph::HalfEdge * > MapGen::getRandomOpposingEdges ( Graph::Face & face,
FRandomStream & random )
static

在文件 GraphGenerator.cpp51 行定义.

引用了 MapGen::DoublyConnectedEdgeList::GetHalfEdge() , 以及 MapGen::DoublyConnectedEdgeList::GetNextInFace().

被这些函数引用 splitFace().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ getRotation() [1/2]

static float MapGen::getRotation ( float angle0,
float angle1 )
static

在文件 GraphParser.cpp30 行定义.

引用了 getQuadrant() , 以及 min().

被这些函数引用 fixGraphData().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ getRotation() [2/2]

static float MapGen::getRotation ( float angle0,
float angle1,
float angle2 )
static
待办事项
There has to be a better way.

在文件 GraphParser.cpp39 行定义.

引用了 getQuadrant() , 以及 UE_LOG().

+ 函数调用图:

◆ getSourcePosition()

static const Graph::Position & MapGen::getSourcePosition ( const Graph::HalfEdge & edge)
static

在文件 GraphGenerator.cpp33 行定义.

引用了 MapGen::DoublyConnectedEdgeList::Node::GetPosition() , 以及 MapGen::DoublyConnectedEdgeList::GetSource().

被这些函数引用 getDirection() , 以及 splitFace().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ getTargetPosition()

static const Graph::Position & MapGen::getTargetPosition ( const Graph::HalfEdge & edge)
static

在文件 GraphGenerator.cpp39 行定义.

引用了 MapGen::DoublyConnectedEdgeList::Node::GetPosition() , 以及 MapGen::DoublyConnectedEdgeList::GetTarget().

被这些函数引用 getDirection() , 以及 splitFace().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ INHERIT_GRAPH_TYPE_BASE_CLASS() [1/3]

struct GraphHalfEdge MapGen::INHERIT_GRAPH_TYPE_BASE_CLASS ( 'e' )

在文件 GraphTypes.h67 行定义.

◆ INHERIT_GRAPH_TYPE_BASE_CLASS() [2/3]

struct GraphFace MapGen::INHERIT_GRAPH_TYPE_BASE_CLASS ( 'f' )

在文件 GraphTypes.h74 行定义.

◆ INHERIT_GRAPH_TYPE_BASE_CLASS() [3/3]

struct GraphNode MapGen::INHERIT_GRAPH_TYPE_BASE_CLASS ( 'n' )

在文件 GraphTypes.h52 行定义.

◆ randomize()

static void MapGen::randomize ( Graph & graph,
const int32 seed )
static
待办事项
我们跳过第一个面,因为它是环绕面。 但情况并非总是如此,如果以不同的方式生成图,那可能就会是 另一个(面需要被处理)了。

在文件 GraphGenerator.cpp108 行定义.

引用了 MapGen::DoublyConnectedEdgeList::CountFaces(), MapGen::DoublyConnectedEdgeList::CountHalfEdges(), MapGen::DoublyConnectedEdgeList::CountNodes(), MapGen::DoublyConnectedEdgeList::GetFaces() , 以及 splitFace().

被这些函数引用 MapGen::GraphGenerator::Generate().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ signOf()

static int32 MapGen::signOf ( int32 val)
static

在文件 GraphGenerator.cpp27 行定义.

被这些函数引用 splitFace().

+ 这是这个函数的调用关系图:

◆ splitFace()

static Graph::Face * MapGen::splitFace ( Graph & graph,
Graph::Face & face,
FRandomStream & random )
static

在文件 GraphGenerator.cpp78 行定义.

引用了 MapGen::DoublyConnectedEdgeList::ConnectNodes(), getDirection(), getRandomOpposingEdges(), getSourcePosition(), getTargetPosition(), MARGIN, signOf() , 以及 MapGen::DoublyConnectedEdgeList::SplitEdge().

被这些函数引用 randomize().

+ 函数调用图:
+ 这是这个函数的调用关系图:

变量说明

◆ MARGIN

constexpr int32 MapGen::MARGIN = 6
staticconstexpr

在文件 GraphGenerator.cpp19 行定义.

被这些函数引用 splitFace().