[−][src]Struct zvxryb_broadphase::LayerBuilder
A builder for Layer
s
Methods
impl LayerBuilder
[src]
pub fn new() -> Self
[src]
pub fn with_min_depth(&mut self, depth: u32) -> &mut Self
[src]
Set a minimum depth for index generation.
This parameter is important for parallel processing. A higher value improves the partitioning of data and improves workload balancing. However, it can also create many more indices/object than is necessary. A setting which is too high may result in an excessive number of dynamic allocations and duplication of intermediate collision pairs, ultimately hurting worst-case performance.
A value of zero is the safest performance-wise for single-threaded operations.
When using multi-threaded methods, try a value that between log4 number_of_processors (2D) or log8 number_of_processors (3D) and −log2(max_object_size/system_bounds_size)
It is generally better to set this too low than too high
pub fn with_index_capacity(&mut self, capacity: usize) -> &mut Self
[src]
Set an initial capacity for the index list.
pub fn with_collision_capacity(&mut self, capacity: usize) -> &mut Self
[src]
Set an initial capacity for the collision results list, used by Layer::scan
.
pub fn with_test_capacity(&mut self, capacity: usize) -> &mut Self
[src]
Set an initial capacity for the test results list, used by Layer::test
and Layer::pick
.
pub fn build<Index, ID>(&self) -> Layer<Index, ID> where
Index: SpatialIndex,
ID: ObjectID,
Bounds<Index::Point>: IndexGenerator<Index>,
[src]
Index: SpatialIndex,
ID: ObjectID,
Bounds<Index::Point>: IndexGenerator<Index>,
Trait Implementations
impl Default for LayerBuilder
[src]
fn default() -> LayerBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for LayerBuilder
impl Send for LayerBuilder
impl Sync for LayerBuilder
impl Unpin for LayerBuilder
impl UnwindSafe for LayerBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,