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_traversalis not strictly positive. - If
cost_intersectionis not strictly positive. - If
empty_cut_bonusis 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 more