pub struct ProportionLayer { /* private fields */ }Expand description
Proportion entries resolved against one skeleton, ready to apply to a local-pose buffer every frame without further lookups.
Implementations§
Source§impl ProportionLayer
impl ProportionLayer
Sourcepub fn resolve(
skeleton: &Skeleton,
proportions: &[JointProportion],
) -> ProportionLayer
pub fn resolve( skeleton: &Skeleton, proportions: &[JointProportion], ) -> ProportionLayer
Resolve proportions against skeleton by joint name. Entries naming
an unknown joint are skipped (the caller reports them); entries that
change nothing are dropped.
Sourcepub fn apply(&self, locals: &mut [[[f32; 4]; 4]])
pub fn apply(&self, locals: &mut [[[f32; 4]; 4]])
Apply the layer to locals (one local matrix per joint, as sampled
from a clip or copied from the bind pose). A joint’s scale multiplies
its local basis; its children’s local translations gain the length
offset. Entries past the end of locals are ignored.
Sourcepub fn root_scale(&self, skeleton: &Skeleton) -> f32
pub fn root_scale(&self, skeleton: &Skeleton) -> f32
Uniform scale of the skeleton’s first root joint, or 1 when no
entry changes it.
Sourcepub fn height_ratio(&self, skeleton: &Skeleton) -> f32
pub fn height_ratio(&self, skeleton: &Skeleton) -> f32
Ratio of the proportioned skeleton’s height to the bind height, both
measured as the highest joint position (model Y) in the rest pose.
1 when the bind skeleton has no height.
Trait Implementations§
Source§impl Clone for ProportionLayer
impl Clone for ProportionLayer
Source§fn clone(&self) -> ProportionLayer
fn clone(&self) -> ProportionLayer
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProportionLayer
impl Debug for ProportionLayer
Source§impl Default for ProportionLayer
impl Default for ProportionLayer
Source§fn default() -> ProportionLayer
fn default() -> ProportionLayer
Source§impl PartialEq for ProportionLayer
impl PartialEq for ProportionLayer
impl StructuralPartialEq for ProportionLayer
Auto Trait Implementations§
impl Freeze for ProportionLayer
impl RefUnwindSafe for ProportionLayer
impl Send for ProportionLayer
impl Sync for ProportionLayer
impl Unpin for ProportionLayer
impl UnsafeUnpin for ProportionLayer
impl UnwindSafe for ProportionLayer
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().