pub struct AnimationData {
pub skin_data: FastHashMap<SkinIndex, PerSkinData>,
pub animation_skin_usage: FastHashMap<AnimationIndex, Vec<SkinIndex>>,
}
Expand description
Caches animation data necessary to run pose_animation_frame
.
Fields§
§skin_data: FastHashMap<SkinIndex, PerSkinData>
For each skin, stores several cached data structures that speed up the animation loop at runtime.
animation_skin_usage: FastHashMap<AnimationIndex, Vec<SkinIndex>>
For each animation, stores the list of skins it affects. An animation affects a skin if it deforms any of its joints. This is used to avoid iterating unaffected skins when playing an animation.
Implementations§
Source§impl AnimationData
impl AnimationData
Sourcepub fn from_gltf_scene(
scene: &LoadedGltfScene,
instance: &GltfSceneInstance,
) -> Self
pub fn from_gltf_scene( scene: &LoadedGltfScene, instance: &GltfSceneInstance, ) -> Self
Creates an AnimationData
from a loaded gltf scene and instance.
Note that the instance is necessary, as one AnimationData
must exist
per each instance of the same scene.
§Parameters
- scene: The loaded scene, as returned by
load_gltf
orload_gltf_data
- instance: An instance of
scene
, as returned byload_gltf
orinstance_loaded_scene
Auto Trait Implementations§
impl Freeze for AnimationData
impl RefUnwindSafe for AnimationData
impl Send for AnimationData
impl Sync for AnimationData
impl Unpin for AnimationData
impl UnwindSafe for AnimationData
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
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>
Converts
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>
Converts
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 more