Trait voxelize::VoxelAccess
source · [−]pub trait VoxelAccess {
Show 25 methods
fn get_raw_voxel(&self, vx: i32, vy: i32, vz: i32) -> u32 { ... }
fn set_raw_voxel(&mut self, vx: i32, vy: i32, vz: i32, voxel: u32) -> bool { ... }
fn get_raw_light(&self, vx: i32, vy: i32, vz: i32) -> u32 { ... }
fn set_raw_light(&mut self, vx: i32, vy: i32, vz: i32, level: u32) -> bool { ... }
fn get_voxel(&self, vx: i32, vy: i32, vz: i32) -> u32 { ... }
fn set_voxel(&mut self, vx: i32, vy: i32, vz: i32, id: u32) -> bool { ... }
fn get_voxel_rotation(&self, vx: i32, vy: i32, vz: i32) -> BlockRotation { ... }
fn set_voxel_rotation(
&mut self,
vx: i32,
vy: i32,
vz: i32,
rotation: &BlockRotation
) -> bool { ... }
fn get_voxel_stage(&self, vx: i32, vy: i32, vz: i32) -> u32 { ... }
fn set_voxel_stage(&mut self, vx: i32, vy: i32, vz: i32, stage: u32) -> bool { ... }
fn get_sunlight(&self, vx: i32, vy: i32, vz: i32) -> u32 { ... }
fn set_sunlight(&mut self, vx: i32, vy: i32, vz: i32, level: u32) -> bool { ... }
fn get_red_light(&self, vx: i32, vy: i32, vz: i32) -> u32 { ... }
fn set_red_light(&mut self, vx: i32, vy: i32, vz: i32, level: u32) -> bool { ... }
fn get_green_light(&self, vx: i32, vy: i32, vz: i32) -> u32 { ... }
fn set_green_light(&mut self, vx: i32, vy: i32, vz: i32, level: u32) -> bool { ... }
fn get_blue_light(&self, vx: i32, vy: i32, vz: i32) -> u32 { ... }
fn set_blue_light(&mut self, vx: i32, vy: i32, vz: i32, level: u32) -> bool { ... }
fn get_torch_light(&self, vx: i32, vy: i32, vz: i32, color: &LightColor) -> u32 { ... }
fn set_torch_light(
&mut self,
vx: i32,
vy: i32,
vz: i32,
level: u32,
color: &LightColor
) -> bool { ... }
fn get_max_height(&self, vx: i32, vz: i32) -> u32 { ... }
fn set_max_height(&mut self, vx: i32, vz: i32, height: u32) -> bool { ... }
fn get_voxels(&self, cx: i32, cz: i32) -> Option<&Ndarray<u32>> { ... }
fn get_lights(&self, cx: i32, cz: i32) -> Option<&Ndarray<u32>> { ... }
fn contains(&self, vx: i32, vy: i32, vz: i32) -> bool { ... }
}
Provided Methods
Get the raw voxel data at the voxel coordinate. Zero is returned if chunk DNE.
Set the raw voxel data at the voxel coordinate. Returns false couldn’t set.
Get the raw light data at the voxel coordinate. Zero is returned if chunk DNE.
Set the raw light data at the voxel coordinate. Returns false couldn’t set.
Get the voxel ID at a voxel coordinate. If chunk not found, 0 is returned.
Set the voxel type at a voxel coordinate. Returns false couldn’t set.
fn get_voxel_rotation(&self, vx: i32, vy: i32, vz: i32) -> BlockRotation
fn get_voxel_rotation(&self, vx: i32, vy: i32, vz: i32) -> BlockRotation
Get the voxel rotation at a voxel coordinate. Panics if chunk isn’t found.
fn set_voxel_rotation(
&mut self,
vx: i32,
vy: i32,
vz: i32,
rotation: &BlockRotation
) -> bool
fn set_voxel_rotation(
&mut self,
vx: i32,
vy: i32,
vz: i32,
rotation: &BlockRotation
) -> bool
Set the voxel rotation at a voxel coordinate. Does nothing if chunk isn’t found.
Get the voxel stage at a voxel coordinate. Panics if chunk isn’t found.
Set the voxel stage at a voxel coordinate. Does nothing if chunk isn’t found.
Get the sunlight level at a voxel position. Returns 0 if chunk does not exist.
Set the sunlight level at a voxel coordinate. Returns false if could not set.
Get the red light level at the voxel position. Zero is returned if chunk doesn’t exist.
Set the red light level at the voxel position. Returns false if could not set.
Get the green light level at the voxel position. Zero is returned if chunk doesn’t exist.
Set the green light level at the voxel position. Returns false if could not set.
Get the blue light level at the voxel position. Zero is returned if chunk doesn’t exist.
Set the blue light level at the voxel position. Returns false if could not set.
fn get_torch_light(&self, vx: i32, vy: i32, vz: i32, color: &LightColor) -> u32
fn get_torch_light(&self, vx: i32, vy: i32, vz: i32, color: &LightColor) -> u32
Get the torch light level by color at a voxel coordinate. Returns 0 if chunk does not exist.
fn set_torch_light(
&mut self,
vx: i32,
vy: i32,
vz: i32,
level: u32,
color: &LightColor
) -> bool
fn set_torch_light(
&mut self,
vx: i32,
vy: i32,
vz: i32,
level: u32,
color: &LightColor
) -> bool
Set the torch light level by color at a voxel coordinate. Returns false if could not set.
fn get_max_height(&self, vx: i32, vz: i32) -> u32
fn get_max_height(&self, vx: i32, vz: i32) -> u32
Get the max height at a voxel column. Returns 0 if column does not exist.
Set the max height at a voxel column. Does nothing if column does not exist.
Get a reference of voxel n-dimensional array.
Get a reference of lighting n-dimensional array.