pub struct OccupancyGrid {
pub dims: [usize; 3],
pub origin: [f32; 3],
pub voxel_size: f32,
pub data: Vec<f32>,
}Expand description
A dense 3D grid in row-major (z, y, x) order.
Fields§
§dims: [usize; 3]Grid dimensions (nx, ny, nz).
origin: [f32; 3]Lower corner of voxel (0, 0, 0).
voxel_size: f32Voxel side length.
data: Vec<f32>Values, indexed z * (ny * nx) + y * nx + x.
Implementations§
Source§impl OccupancyGrid
impl OccupancyGrid
Sourcepub fn occupied_count(&self) -> usize
pub fn occupied_count(&self) -> usize
Number of voxels with a non-zero value.
Trait Implementations§
Source§impl Clone for OccupancyGrid
impl Clone for OccupancyGrid
Source§fn clone(&self) -> OccupancyGrid
fn clone(&self) -> OccupancyGrid
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OccupancyGrid
impl Debug for OccupancyGrid
Source§impl PartialEq for OccupancyGrid
impl PartialEq for OccupancyGrid
impl StructuralPartialEq for OccupancyGrid
Auto Trait Implementations§
impl Freeze for OccupancyGrid
impl RefUnwindSafe for OccupancyGrid
impl Send for OccupancyGrid
impl Sync for OccupancyGrid
impl Unpin for OccupancyGrid
impl UnsafeUnpin for OccupancyGrid
impl UnwindSafe for OccupancyGrid
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