feat: producer sketch
This commit is contained in:
@@ -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>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user