feat: producer sketch

This commit is contained in:
2026-11-16 12:01:35 +01:00
parent 3ccbfe55eb
commit 9b8fd9840e
+20
View File
@@ -5,7 +5,10 @@ use bytemuck::Pod;
use bytemuck::Zeroable;
use vxls_voxel_cache::schema::InsertionInformation;
use vxls_voxel_cache::schema::LocationPage;
pub use vxls_voxel_cache::schema::StructureAnchor;
use wgpu::naga::keywords;
/// A structure locator format to locate node within an ntree
pub mod tree_locator;
@@ -69,3 +72,20 @@ pub trait Has<A: Attribute>
}
}
pub struct ProducedNode<const N: usize, A: Attribute>
where [(); N * N * N]:,
{
insersion_info: InsertionInformation<N>,
location: LocationPage,
attributes: [A; N * N * N],
}
pub trait Producer<const N: usize, A: Attribute>
where [(); N * N * N]:,
{
fn produce(&self,
producer_id: ProducerId,
anchor: StructureAnchor,
locator: StructureLocator
) -> ProducedNode<N, A>;
}