private TMOFile InvertTmo(TMOFile tmo) { TMOFile output = tmo.Dup(); foreach (TMONode node in tmo.nodes) { output.FindNodeByName(node.Name).Rotation = Quaternion.Invert(node.Rotation); } return(output); }
private TMOFile MultiTmo(TMOFile tmo1, TMOFile tmo2) { TMOFile output = tmo1.Dup(); foreach (TMONode node in tmo1.nodes) { output.FindNodeByName(node.Name).Rotation = node.Rotation * tmo2.FindNodeByName(node.Name).Rotation; } return(output); }
private TMOFile DiffWorldTmo(TMOFile tmo1, TMOFile tmo2) { TMOFile output = tmo1.Dup(); foreach (TMONode node in tmo1.nodes) { output.FindNodeByName(node.Name).Rotation = Quaternion.Invert(tmo2.FindNodeByName(node.Name).GetWorldRotation()) * node.GetWorldRotation(); } return(output); }