Skip to main content

SkinnedRefit

Struct SkinnedRefit 

Source
pub struct SkinnedRefit { /* private fields */ }
Expand description

One ring slot’s refit bookkeeping: the geometry its BLAS were last built over, whether they hold a tree a refit can update, and how many consecutive refits have run since the last full build.

Implementations§

Source§

impl SkinnedRefit

Source

pub fn plan( &mut self, shapes: &[SkinnedShape], storage_changed: bool, ) -> BlasUpdate

How this frame’s skinned BLAS should be updated, recording the choice so the refit run stays bounded and the shapes so the next frame can compare. storage_changed must be set when the structures or the buffer they trace were (re)allocated this frame, which leaves no tree to refit. Call once the frame’s fallible work has passed: recording a build the backend never encodes would leave the slot claiming a tree a later refit cannot update.

Source

pub fn reset(&mut self)

Forget the tree this slot’s BLAS hold, so the next update rebuilds rather than refitting. Called when the slot stops publishing (no skinned object is visible) or its structures are otherwise invalidated.

Trait Implementations§

Source§

impl Default for SkinnedRefit

Source§

fn default() -> SkinnedRefit

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.