[][src]Struct broccoli::build::TreePreBuilder

pub struct TreePreBuilder { /* fields omitted */ }

Using this struct the user can determine the height of a tree or the number of nodes that would exist if the tree were constructed with the specified number of elements.

Implementations

impl TreePreBuilder[src]

pub const fn new(num_elements: usize) -> TreePreBuilder[src]

Create the builder object with default values.

pub const fn with_num_elem_in_leaf(
    num_elements: usize,
    num_elem_leaf: usize
) -> TreePreBuilder
[src]

Specify a custom default nuber of elements per leaf.

pub const fn with_height(height: usize) -> TreePreBuilder[src]

Specify a custom height of the tree, ignoring the number of elements per node variable.

pub fn into_builder<T: Aabb>(self, bots: &mut [T]) -> TreeBuilder<'_, T>[src]

Create a TreeBuilder

pub const fn num_nodes(&self) -> usize[src]

Compute the number of nodes in the tree based off of the height.

pub const fn get_height(&self) -> usize[src]

Get the currently configured height.

Trait Implementations

impl Clone for TreePreBuilder[src]

impl Copy for TreePreBuilder[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> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.