pub struct Motion {
pub annotations: HashMap<String, String>,
pub target_model_name: String,
pub accessory_keyframes: MotionTrack<MotionAccessoryKeyframe>,
pub camera_keyframes: MotionTrack<MotionCameraKeyframe>,
pub light_keyframes: MotionTrack<MotionLightKeyframe>,
pub model_keyframes: MotionTrack<MotionModelKeyframe>,
pub self_shadow_keyframes: MotionTrack<MotionSelfShadowKeyframe>,
pub local_bone_motion_track_bundle: MotionTrackBundle<MotionBoneKeyframe>,
pub local_morph_motion_track_bundle: MotionTrackBundle<MotionMorphKeyframe>,
pub global_motion_track_bundle: MotionTrackBundle<()>,
pub typ: MotionFormatType,
pub preferred_fps: f32,
}Fields§
§annotations: HashMap<String, String>§target_model_name: String§accessory_keyframes: MotionTrack<MotionAccessoryKeyframe>§camera_keyframes: MotionTrack<MotionCameraKeyframe>§light_keyframes: MotionTrack<MotionLightKeyframe>§model_keyframes: MotionTrack<MotionModelKeyframe>§self_shadow_keyframes: MotionTrack<MotionSelfShadowKeyframe>§local_bone_motion_track_bundle: MotionTrackBundle<MotionBoneKeyframe>§local_morph_motion_track_bundle: MotionTrackBundle<MotionMorphKeyframe>§global_motion_track_bundle: MotionTrackBundle<()>§typ: MotionFormatType§preferred_fps: f32Implementations§
Source§impl Motion
impl Motion
pub fn empty() -> Self
pub fn load_from_buffer( buffer: &mut Buffer<'_>, offset: u32, ) -> Result<Self, NanoemError>
pub fn save_to_buffer( &self, buffer: &mut MutableBuffer, ) -> Result<(), NanoemError>
Source§impl Motion
impl Motion
pub fn get_format_type(&self) -> MotionFormatType
pub fn get_target_model_name(&self) -> &String
pub fn max_frame_index(&self) -> u32
pub fn get_annotation(&self, key: &str) -> Option<&String>
pub fn get_all_accessory_keyframe_objects( &self, ) -> impl Iterator<Item = &MotionAccessoryKeyframe>
pub fn get_all_bone_keyframe_objects( &self, ) -> impl Iterator<Item = (&MotionBoneKeyframe, String)>
pub fn get_all_camera_keyframe_objects( &self, ) -> impl Iterator<Item = &MotionCameraKeyframe>
pub fn get_all_light_keyframe_objects( &self, ) -> impl Iterator<Item = &MotionLightKeyframe>
pub fn get_all_motion_keyframe_objects( &self, ) -> impl Iterator<Item = &MotionModelKeyframe>
pub fn get_all_morph_keyframe_objects( &self, ) -> impl Iterator<Item = (&MotionMorphKeyframe, String)>
pub fn get_all_self_shadow_keyframe_objects( &self, ) -> impl Iterator<Item = &MotionSelfShadowKeyframe>
pub fn extract_bone_track_keyframes( &self, name: &str, ) -> Option<impl Iterator<Item = &MotionBoneKeyframe>>
pub fn extract_morph_track_keyframes( &self, name: &str, ) -> Option<impl Iterator<Item = &MotionMorphKeyframe>>
pub fn find_accessory_keyframe_object( &self, index: u32, ) -> Option<&MotionAccessoryKeyframe>
pub fn find_bone_keyframe_object( &self, name: &str, index: u32, ) -> Option<&MotionBoneKeyframe>
pub fn find_camera_keyframe_object( &self, frame_index: u32, ) -> Option<&MotionCameraKeyframe>
pub fn remove_camera_keyframe_object( &mut self, frame_index: u32, ) -> Option<MotionCameraKeyframe>
pub fn find_light_keyframe_object( &self, frame_index: u32, ) -> Option<&MotionLightKeyframe>
pub fn remove_light_keyframe_object( &mut self, frame_index: u32, ) -> Option<MotionLightKeyframe>
pub fn find_model_keyframe_object( &self, frame_index: u32, ) -> Option<&MotionModelKeyframe>
pub fn remove_model_keyframe_object( &mut self, frame_index: u32, ) -> Option<MotionModelKeyframe>
pub fn find_morph_keyframe_object( &self, name: &str, index: u32, ) -> Option<&MotionMorphKeyframe>
pub fn find_self_shadow_keyframe_object( &self, frame_index: u32, ) -> Option<&MotionSelfShadowKeyframe>
pub fn remove_self_shadow_keyframe_object( &mut self, frame_index: u32, ) -> Option<MotionSelfShadowKeyframe>
pub fn search_closest_accessory_keyframes( &self, base_index: u32, ) -> (Option<&MotionAccessoryKeyframe>, Option<&MotionAccessoryKeyframe>)
pub fn search_closest_camera_keyframes( &self, base_index: u32, ) -> (Option<&MotionCameraKeyframe>, Option<&MotionCameraKeyframe>)
pub fn search_closest_light_keyframes( &self, base_index: u32, ) -> (Option<&MotionLightKeyframe>, Option<&MotionLightKeyframe>)
pub fn search_closest_model_keyframes( &self, base_index: u32, ) -> (Option<&MotionModelKeyframe>, Option<&MotionModelKeyframe>)
pub fn search_closest_self_shadow_model_keyframes( &self, base_index: u32, ) -> (Option<&MotionSelfShadowKeyframe>, Option<&MotionSelfShadowKeyframe>)
pub fn search_closest_bone_keyframes( &self, track_name: &str, frame_index: u32, ) -> (Option<&MotionBoneKeyframe>, Option<&MotionBoneKeyframe>)
pub fn search_closest_morph_keyframes( &self, track_name: &str, frame_index: u32, ) -> (Option<&MotionMorphKeyframe>, Option<&MotionMorphKeyframe>)
pub fn add_accessory_keyframe( &mut self, keyframe: MotionAccessoryKeyframe, ) -> Option<MotionAccessoryKeyframe>
pub fn add_camera_keyframe( &mut self, keyframe: MotionCameraKeyframe, ) -> Option<MotionCameraKeyframe>
pub fn add_light_keyframe( &mut self, keyframe: MotionLightKeyframe, ) -> Option<MotionLightKeyframe>
pub fn add_model_keyframe( &mut self, keyframe: MotionModelKeyframe, ) -> Option<MotionModelKeyframe>
pub fn add_self_shadow_keyframe( &mut self, keyframe: MotionSelfShadowKeyframe, ) -> Option<MotionSelfShadowKeyframe>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Motion
impl RefUnwindSafe for Motion
impl Send for Motion
impl Sync for Motion
impl Unpin for Motion
impl UnwindSafe for Motion
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