pub struct VoxelArray { /* private fields */ }Expand description
Wraps the corresponding Model I/O voxel array counterpart.
Implementations§
Source§impl VoxelArray
impl VoxelArray
Sourcepub fn new(
voxel_indices: &[[i32; 4]],
bounding_box: BoundingBox,
voxel_extent: f32,
) -> Result<Self>
pub fn new( voxel_indices: &[[i32; 4]], bounding_box: BoundingBox, voxel_extent: f32, ) -> Result<Self>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O voxel array counterpart.
Sourcepub fn from_asset(
asset: &Asset,
divisions: i32,
patch_radius: f32,
) -> Result<Self>
pub fn from_asset( asset: &Asset, divisions: i32, patch_radius: f32, ) -> Result<Self>
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn info(&self) -> Result<VoxelArrayInfo>
pub fn info(&self) -> Result<VoxelArrayInfo>
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn count(&self) -> usize
pub fn count(&self) -> usize
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn set_voxel(&self, index: [i32; 4])
pub fn set_voxel(&self, index: [i32; 4])
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn set_voxels_for_mesh(
&self,
mesh: &Mesh,
divisions: i32,
patch_radius: f32,
)
pub fn set_voxels_for_mesh( &self, mesh: &Mesh, divisions: i32, patch_radius: f32, )
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn voxel_exists(
&self,
index: [i32; 4],
allow_any_x: bool,
allow_any_y: bool,
allow_any_z: bool,
allow_any_shell: bool,
) -> bool
pub fn voxel_exists( &self, index: [i32; 4], allow_any_x: bool, allow_any_y: bool, allow_any_z: bool, allow_any_shell: bool, ) -> bool
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn voxel_indices(&self) -> Vec<[i32; 4]>
pub fn voxel_indices(&self) -> Vec<[i32; 4]>
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn voxels_within_extent(&self, extent: &VoxelIndexExtent) -> Vec<[i32; 4]>
pub fn voxels_within_extent(&self, extent: &VoxelIndexExtent) -> Vec<[i32; 4]>
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn union_with(&self, other: &Self)
pub fn union_with(&self, other: &Self)
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn intersect_with(&self, other: &Self)
pub fn intersect_with(&self, other: &Self)
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn difference_with(&self, other: &Self)
pub fn difference_with(&self, other: &Self)
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn index_of_spatial_location(&self, location: [f32; 3]) -> [i32; 4]
pub fn index_of_spatial_location(&self, location: [f32; 3]) -> [i32; 4]
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn spatial_location_of_index(&self, index: [i32; 4]) -> [f32; 3]
pub fn spatial_location_of_index(&self, index: [i32; 4]) -> [f32; 3]
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn voxel_bounding_box_at_index(&self, index: [i32; 4]) -> BoundingBox
pub fn voxel_bounding_box_at_index(&self, index: [i32; 4]) -> BoundingBox
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn convert_to_signed_shell_field(&self)
pub fn convert_to_signed_shell_field(&self)
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn set_shell_field_interior_thickness(&self, value: f32)
pub fn set_shell_field_interior_thickness(&self, value: f32)
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn set_shell_field_exterior_thickness(&self, value: f32)
pub fn set_shell_field_exterior_thickness(&self, value: f32)
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn coarse_mesh(&self) -> Option<Mesh>
pub fn coarse_mesh(&self) -> Option<Mesh>
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn coarse_mesh_with_allocator(
&self,
allocator: Option<&MeshBufferAllocator>,
) -> Option<Mesh>
pub fn coarse_mesh_with_allocator( &self, allocator: Option<&MeshBufferAllocator>, ) -> Option<Mesh>
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn mesh(&self) -> Option<Mesh>
pub fn mesh(&self) -> Option<Mesh>
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Sourcepub fn mesh_with_allocator(
&self,
allocator: Option<&MeshBufferAllocator>,
) -> Option<Mesh>
pub fn mesh_with_allocator( &self, allocator: Option<&MeshBufferAllocator>, ) -> Option<Mesh>
Calls the corresponding Model I/O method on the wrapped Model I/O voxel array counterpart.
Trait Implementations§
Source§impl Clone for VoxelArray
impl Clone for VoxelArray
Source§fn clone(&self) -> VoxelArray
fn clone(&self) -> VoxelArray
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more