Class DiscreteMesher
Naive voxel meshing utilities: emits per-voxel meshes or a single merged mesh. Uses face culling with Morton-coded occupancy when voxel size is uniform.
Inherited Members
Namespace: ZLab.Discrete.Operations.Meshing
Assembly: ZLab.Discrete.dll
Syntax
public static class DiscreteMesher
Remarks
Assumes voxels instances lie on a rectilinear grid.
For the culled path, all voxels must share an identical voxelSize.
If voxel sizes vary, all six faces per voxel are emitted (no merging).
Methods
| Name | Description |
|---|---|
| GenerateMesh(ReadOnlySpan<Vector3>, Vector3, CordSystem) | Generates a single mesh from a set of voxels, assuming a uniform |
| GenerateMesh(ReadOnlySpan<Vector3>, ReadOnlySpan<Vector3>, CordSystem) | Generates a single mesh from a set of voxels. Internal faces are culled using ZLab.Discrete.Algorithms.Encoding.Morton occupancy set (O(1) neighbor checks). |
| GenerateMeshes(ReadOnlySpan<Vector3>, Vector3, Span<MeshF>, CordSystem) | Generates an individual quad-mesh per voxel (all voxels share the same |
| GenerateMeshes(ReadOnlySpan<Vector3>, Vector3, CordSystem) | Generates an individual quad-mesh per voxel (all voxels share the same |
| GenerateMeshes(ReadOnlySpan<Vector3>, ReadOnlySpan<Vector3>, Span<MeshF>, CordSystem) | Generates an individual quad-mesh per voxel (no face merging across voxels). |
| GenerateMeshes(ReadOnlySpan<Vector3>, ReadOnlySpan<Vector3>, CordSystem) | Generates an individual quad-mesh per voxel (no face merging across voxels). |
| GetVoxelBounds(ReadOnlySpan<Vector3>, Vector3) | Gets axis-aligned bounding boxes for a set of voxels (all voxels share the same |
| GetVoxelBounds(ReadOnlySpan<Vector3>, Vector3, Span<BBox>) | Gets axis-aligned bounding boxes for a set of voxels (all voxels share the same |
| GetVoxelBounds(ReadOnlySpan<Vector3>, ReadOnlySpan<Vector3>) | Gets axis-aligned bounding boxes for a set of voxels. |
| GetVoxelBounds(ReadOnlySpan<Vector3>, ReadOnlySpan<Vector3>, Span<BBox>) | Gets axis-aligned bounding boxes for a set of voxels. |