pub trait ArrangeSlice<T>: AsMut<[T]>where
T: ShiftTransformExt,{
// Provided methods
fn arrange_with(&mut self, pos_func: impl Fn(usize) -> DVec3)
where AabbPoint: Locate<T> { ... }
fn arrange_in_y(&mut self, gap: f64)
where T: Aabb,
AabbPoint: Locate<T> { ... }
fn arrange_in_grid(
&mut self,
cell_cnt: USizeVec3,
cell_size: DVec3,
gap: DVec3,
) -> &mut Self
where AabbPoint: Locate<T> { ... }
fn arrange_in_cols_with(
&mut self,
ncols: usize,
pos_func: impl Fn(usize, usize) -> DVec3,
)
where AabbPoint: Locate<T> { ... }
fn arrange_in_rows_with(
&mut self,
nrows: usize,
pos_func: impl Fn(usize, usize) -> DVec3,
)
where AabbPoint: Locate<T> { ... }
}Expand description
A trait for arranging operations.
Provided Methods§
Sourcefn arrange_with(&mut self, pos_func: impl Fn(usize) -> DVec3)
fn arrange_with(&mut self, pos_func: impl Fn(usize) -> DVec3)
Arrange the items by a given function.
The pos_func takes index as input and output the center position.
Sourcefn arrange_in_y(&mut self, gap: f64)
fn arrange_in_y(&mut self, gap: f64)
Arrange the items in a col
Sourcefn arrange_in_grid(
&mut self,
cell_cnt: USizeVec3,
cell_size: DVec3,
gap: DVec3,
) -> &mut Self
fn arrange_in_grid( &mut self, cell_cnt: USizeVec3, cell_size: DVec3, gap: DVec3, ) -> &mut Self
Arrange the items in a grid.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.