载入中...
搜索中...
未找到
Builder.h
浏览该文件的文档.
1#pragma once
2
4
5#include <cstdint>
6
7namespace eve::virtualgeometry {
8
22public:
23 struct MeshInput {
24 int vertexCount = 0;
25 const float *positions = nullptr; // xyz packed
26 const float *normals = nullptr; // optional xyz packed
27 const std::uint32_t *indices = nullptr; // triangle list (count % 3 == 0)
28 int indexCount = 0;
29 };
30
31 struct Options {
32 int maxVerticesPerCluster = 64; // ~Nanite 128 tris / 64-96 verts
34 int minLodLevels = 4; // build at least this many levels
35 int mergeFactor = 4; // clusters merged into one parent
36 float lodTargetRatio = 0.5f; // parent keeps this fraction of triangles
37 };
38
40 bool build(const MeshInput &in, const Options &opt, VirtualGeometryAsset &out);
41};
42
43} // namespace eve::virtualgeometry
CPU preprocessor that builds a Nanite-style hierarchical cluster DAG from a triangle mesh:
Definition Builder.h:21
bool build(const MeshInput &in, const Options &opt, VirtualGeometryAsset &out)
Returns false on empty/invalid input.
Definition Builder.cpp:337
Fully processed virtual-geometry asset (CPU representation). Produced by Builder from a Mesh; uploade...