CPU triangle mesh from procedural mesh recipes (e.g. marching cubes). Positions/normals are xyz-packed; uvs are st-packed; indices are triangles. 更多...
#include <MeshBuild.h>
Public 成员函数 | |
| void | clear () |
| void | reserve (int vertexCount, int indexCount) |
| void | addVertex (float px, float py, float pz, float nx, float ny, float nz, float u, float v) |
| void | addTriangle (uint32_t i0, uint32_t i1, uint32_t i2) |
| int | getVertexCount () const |
| int | getIndexCount () const |
| bool | empty () const |
| float | getPositionX (int i) const |
| float | getPositionY (int i) const |
| float | getPositionZ (int i) const |
| float | getNormalX (int i) const |
| float | getNormalY (int i) const |
| float | getNormalZ (int i) const |
| float | getUvU (int i) const |
| float | getUvV (int i) const |
| int | getIndex (int i) const |
| void | setMeta (const std::string &key, const std::string &value) |
| std::string | getMeta (const std::string &key, const std::string &defaultValue) const |
| const std::vector< float > & | positions () const |
| const std::vector< float > & | normals () const |
| const std::vector< float > & | uvs () const |
| const std::vector< uint32_t > & | indices () const |
| std::vector< float > & | positions () |
| std::vector< float > & | normals () |
| std::vector< float > & | uvs () |
| std::vector< uint32_t > & | indices () |
详细描述
CPU triangle mesh from procedural mesh recipes (e.g. marching cubes). Positions/normals are xyz-packed; uvs are st-packed; indices are triangles.
在文件 MeshBuild.h 第 14 行定义.
成员函数说明
◆ addTriangle()
| void eve::procgen::MeshBuild::addTriangle | ( | uint32_t | i0, |
| uint32_t | i1, | ||
| uint32_t | i2 | ||
| ) |
在文件 MeshBuild.cpp 第 34 行定义.
被这些函数引用 eve::procgen::generateRockMesh() , 以及 eve::procgen::marchingCubes().
◆ addVertex()
| void eve::procgen::MeshBuild::addVertex | ( | float | px, |
| float | py, | ||
| float | pz, | ||
| float | nx, | ||
| float | ny, | ||
| float | nz, | ||
| float | u, | ||
| float | v | ||
| ) |
在文件 MeshBuild.cpp 第 22 行定义.
被这些函数引用 eve::procgen::generateRockMesh() , 以及 eve::procgen::marchingCubes().
◆ clear()
| void eve::procgen::MeshBuild::clear | ( | ) |
◆ empty()
| bool eve::procgen::MeshBuild::empty | ( | ) | const |
◆ getIndex()
| int eve::procgen::MeshBuild::getIndex | ( | int | i | ) | const |
在文件 MeshBuild.cpp 第 76 行定义.
引用了 getIndexCount().
◆ getIndexCount()
| int eve::procgen::MeshBuild::getIndexCount | ( | ) | const |
在文件 MeshBuild.cpp 第 41 行定义.
被这些函数引用 eve::procgen::Procgen::generateMesh() , 以及 getIndex().
◆ getMeta()
| std::string eve::procgen::MeshBuild::getMeta | ( | const std::string & | key, |
| const std::string & | defaultValue | ||
| ) | const |
在文件 MeshBuild.cpp 第 83 行定义.
◆ getNormalX()
| float eve::procgen::MeshBuild::getNormalX | ( | int | i | ) | const |
在文件 MeshBuild.cpp 第 56 行定义.
引用了 getVertexCount().
◆ getNormalY()
| float eve::procgen::MeshBuild::getNormalY | ( | int | i | ) | const |
在文件 MeshBuild.cpp 第 60 行定义.
引用了 getVertexCount().
◆ getNormalZ()
| float eve::procgen::MeshBuild::getNormalZ | ( | int | i | ) | const |
在文件 MeshBuild.cpp 第 64 行定义.
引用了 getVertexCount().
◆ getPositionX()
| float eve::procgen::MeshBuild::getPositionX | ( | int | i | ) | const |
在文件 MeshBuild.cpp 第 44 行定义.
引用了 getVertexCount().
◆ getPositionY()
| float eve::procgen::MeshBuild::getPositionY | ( | int | i | ) | const |
在文件 MeshBuild.cpp 第 48 行定义.
引用了 getVertexCount().
◆ getPositionZ()
| float eve::procgen::MeshBuild::getPositionZ | ( | int | i | ) | const |
在文件 MeshBuild.cpp 第 52 行定义.
引用了 getVertexCount().
◆ getUvU()
| float eve::procgen::MeshBuild::getUvU | ( | int | i | ) | const |
在文件 MeshBuild.cpp 第 68 行定义.
引用了 getVertexCount().
◆ getUvV()
| float eve::procgen::MeshBuild::getUvV | ( | int | i | ) | const |
在文件 MeshBuild.cpp 第 72 行定义.
引用了 getVertexCount().
◆ getVertexCount()
| int eve::procgen::MeshBuild::getVertexCount | ( | ) | const |
在文件 MeshBuild.cpp 第 40 行定义.
被这些函数引用 eve::procgen::Procgen::generateMesh(), getNormalX(), getNormalY(), getNormalZ(), getPositionX(), getPositionY(), getPositionZ(), getUvU(), getUvV() , 以及 eve::procgen::marchingCubes().
◆ indices() [1/2]
|
inline |
在文件 MeshBuild.h 第 47 行定义.
◆ indices() [2/2]
|
inline |
在文件 MeshBuild.h 第 42 行定义.
◆ normals() [1/2]
|
inline |
在文件 MeshBuild.h 第 45 行定义.
◆ normals() [2/2]
|
inline |
在文件 MeshBuild.h 第 40 行定义.
◆ positions() [1/2]
|
inline |
在文件 MeshBuild.h 第 44 行定义.
◆ positions() [2/2]
|
inline |
在文件 MeshBuild.h 第 39 行定义.
被这些函数引用 eve::procgen::generateLinearStructure() , 以及 eve::procgen::Procgen::generateMesh().
◆ reserve()
| void eve::procgen::MeshBuild::reserve | ( | int | vertexCount, |
| int | indexCount | ||
| ) |
在文件 MeshBuild.cpp 第 13 行定义.
被这些函数引用 eve::procgen::generateLinearStructure(), eve::procgen::generateRockMesh() , 以及 eve::procgen::marchingCubes().
◆ setMeta()
| void eve::procgen::MeshBuild::setMeta | ( | const std::string & | key, |
| const std::string & | value | ||
| ) |
在文件 MeshBuild.cpp 第 81 行定义.
引用了 value.
被这些函数引用 eve::procgen::generateBushMesh(), eve::procgen::generateLinearStructure(), eve::procgen::generateMarchingCubesMesh(), eve::procgen::generateRockMesh(), eve::procgen::generateSkyscraperMesh(), eve::procgen::generateTreeMesh() , 以及 eve::procgen::marchingCubes().
◆ uvs() [1/2]
|
inline |
在文件 MeshBuild.h 第 46 行定义.
◆ uvs() [2/2]
|
inline |
在文件 MeshBuild.h 第 41 行定义.
该类的文档由以下文件生成:
- src/modules/procgen/MeshBuild.h
- src/modules/procgen/MeshBuild.cpp