载入中...
搜索中...
未找到
eve::procgen::MeshBuild类 参考

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.h14 行定义.

成员函数说明

◆ addTriangle()

void eve::procgen::MeshBuild::addTriangle ( uint32_t  i0,
uint32_t  i1,
uint32_t  i2 
)

在文件 MeshBuild.cpp34 行定义.

引用了 i0, i1 , 以及 i2.

被这些函数引用 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.cpp22 行定义.

引用了 px, u , 以及 v.

被这些函数引用 eve::procgen::generateRockMesh() , 以及 eve::procgen::marchingCubes().

◆ clear()

◆ empty()

◆ getIndex()

int eve::procgen::MeshBuild::getIndex ( int  i) const

在文件 MeshBuild.cpp76 行定义.

引用了 getIndexCount().

◆ getIndexCount()

int eve::procgen::MeshBuild::getIndexCount ( ) const

在文件 MeshBuild.cpp41 行定义.

被这些函数引用 eve::procgen::Procgen::generateMesh() , 以及 getIndex().

◆ getMeta()

std::string eve::procgen::MeshBuild::getMeta ( const std::string &  key,
const std::string &  defaultValue 
) const

在文件 MeshBuild.cpp83 行定义.

◆ getNormalX()

float eve::procgen::MeshBuild::getNormalX ( int  i) const

在文件 MeshBuild.cpp56 行定义.

引用了 getVertexCount().

◆ getNormalY()

float eve::procgen::MeshBuild::getNormalY ( int  i) const

在文件 MeshBuild.cpp60 行定义.

引用了 getVertexCount().

◆ getNormalZ()

float eve::procgen::MeshBuild::getNormalZ ( int  i) const

在文件 MeshBuild.cpp64 行定义.

引用了 getVertexCount().

◆ getPositionX()

float eve::procgen::MeshBuild::getPositionX ( int  i) const

在文件 MeshBuild.cpp44 行定义.

引用了 getVertexCount().

◆ getPositionY()

float eve::procgen::MeshBuild::getPositionY ( int  i) const

在文件 MeshBuild.cpp48 行定义.

引用了 getVertexCount().

◆ getPositionZ()

float eve::procgen::MeshBuild::getPositionZ ( int  i) const

在文件 MeshBuild.cpp52 行定义.

引用了 getVertexCount().

◆ getUvU()

float eve::procgen::MeshBuild::getUvU ( int  i) const

在文件 MeshBuild.cpp68 行定义.

引用了 getVertexCount().

◆ getUvV()

float eve::procgen::MeshBuild::getUvV ( int  i) const

在文件 MeshBuild.cpp72 行定义.

引用了 getVertexCount().

◆ getVertexCount()

int eve::procgen::MeshBuild::getVertexCount ( ) const

◆ indices() [1/2]

std::vector< uint32_t > & eve::procgen::MeshBuild::indices ( )
inline

在文件 MeshBuild.h47 行定义.

◆ indices() [2/2]

const std::vector< uint32_t > & eve::procgen::MeshBuild::indices ( ) const
inline

在文件 MeshBuild.h42 行定义.

被这些函数引用 eve::procgen::Procgen::generateMesh().

◆ normals() [1/2]

std::vector< float > & eve::procgen::MeshBuild::normals ( )
inline

在文件 MeshBuild.h45 行定义.

◆ normals() [2/2]

const std::vector< float > & eve::procgen::MeshBuild::normals ( ) const
inline

在文件 MeshBuild.h40 行定义.

被这些函数引用 eve::procgen::Procgen::generateMesh().

◆ positions() [1/2]

std::vector< float > & eve::procgen::MeshBuild::positions ( )
inline

在文件 MeshBuild.h44 行定义.

◆ positions() [2/2]

const std::vector< float > & eve::procgen::MeshBuild::positions ( ) const
inline

在文件 MeshBuild.h39 行定义.

被这些函数引用 eve::procgen::generateLinearStructure() , 以及 eve::procgen::Procgen::generateMesh().

◆ reserve()

void eve::procgen::MeshBuild::reserve ( int  vertexCount,
int  indexCount 
)

◆ setMeta()

void eve::procgen::MeshBuild::setMeta ( const std::string &  key,
const std::string &  value 
)

◆ uvs() [1/2]

std::vector< float > & eve::procgen::MeshBuild::uvs ( )
inline

在文件 MeshBuild.h46 行定义.

◆ uvs() [2/2]

const std::vector< float > & eve::procgen::MeshBuild::uvs ( ) const
inline

在文件 MeshBuild.h41 行定义.

被这些函数引用 eve::procgen::Procgen::generateMesh().


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