函数 | |
| eve::Result< GeometryCollectionAsset > | cookGeometryCollection (const eve::asset::CanonicalMeshData &mesh, const FractureRecipe &recipe) |
| Cook an owning canonical mesh into a geometry-collection asset. | |
函数说明
◆ cookGeometryCollection()
| EVENGINE_API_DOMAINS eve::Result< GeometryCollectionAsset > eve::physics::destruction_cook::cookGeometryCollection | ( | const eve::asset::CanonicalMeshData & | mesh, |
| const FractureRecipe & | recipe | ||
| ) |
Cook an owning canonical mesh into a geometry-collection asset.
P1 produces box-proxy bones and a connection graph from the fracture pattern. Full triangle CSG with interior caps is deferred to graphics-backed cook; the collision proxies and neighbor graph are bit-exact for a fixed recipe/seed.
- 参数
-
mesh Borrowed immutable mesh retained only for this synchronous call. recipe Validated fracture recipe; randomness uses only seed+stream name.
- 返回
- Complete validated asset, or a checked diagnostic with no partial publish. @thread Worker-safe and reentrant; no IO, callbacks, or global mutation.
在文件 GeometryCollectionCooker.cpp 第 350 行定义.
引用了 bone, eve::physics::GeometryCollectionAsset::bones, bounds, cell, cells, eve::physics::ClusteredVoronoi, count, eve::physics::FractureRecipe::defaultDensity, eve::physics::FractureRecipe::defaultFriction, eve::physics::FractureRecipe::defaultRestitution, eve::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::physics::GeometryCollectionBone::halfExtentX, eve::InvalidArgument, eve::physics::FractureRecipe::maximumBones, mesh, eve::physics::FractureRecipe::minimumThickness, eve::physics::FractureRecipe::mode, eve::physics::Planar, eve::physics::Radial, eve::physics::FractureRecipe::randomStreamName, eve::physics::FractureRecipe::seed, eve::Result< T >::success(), eve::physics::UniformVoronoi, valid, eve::physics::FractureRecipe::validate(), eve::physics::GeometryCollectionAsset::validate() , 以及 volume.