Struct kdtree_ray::BuilderConfig
source · pub struct BuilderConfig { /* private fields */ }
Expand description
Configuration for the builder.
Implementations§
source§impl BuilderConfig
impl BuilderConfig
sourcepub fn new(
cost_traversal: f32,
cost_intersection: f32,
empty_cut_bonus: f32
) -> Self
pub fn new( cost_traversal: f32, cost_intersection: f32, empty_cut_bonus: f32 ) -> Self
Create a new BuilderConfig
given the cost of a traversal, the cost of an intersection
test and the bonus for cutting an empty space.
Panics
- If
cost_traversal
is not strictly positive. - If
cost_intersection
is not strictly positive. - If
empty_cut_bonus
is not between0.
and1.
.
sourcepub fn cost_traversal(&self) -> f32
pub fn cost_traversal(&self) -> f32
Retrieve the cost of a traversal.
sourcepub fn cost_intersection(&self) -> f32
pub fn cost_intersection(&self) -> f32
Retrieve the cost of an intersection.
sourcepub fn empty_cut_bonus(&self) -> f32
pub fn empty_cut_bonus(&self) -> f32
Retrieve the bonus for cutting an empty space.
Trait Implementations§
source§impl Clone for BuilderConfig
impl Clone for BuilderConfig
source§fn clone(&self) -> BuilderConfig
fn clone(&self) -> BuilderConfig
Returns a copy 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 BuilderConfig
impl Debug for BuilderConfig
source§impl Default for BuilderConfig
impl Default for BuilderConfig
impl Copy for BuilderConfig
Auto Trait Implementations§
impl RefUnwindSafe for BuilderConfig
impl Send for BuilderConfig
impl Sync for BuilderConfig
impl Unpin for BuilderConfig
impl UnwindSafe for BuilderConfig
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