Remove unused code
This commit is contained in:
parent
0200d876b1
commit
a6d89fb2e5
|
@ -1,9 +1,6 @@
|
|||
use std::collections::HashSet;
|
||||
|
||||
use crate::{
|
||||
gfx::{BulkBufferBuilder, Context},
|
||||
math,
|
||||
};
|
||||
use crate::gfx::{BulkBufferBuilder, Context};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
pub enum BrickgridFlag {
|
||||
|
@ -78,9 +75,15 @@ impl Brickgrid {
|
|||
}
|
||||
}
|
||||
|
||||
/// Panics if position maps to out of range index
|
||||
// pub fn set(&mut self, pos: glam::UVec3, value: BrickgridElement) -> BrickgridElement {
|
||||
// let index = math::to_1d_index(pos, self.dimensions);
|
||||
pub fn get_buffer(&self) -> &wgpu::Buffer {
|
||||
&self.buffer
|
||||
}
|
||||
|
||||
pub fn get_upload_buffer(&self) -> &wgpu::Buffer {
|
||||
&self.upload_buffer
|
||||
}
|
||||
|
||||
/// Panics if index out of range
|
||||
pub fn set(&mut self, index: usize, value: BrickgridElement) -> BrickgridElement {
|
||||
let current = self.data[index];
|
||||
self.data[index] = value;
|
||||
|
@ -88,9 +91,7 @@ impl Brickgrid {
|
|||
current
|
||||
}
|
||||
|
||||
/// Panics if position maps to out of range index
|
||||
// pub fn get(&mut self, pos: glam::UVec3) -> BrickgridElement {
|
||||
// let index = math::to_1d_index(pos, self.dimensions);
|
||||
/// Panics if index out of range
|
||||
pub fn get(&mut self, index: usize) -> BrickgridElement {
|
||||
self.data[index]
|
||||
}
|
||||
|
@ -128,12 +129,4 @@ impl Brickgrid {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_buffer(&self) -> &wgpu::Buffer {
|
||||
&self.buffer
|
||||
}
|
||||
|
||||
pub fn get_upload_buffer(&self) -> &wgpu::Buffer {
|
||||
&self.upload_buffer
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
use crate::voxel::world::{Voxel, WorldManager};
|
||||
|
||||
use super::brickgrid::BrickgridFlag;
|
||||
|
||||
pub fn cull_interior_voxels(
|
||||
world: &mut WorldManager,
|
||||
grid_pos: glam::IVec3,
|
||||
|
@ -103,10 +101,6 @@ pub fn cull_interior_voxels(
|
|||
(bitmask_data, albedo_data)
|
||||
}
|
||||
|
||||
pub fn to_brickgrid_element(brickmap_cache_idx: u32, flags: BrickgridFlag) -> u32 {
|
||||
(brickmap_cache_idx << 8) + flags as u32
|
||||
}
|
||||
|
||||
pub fn grid_pos_to_world_pos(
|
||||
world: &mut WorldManager,
|
||||
grid_pos: glam::IVec3,
|
||||
|
|
Loading…
Reference in New Issue