载入中...
搜索中...
未找到
MarchingCubes.h 文件参考
#include "procgen/MeshBuild.h"
#include "procgen/Params.h"
#include <functional>
#include <string>
#include <unordered_map>
#include <vector>

浏览源代码.

class  eve::procgen::MeshRecipeRegistry
 

命名空间

namespace  eve
 
namespace  eve::procgen
 

类型定义

using eve::procgen::MeshRecipeFn = std::function< bool(const Params &params, MeshBuild &out, std::string &error)>
 

函数

bool eve::procgen::marchingCubes (const float *density, int nx, int ny, int nz, float isolevel, MeshBuild &out, std::string *error=nullptr)
 Classic Marching Cubes (Lorensen & Cline) over a regular scalar volume. Density >= isolevel is treated as solid; normals point toward empty space.
 
bool eve::procgen::fillDensityField (const Params &params, std::vector< float > &density, int &nx, int &ny, int &nz, std::string &error)
 Fill a density volume from a named field recipe (sphere / noise / terrain / torus).
 
bool eve::procgen::generateMarchingCubesMesh (const Params &params, MeshBuild &out, std::string &error)
 Build mesh from Params (field + resolution + isolevel).
 
bool eve::procgen::generateHexPlanetMesh (const Params &params, MeshBuild &out, std::string &error)
 Build the dual of a subdivided icosahedron. The result is a closed planet made of hexagonal cells plus the twelve pentagons required by spherical topology. Params: radius (1), subdivisions (2), tileInset (0.06, in [0, 0.5)).