CARLA
 
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | Private 属性 | 友元 | 所有成员列表
carla::geom::Mesh类 参考

网格数据容器、验证器和导出器。 更多...

#include <Mesh.h>

+ carla::geom::Mesh 的协作图:

Public 类型

using index_type = size_t
 
using material_type = MeshMaterial
 
using normal_type = Vector3D
 
using uv_type = Vector2D
 
using vertex_type = Vector3D
 

Public 成员函数

void AddIndex (index_type index)
 将索引附加到索引列表。
 
void AddMaterial (const std::string &material_name)
 开始将新材质应用到新添加的三角形。
 
void AddNormal (normal_type normal)
 将法线附加到法线列表。
 
void AddTriangleFan (const std::vector< vertex_type > &vertices)
 向网格添加三角形扇形,顶点顺序为逆时针。
 
void AddTriangleStrip (const std::vector< vertex_type > &vertices)
 向网格添加三角形带,顶点顺序为逆时针。
 
void AddUV (uv_type uv)
 将一个顶点附加到顶点列表,它们将被读取 3 个中的 3 个。
 
void AddUVs (const std::vector< uv_type > &uv)
 添加纹理映射坐标(Texture-Mapping Coordinates, UV)
 
void AddVertex (vertex_type vertex)
 将顶点附加到顶点列表。
 
void AddVertices (const std::vector< vertex_type > &vertices)
 将顶点附加到顶点列表。
 
MeshConcatMesh (const Mesh &rhs, int num_vertices_to_link)
 将两个网格合并为一个网格
 
void EndMaterial ()
 停止将材质应用到新添加的三角形。
 
std::string GenerateOBJ () const
 返回包含 OBJ 中编码的网格的字符串。单位为米。它位于虚幻空间中。
 
std::string GenerateOBJForRecast () const
 返回包含 OBJ 中编码的网格的字符串。单位为米。 此函数导出 OBJ 文件,供 Recast 库专门使用。更改构建面的方向和坐标空间。
 
std::string GeneratePLY () const
 返回包含 PLY 中编码的网格的字符串。单位为米。
 
std::vector< index_type > & GetIndexes ()
 
const std::vector< index_type > & GetIndexes () const
 
size_t GetIndexesNum () const
 
size_t GetLastVertexIndex () const
 返回最后添加的顶点索引(顶点数)。
 
const std::vector< material_type > & GetMaterials () const
 
const std::vector< normal_type > & GetNormals () const
 
const std::vector< uv_type > & GetUVs () const
 
std::vector< vertex_type > & GetVertices ()
 
const std::vector< vertex_type > & GetVertices () const
 
size_t GetVerticesNum () const
 
bool IsValid () const
 检查网格是否有效。
 
 Mesh (const std::vector< vertex_type > &vertices={}, const std::vector< normal_type > &normals={}, const std::vector< index_type > &indexes={}, const std::vector< uv_type > &uvs={})
 
 operator FProceduralCustomMesh () const
 
Meshoperator+= (const Mesh &rhs)
 将两个网格合并为一个网格
 

Private 属性

std::vector< index_type_indexes
 
std::vector< material_type_materials
 
std::vector< normal_type_normals
 
std::vector< uv_type_uvs
 
std::vector< vertex_type_vertices
 

友元

Mesh operator+ (const Mesh &lhs, const Mesh &rhs)
 

详细描述

网格数据容器、验证器和导出器。

在文件 Mesh.h43 行定义.

成员类型定义说明

◆ index_type

在文件 Mesh.h48 行定义.

◆ material_type

在文件 Mesh.h50 行定义.

◆ normal_type

在文件 Mesh.h47 行定义.

◆ uv_type

在文件 Mesh.h49 行定义.

◆ vertex_type

在文件 Mesh.h46 行定义.

构造及析构函数说明

◆ Mesh()

carla::geom::Mesh::Mesh ( const std::vector< vertex_type > & vertices = {},
const std::vector< normal_type > & normals = {},
const std::vector< index_type > & indexes = {},
const std::vector< uv_type > & uvs = {} )
inline

在文件 Mesh.h56 行定义.

被这些函数引用 operator FProceduralCustomMesh().

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

成员函数说明

◆ AddIndex()

void carla::geom::Mesh::AddIndex ( index_type index)

将索引附加到索引列表。

在文件 Mesh.cpp132 行定义.

引用了 _indexes.

被这些函数引用 AddTriangleFan(), AddTriangleStrip(), carla::geom::MeshFactory::GenerateLaneMarksForCenterLine(), carla::geom::MeshFactory::GenerateLaneMarksForNotCenterLine(), carla::geom::MeshFactory::GenerateSidewalk() , 以及 carla::geom::MeshFactory::GenerateTesselated().

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

◆ AddMaterial()

void carla::geom::Mesh::AddMaterial ( const std::string & material_name)

开始将新材质应用到新添加的三角形。

在文件 Mesh.cpp144 行定义.

引用了 _indexes, _materials , 以及 EndMaterial().

被这些函数引用 carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateLeftWall(), carla::geom::MeshFactory::GenerateRightWall(), carla::geom::MeshFactory::GenerateSidewalk() , 以及 carla::geom::MeshFactory::GenerateTesselated().

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

◆ AddNormal()

void carla::geom::Mesh::AddNormal ( normal_type normal)

将法线附加到法线列表。

在文件 Mesh.cpp128 行定义.

引用了 _normals.

◆ AddTriangleFan()

void carla::geom::Mesh::AddTriangleFan ( const std::vector< vertex_type > & vertices)

向网格添加三角形扇形,顶点顺序为逆时针。

在文件 Mesh.cpp107 行定义.

引用了 AddIndex(), AddVertices(), DEBUG_ASSERT , 以及 GetVerticesNum().

+ 函数调用图:

◆ AddTriangleStrip()

void carla::geom::Mesh::AddTriangleStrip ( const std::vector< vertex_type > & vertices)

向网格添加三角形带,顶点顺序为逆时针。

在文件 Mesh.cpp52 行定义.

引用了 AddIndex(), AddVertices(), DEBUG_ASSERT , 以及 GetVerticesNum().

被这些函数引用 carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateLeftWall() , 以及 carla::geom::MeshFactory::GenerateRightWall().

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

◆ AddUV()

void carla::geom::Mesh::AddUV ( uv_type uv)

将一个顶点附加到顶点列表,它们将被读取 3 个中的 3 个。

在文件 Mesh.cpp136 行定义.

引用了 _uvs.

◆ AddUVs()

void carla::geom::Mesh::AddUVs ( const std::vector< uv_type > & uv)

添加纹理映射坐标(Texture-Mapping Coordinates, UV)

在文件 Mesh.cpp140 行定义.

引用了 _uvs.

被这些函数引用 carla::geom::MeshFactory::GenerateSidewalk() , 以及 carla::geom::MeshFactory::GenerateTesselated().

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

◆ AddVertex()

void carla::geom::Mesh::AddVertex ( vertex_type vertex)

将顶点附加到顶点列表。

在文件 Mesh.cpp120 行定义.

引用了 _vertices.

被这些函数引用 carla::geom::MeshFactory::GenerateLaneMarksForCenterLine() , 以及 carla::geom::MeshFactory::GenerateLaneMarksForNotCenterLine().

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

◆ AddVertices()

void carla::geom::Mesh::AddVertices ( const std::vector< vertex_type > & vertices)

将顶点附加到顶点列表。

在文件 Mesh.cpp124 行定义.

引用了 _vertices.

被这些函数引用 AddTriangleFan(), AddTriangleStrip(), carla::geom::MeshFactory::GenerateSidewalk() , 以及 carla::geom::MeshFactory::GenerateTesselated().

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

◆ ConcatMesh()

Mesh & carla::geom::Mesh::ConcatMesh ( const Mesh & rhs,
int num_vertices_to_link )

将两个网格合并为一个网格

在文件 Mesh.cpp323 行定义.

引用了 _indexes, _materials, _normals, _uvs, _vertices, GetIndexes(), GetIndexesNum(), GetMaterials(), GetNormals(), GetUVs(), GetVertices(), GetVerticesNum() , 以及 IsValid().

+ 函数调用图:

◆ EndMaterial()

void carla::geom::Mesh::EndMaterial ( )

停止将材质应用到新添加的三角形。

在文件 Mesh.cpp160 行定义.

引用了 _indexes , 以及 _materials.

被这些函数引用 AddMaterial(), carla::geom::MeshFactory::Generate(), carla::geom::MeshFactory::GenerateLeftWall(), carla::geom::MeshFactory::GenerateRightWall(), carla::geom::MeshFactory::GenerateSidewalk() , 以及 carla::geom::MeshFactory::GenerateTesselated().

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

◆ GenerateOBJ()

std::string carla::geom::Mesh::GenerateOBJ ( ) const

返回包含 OBJ 中编码的网格的字符串。单位为米。它位于虚幻空间中。

在文件 Mesh.cpp177 行定义.

引用了 _indexes, _materials, _normals, _uvs, _vertices , 以及 IsValid().

+ 函数调用图:

◆ GenerateOBJForRecast()

std::string carla::geom::Mesh::GenerateOBJForRecast ( ) const

返回包含 OBJ 中编码的网格的字符串。单位为米。 此函数导出 OBJ 文件,供 Recast 库专门使用。更改构建面的方向和坐标空间。

在文件 Mesh.cpp233 行定义.

引用了 _indexes, _materials, _vertices , 以及 IsValid().

+ 函数调用图:

◆ GeneratePLY()

std::string carla::geom::Mesh::GeneratePLY ( ) const

返回包含 PLY 中编码的网格的字符串。单位为米。

在文件 Mesh.cpp275 行定义.

引用了 IsValid().

+ 函数调用图:

◆ GetIndexes() [1/2]

std::vector< Mesh::index_type > & carla::geom::Mesh::GetIndexes ( )

在文件 Mesh.cpp304 行定义.

引用了 _indexes.

◆ GetIndexes() [2/2]

const std::vector< Mesh::index_type > & carla::geom::Mesh::GetIndexes ( ) const

在文件 Mesh.cpp300 行定义.

引用了 _indexes.

被这些函数引用 ConcatMesh(), operator FProceduralCustomMesh() , 以及 operator+=().

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

◆ GetIndexesNum()

size_t carla::geom::Mesh::GetIndexesNum ( ) const

在文件 Mesh.cpp307 行定义.

引用了 _indexes.

被这些函数引用 ConcatMesh() , 以及 operator+=().

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

◆ GetLastVertexIndex()

size_t carla::geom::Mesh::GetLastVertexIndex ( ) const

返回最后添加的顶点索引(顶点数)。

在文件 Mesh.cpp319 行定义.

引用了 _vertices.

◆ GetMaterials()

const std::vector< Mesh::material_type > & carla::geom::Mesh::GetMaterials ( ) const

在文件 Mesh.cpp315 行定义.

引用了 _materials.

被这些函数引用 ConcatMesh() , 以及 operator+=().

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

◆ GetNormals()

const std::vector< Mesh::normal_type > & carla::geom::Mesh::GetNormals ( ) const

在文件 Mesh.cpp296 行定义.

引用了 _normals.

被这些函数引用 ConcatMesh() , 以及 operator+=().

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

◆ GetUVs()

const std::vector< Mesh::uv_type > & carla::geom::Mesh::GetUVs ( ) const

在文件 Mesh.cpp311 行定义.

引用了 _uvs.

被这些函数引用 ConcatMesh(), operator FProceduralCustomMesh() , 以及 operator+=().

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

◆ GetVertices() [1/2]

std::vector< Mesh::vertex_type > & carla::geom::Mesh::GetVertices ( )

在文件 Mesh.cpp288 行定义.

引用了 _vertices.

◆ GetVertices() [2/2]

const std::vector< Mesh::vertex_type > & carla::geom::Mesh::GetVertices ( ) const

在文件 Mesh.cpp284 行定义.

引用了 _vertices.

被这些函数引用 ConcatMesh(), carla::geom::MeshFactory::GenerateLaneMarksForCenterLine(), carla::geom::MeshFactory::GenerateLaneMarksForNotCenterLine(), operator FProceduralCustomMesh() , 以及 operator+=().

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

◆ GetVerticesNum()

size_t carla::geom::Mesh::GetVerticesNum ( ) const

在文件 Mesh.cpp292 行定义.

引用了 _vertices.

被这些函数引用 AddTriangleFan(), AddTriangleStrip(), ConcatMesh() , 以及 operator+=().

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

◆ IsValid()

bool carla::geom::Mesh::IsValid ( ) const

检查网格是否有效。

在文件 Mesh.cpp20 行定义.

引用了 _indexes, _materials , 以及 _vertices.

被这些函数引用 ConcatMesh(), carla::geom::MeshFactory::GenerateLaneMarksForCenterLine(), carla::geom::MeshFactory::GenerateLaneMarksForNotCenterLine(), GenerateOBJ(), GenerateOBJForRecast() , 以及 GeneratePLY().

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

◆ operator FProceduralCustomMesh()

carla::geom::Mesh::operator FProceduralCustomMesh ( ) const
inline

在文件 Mesh.h159 行定义.

引用了 GetIndexes(), GetUVs(), GetVertices() , 以及 Mesh().

+ 函数调用图:

◆ operator+=()

Mesh & carla::geom::Mesh::operator+= ( const Mesh & rhs)

将两个网格合并为一个网格

在文件 Mesh.cpp376 行定义.

引用了 _indexes, _materials, _normals, _uvs, _vertices, GetIndexes(), GetIndexesNum(), GetMaterials(), GetNormals(), GetUVs(), GetVertices() , 以及 GetVerticesNum().

+ 函数调用图:

友元及相关函数文档

◆ operator+

Mesh operator+ ( const Mesh & lhs,
const Mesh & rhs )
friend

在文件 Mesh.cpp414 行定义.

类成员变量说明

◆ _indexes

std::vector<index_type> carla::geom::Mesh::_indexes
private

◆ _materials

std::vector<material_type> carla::geom::Mesh::_materials
private

◆ _normals

std::vector<normal_type> carla::geom::Mesh::_normals
private

在文件 Mesh.h231 行定义.

被这些函数引用 AddNormal(), ConcatMesh(), GenerateOBJ(), GetNormals() , 以及 operator+=().

◆ _uvs

std::vector<uv_type> carla::geom::Mesh::_uvs
private

在文件 Mesh.h235 行定义.

被这些函数引用 AddUV(), AddUVs(), ConcatMesh(), GenerateOBJ(), GetUVs() , 以及 operator+=().

◆ _vertices

std::vector<vertex_type> carla::geom::Mesh::_vertices
private

该类的文档由以下文件生成: