pub struct UpdatePolicy {
pub full_rebuild_fraction: f32,
pub degradation_factor: f32,
}Expand description
When update falls back to heavier strategies.
Fields§
§full_rebuild_fraction: f32Rebuild everything when more than this fraction of alive triangles is dirty (added, removed, rewritten or moved), 0 to 1.
degradation_factor: f32Rebuild a refit treelet when its SAH cost exceeds this factor times its cost when it was built. At least 1.
Implementations§
Source§impl UpdatePolicy
impl UpdatePolicy
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Checks the policy, so that it can be refused before a build or an
update starts. Bvh::set_policy checks it
again.
§Errors
BvhError::InvalidOptions when a value is out of range.
Trait Implementations§
Source§impl Clone for UpdatePolicy
impl Clone for UpdatePolicy
Source§fn clone(&self) -> UpdatePolicy
fn clone(&self) -> UpdatePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UpdatePolicy
Source§impl Debug for UpdatePolicy
impl Debug for UpdatePolicy
Source§impl Default for UpdatePolicy
impl Default for UpdatePolicy
Source§impl PartialEq for UpdatePolicy
impl PartialEq for UpdatePolicy
impl StructuralPartialEq for UpdatePolicy
Auto Trait Implementations§
impl Freeze for UpdatePolicy
impl RefUnwindSafe for UpdatePolicy
impl Send for UpdatePolicy
impl Sync for UpdatePolicy
impl Unpin for UpdatePolicy
impl UnsafeUnpin for UpdatePolicy
impl UnwindSafe for UpdatePolicy
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