类 | |
| struct | AssemblyFractureSettings |
| Offline assembly settings; per-component policy overrides its authored cluster policy. Source cluster ids name author-defined structural/material groups, not a universal building hierarchy. @ownership Owns all policies. Cook borrows them synchronously and publishes owning data. @thread Single caller while editing; immutable settings can be cooked concurrently. 更多... | |
| class | DestructionCook |
| Offline script entrypoint for true convex Voronoi fracture. Factories transfer owning assets/instances to the VM through canonical Result projections. 更多... | |
| struct | FractureComponentPolicy |
| Independent controls for mesh granularity, internal cohesion and parent-joint strength. 更多... | |
| struct | FracturedCollection |
| Complete owning fracture asset: graph, body origins and exact convex geometry. 更多... | |
函数 | |
| Module_IMPL (DestructionCook, new DestructionCook()) | |
| eve::Result< GeometryCollectionAsset > | cookGeometryCollection (const eve::asset::CanonicalMeshData &mesh, const FractureRecipe &recipe) |
| Cook an owning canonical mesh into a geometry-collection asset. | |
| Result< FracturedCollection > | cookVoronoi (const eve::asset::CanonicalMeshData &mesh, const FractureRecipe &recipe) |
| Intersect a closed convex source mesh with seeded Voronoi half-spaces. | |
| Result< FracturedCollection > | cookVoronoiAssembly (const GeometryCollectionAsset &assembly, const FractureRecipe &recipe) |
| Prefracture each box in an authored assembly and preserve declared parent supports. Adjacent child AABBs within 0.04m are welded only across an authored parent edge. @cost Offline repeated convex clipping; amortize once over all animation instances. | |
| Result< FracturedCollection > | cookVoronoiAssembly (const GeometryCollectionAsset &assembly, const AssemblyFractureSettings &settings) |
| Parameterized assembly cook with per-group/per-component fracture and joint policies. @cost Offline clipping and graph construction; cook once, reuse every saved playback. | |
函数说明
◆ 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.
Compatibility-only proxy cook: Voronoi mode names here describe site placement, not a tessellation. Use cookVoronoi from VoronoiCook.h for actual closed convex fragments, shared-face adjacency, interior caps and exact convex collision. The legacy proxy shape and seed behavior remain unchanged.
- 参数
-
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::Diagnostic::error(), eve::Failed, eve::Result< T >::failure(), eve::physics::GeometryCollectionBone::halfExtentX, eve::InvalidArgument, mesh, eve::physics::Planar, eve::physics::Radial, recipe, eve::Result< T >::success(), eve::physics::UniformVoronoi, valid, eve::physics::GeometryCollectionAsset::validate() , 以及 volume.
◆ cookVoronoi()
| EVENGINE_API_DOMAINS Result< FracturedCollection > eve::physics::destruction_cook::cookVoronoi | ( | const eve::asset::CanonicalMeshData & | mesh, |
| const FractureRecipe & | recipe | ||
| ) |
Intersect a closed convex source mesh with seeded Voronoi half-spaces.
- 参数
-
mesh Borrowed only for the call. Reject open, nonconvex, degenerate or excessive input. recipe Uniform/clustered Voronoi recipe; explicit seed and named stream, no clock.
- 返回
- Complete immutable-ready data or failure, without partial publication. @cost Offline polynomial clipping in sites and source faces; cook once, reuse the asset. @thread Worker-safe, reentrant; no IO, locks, callbacks, services or global RNG. @lifetime Returned data owns every vertex; source can be destroyed immediately.
在文件 VoronoiCook.cpp 第 186 行定义.
引用了 a, area, b, bone, c, cell, center, centers, clip, eve::physics::ClusteredVoronoi, count, d, eve::physics::force_detail::dot(), f, eve::Result< T >::failure(), found, eve::physics::FractureFragment::indices, inside, length, eve::physics::GeometryCollectionBone::localX, eve::physics::FractureFragment::materials, mesh, n, origin, p, point, points, eve::physics::FractureFragment::positions, q, recipe, result, seed, source, eve::Result< T >::success(), eve::physics::UniformVoronoi, v , 以及 volume.
被这些函数引用 cookVoronoiAssembly().
◆ cookVoronoiAssembly() [1/2]
| EVENGINE_API_DOMAINS Result< FracturedCollection > eve::physics::destruction_cook::cookVoronoiAssembly | ( | const GeometryCollectionAsset & | assembly, |
| const AssemblyFractureSettings & | settings | ||
| ) |
Parameterized assembly cook with per-group/per-component fracture and joint policies. @cost Offline clipping and graph construction; cook once, reuse every saved playback.
- 返回
- Complete asset or failure without partial publication; borrows inputs only during call. @thread Worker-safe, no callbacks, IO or global RNG. Policy lookup never runs in playback.
在文件 VoronoiCook.cpp 第 339 行定义.
引用了 a, b, bone, eve::physics::GeometryCollectionAsset::bones, c, cookVoronoi(), edge, eve::physics::GeometryCollectionAsset::edges, eve::Result< T >::failure(), g, maximum, mesh, p, parent, r, recipe, result, settings, eve::physics::UniformVoronoi, eve::physics::GeometryCollectionAsset::validate(), x , 以及 y.
◆ cookVoronoiAssembly() [2/2]
| EVENGINE_API_DOMAINS Result< FracturedCollection > eve::physics::destruction_cook::cookVoronoiAssembly | ( | const GeometryCollectionAsset & | assembly, |
| const FractureRecipe & | recipe | ||
| ) |
Prefracture each box in an authored assembly and preserve declared parent supports. Adjacent child AABBs within 0.04m are welded only across an authored parent edge. @cost Offline repeated convex clipping; amortize once over all animation instances.
- 返回
- Complete owning assembly or checked failure. Borrows inputs only during call. @thread Worker-safe; same seed/stream and input give the same ordering within float tolerance.
在文件 VoronoiCook.cpp 第 334 行定义.
引用了 cookVoronoiAssembly(), recipe, eve::physics::destruction_cook::AssemblyFractureSettings::recipe , 以及 settings.
被这些函数引用 cookVoronoiAssembly().
◆ Module_IMPL()
| eve::physics::destruction_cook::Module_IMPL | ( | DestructionCook | , |
| new | DestructionCook() | ||
| ) |