pub struct Blend {
pub starts: Vec<u32>,
pub weights: Vec<f32>,
pub bones: Vec<u32>,
}Expand description
Bone influences per vertex, as a mesh stores them: vertex v’s weights and bone slots are
weights[starts[v]..starts[v + 1]] and bones[..], heaviest first.
Fields§
§starts: Vec<u32>Where each vertex’s influences start in weights and bones: one entry more than there are vertices, the
last the total.
weights: Vec<f32>The influences’ weights, vertex after vertex.
bones: Vec<u32>The influences’ bone slots, parallel to weights.
Implementations§
Source§impl Blend
impl Blend
Sourcepub fn from_padded(
influences: usize,
weights: &[[f32; 4]],
bones: &[[u32; 4]],
) -> Blend
pub fn from_padded( influences: usize, weights: &[[f32; 4]], bones: &[[u32; 4]], ) -> Blend
influences (at most four) to a vertex from lists padded to four with zero weights.
Sourcepub fn vertex(&self, v: usize) -> Option<(&[f32], &[u32])>
pub fn vertex(&self, v: usize) -> Option<(&[f32], &[u32])>
Vertex v’s weights and bone slots; None when v is not a vertex of the blend or its range is not inside
the lists.
Sourcepub fn max_influences(&self) -> usize
pub fn max_influences(&self) -> usize
The most influences any vertex has.
Trait Implementations§
impl StructuralPartialEq for Blend
Auto Trait Implementations§
impl Freeze for Blend
impl RefUnwindSafe for Blend
impl Send for Blend
impl Sync for Blend
impl Unpin for Blend
impl UnsafeUnpin for Blend
impl UnwindSafe for Blend
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