pub fn map<R: DeserializeOwned + Serialize, F: Fn(&T) -> R>(&self, func: F) -> CharacterMotion<R> {
    match self {
      CharacterMotion::Internal { from, to, start, end, animation } => {
        CharacterMotion::Internal { from: func(from), to: func(to), start: *start, end: *end, animation: animation.clone() }
      }

      CharacterMotion::Leave { from, start } => CharacterMotion::Leave { from: func(from), start: *start },
      CharacterMotion::Enter { to, end } => CharacterMotion::Enter { to: func(to), end: *end },
      CharacterMotion::Interaction { animation, start, end, interaction, at } => {
        CharacterMotion::Interaction { animation: animation.clone(), start: *start, end: *end, interaction: interaction.clone(), at: func(at) }
      }
      CharacterMotion::DirectedEmote { start, animation, direction, at } => {
        CharacterMotion::DirectedEmote { start: start.clone(), animation: animation.clone(), direction: direction.clone(), at: func(at) }
      }
      CharacterMotion::ConsensualEmoteInitiator { start, animation, at } => {
        CharacterMotion::ConsensualEmoteInitiator { start: start.clone(), animation: animation.clone(), at: func(at) }
      }
      CharacterMotion::ConsensualEmoteRecipient { start, animation, at } => {
        CharacterMotion::ConsensualEmoteRecipient { start: start.clone(), animation: animation.clone(), at: func(at) }
      }
    }
  }
/// Create a new character motion in a different coordinate system
Create a new character motion in a different coordinate system
Create a new character motion in a different coordinate system
pub fn map<R: DeserializeOwned + Serialize, F: Fn(&T) -> R>(&self, func: F) -> CharacterMotion<R> {
    match self {
      CharacterMotion::Internal { from, to, start, end, animation } => {
        CharacterMotion::Internal { from: func(from), to: func(to), start: *start, end: *end, animation: animation.clone() }
      }
      CharacterMotion::Leave { from, start } => CharacterMotion::Leave { from: func(from), start: *start },
      CharacterMotion::Enter { to, end } => CharacterMotion::Enter { to: func(to), end: *end },
      CharacterMotion::Interaction { animation, start, end, interaction, at } => {
        CharacterMotion::Interaction { animation: animation.clone(), start: *start, end: *end, interaction: interaction.clone(), at: func(at) }
      }
      CharacterMotion::DirectedEmote { start, animation, direction, at } => {
        CharacterMotion::DirectedEmote { start: start.clone(), animation: animation.clone(), direction: direction.clone(), at: func(at) }
      }
      CharacterMotion::ConsensualEmoteInitiator { start, animation, at } => {
        CharacterMotion::ConsensualEmoteInitiator { start: start.clone(), animation: animation.clone(), at: func(at) }
      }
      CharacterMotion::ConsensualEmoteRecipient { start, animation, at } => {
        CharacterMotion::ConsensualEmoteRecipient { start: start.clone(), animation: animation.clone(), at: func(at) }
      }
    }
  }
pub fn map < R : DeserializeOwned + Serialize , F : Fn ( & T ) -> R > ( & self , func : F ) -> CharacterMotion < R > { match self { CharacterMotion :: Internal { from , to , start , end , animation } => { CharacterMotion :: Internal { from : func ( from ) , to : func ( to ) , start : * start , end : * end , animation : animation . clone ( ) } } CharacterMotion :: Leave { from , start } => CharacterMotion :: Leave { from : func ( from ) , start : * start } , CharacterMotion :: Enter { to , end } => CharacterMotion :: Enter { to : func ( to ) , end : * end } , CharacterMotion :: Interaction { animation , start , end , interaction , at } => { CharacterMotion :: Interaction { animation : animation . clone ( ) , start : * start , end : * end , interaction : interaction . clone ( ) , at : func ( at ) } } CharacterMotion :: DirectedEmote { start , animation , direction , at } => { CharacterMotion :: DirectedEmote { start : start . clone ( ) , animation : animation . clone ( ) , direction : direction . clone ( ) , at : func ( at ) } } CharacterMotion :: ConsensualEmoteInitiator { start , animation , at } => { CharacterMotion :: ConsensualEmoteInitiator { start : start . clone ( ) , animation : animation . clone ( ) , at : func ( at ) } } CharacterMotion :: ConsensualEmoteRecipient { start , animation , at } => { CharacterMotion :: ConsensualEmoteRecipient { start : start . clone ( ) , animation : animation . clone ( ) , at : func ( at ) } } } }
Create a new character motion in a different coordinate system
Create a new character motion in a different coordinate system
&self
func
F
&self
func
F