Struct veloren_common::volumes::vol_grid_3d::VolGrid3d
source · pub struct VolGrid3d<V: RasterableVol> {
chunks: HashMap<Vec3<i32>, Arc<V>>,
}
Fields§
§chunks: HashMap<Vec3<i32>, Arc<V>>
Implementations§
source§impl<V: RasterableVol> VolGrid3d<V>
impl<V: RasterableVol> VolGrid3d<V>
source§impl<V: RasterableVol> VolGrid3d<V>
impl<V: RasterableVol> VolGrid3d<V>
pub fn new() -> Result<Self, VolGrid3dError<V>>
pub fn chunk_size() -> Vec3<u32>
pub fn insert(&mut self, key: Vec3<i32>, chunk: Arc<V>) -> Option<Arc<V>>
pub fn get_key(&self, key: Vec3<i32>) -> Option<&V>
pub fn get_key_arc(&self, key: Vec3<i32>) -> Option<&Arc<V>>
pub fn remove(&mut self, key: Vec3<i32>) -> Option<Arc<V>>
pub fn key_pos(&self, key: Vec3<i32>) -> Vec3<i32>
pub fn pos_key(&self, pos: Vec3<i32>) -> Vec3<i32>
pub fn iter(&self) -> ChunkIter<'_, V> ⓘ
Trait Implementations§
source§impl<V: RasterableVol + ReadVol + Debug> ReadVol for VolGrid3d<V>
impl<V: RasterableVol + ReadVol + Debug> ReadVol for VolGrid3d<V>
source§fn get(&self, pos: Vec3<i32>) -> Result<&V::Vox, VolGrid3dError<V>>
fn get(&self, pos: Vec3<i32>) -> Result<&V::Vox, VolGrid3dError<V>>
Get a reference to the voxel at the provided position in the volume.
Auto Trait Implementations§
impl<V> RefUnwindSafe for VolGrid3d<V>where
V: RefUnwindSafe,
impl<V> Send for VolGrid3d<V>
impl<V> Sync for VolGrid3d<V>
impl<V> Unpin for VolGrid3d<V>
impl<V> UnwindSafe for VolGrid3d<V>where
V: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more