pub struct Skeleton {
pub bones: Vec<ObjectRef>,
pub bone_inverses: Vec<Matrix4>,
pub bone_matrices: Vec<f32>,
pub frame: i64,
}Expand description
class Skeleton.
Fields§
§bones: Vec<ObjectRef>Skeleton.bones.
bone_inverses: Vec<Matrix4>Skeleton.boneInverses.
bone_matrices: Vec<f32>Skeleton.boneMatrices — new Float32Array( bones.length * 16 ),
filled by Skeleton::update.
frame: i64Skeleton.frame, the renderer’s “did the texture change” counter.
Implementations§
Source§impl Skeleton
impl Skeleton
Sourcepub fn new(bones: Vec<ObjectRef>, bone_inverses: Option<Vec<Matrix4>>) -> Self
pub fn new(bones: Vec<ObjectRef>, bone_inverses: Option<Vec<Matrix4>>) -> Self
new Skeleton( bones, boneInverses ). None for the inverses is
three.js’ boneInverses === undefined branch, which calls
calculateInverses().
Sourcepub fn calculate_inverses(&mut self)
pub fn calculate_inverses(&mut self)
Skeleton.calculateInverses().
Sourcepub fn update(&mut self)
pub fn update(&mut self)
Skeleton.update() — flatten boneMatrix = boneWorld * boneInverse
into boneMatrices.
Sourcepub fn get_bone_by_name(&self, name: &str) -> Option<ObjectRef>
pub fn get_bone_by_name(&self, name: &str) -> Option<ObjectRef>
Skeleton.getBoneByName( name ).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Skeleton
impl !Send for Skeleton
impl !Sync for Skeleton
impl !UnwindSafe for Skeleton
impl Freeze for Skeleton
impl Unpin for Skeleton
impl UnsafeUnpin for Skeleton
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