[][src]Struct zvxryb_broadphase::LayerBuilder

pub struct LayerBuilder { /* fields omitted */ }

A builder for Layers

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]

Trait Implementations

impl Default for LayerBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.