20 lines
411 B
Rust
20 lines
411 B
Rust
use super::vec3generic::Vec3Generic;
|
|
|
|
/// A container for voxels that have 3-dimensional integer coordinates.
|
|
//#[cfg(feature = "block-mesh")]
|
|
pub trait VoxelContainer<TVoxel>
|
|
where
|
|
TVoxel: Copy,
|
|
{
|
|
fn get_voxel_at_pos(&self, pos: Vec3Generic<i32>) -> Option<TVoxel>;
|
|
}
|
|
|
|
pub trait DefaultVoxel {
|
|
fn get_default(kind: DefaultVoxelKinds) -> Self;
|
|
}
|
|
|
|
pub enum DefaultVoxelKinds {
|
|
None,
|
|
Solid,
|
|
}
|