pub struct SkinPalette { /* private fields */ }Expand description
Validated position + inverse-transpose normal palettes. Fixed storage avoids per-frame allocation; set() is transactional. Singular/non-affine transforms are rejected rather than sending undefined normals to the GPU.
Implementations§
Source§impl SkinPalette
impl SkinPalette
pub fn new(matrices: &[[f32; 16]]) -> Result<SkinPalette, &'static str>
pub fn set(&mut self, matrices: &[[f32; 16]]) -> Result<(), &'static str>
pub fn joint_count(&self) -> usize
pub fn matrices(&self) -> &[[f32; 16]]
Sourcepub fn transform_point(
&self,
point: Vec3,
weights: SkinWeights,
) -> Result<Vec3, &'static str>
pub fn transform_point( &self, point: Vec3, weights: SkinWeights, ) -> Result<Vec3, &'static str>
CPU reference for tooling/tests, with identical normalized influences.
Trait Implementations§
Source§impl Clone for SkinPalette
impl Clone for SkinPalette
Source§fn clone(&self) -> SkinPalette
fn clone(&self) -> SkinPalette
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for SkinPalette
impl RefUnwindSafe for SkinPalette
impl Send for SkinPalette
impl Sync for SkinPalette
impl Unpin for SkinPalette
impl UnwindSafe for SkinPalette
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