• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

コミットメタ情報

リビジョン7352fc1de016b99580e3fcb378f1f3ce4b08e467 (tree)
日時2013-11-09 04:07:01
作者HMML <hmml3939@gmai...>
コミッターHMML

ログメッセージ

Change eular rot axis and invert direction.

変更サマリ

差分

--- a/MMM_GraphEditor/GraphPort.Designer.cs
+++ b/MMM_GraphEditor/GraphPort.Designer.cs
@@ -584,11 +584,11 @@ namespace MMM_GraphEditor
584584 p = Math.Atan2(rm.M31, rm.M33);
585585 y = Math.Atan2(rm.M12, rm.M22);
586586 }
587- else if (min_axis == 1) // Z-Y-X
587+ else if (min_axis == 1) // X-Y-Z
588588 {
589589 r = Math.Atan2(-rm.M32, rm.M33);
590- p = Math.Asin(rm.M31);
591- y = Math.Atan2(-rm.M21, rm.M11);
590+ p = -Math.Asin(rm.M13);
591+ y = Math.Atan2(rm.M12, rm.M11);
592592 }
593593 else // X-Z-Y
594594 {
@@ -596,7 +596,7 @@ namespace MMM_GraphEditor
596596 p = Math.Atan2(-rm.M13, rm.M11);
597597 y = Math.Asin(rm.M12);
598598 }
599- return new Vector3((float)r, (float)p, (float)y);
599+ return new Vector3((float)-r, (float)-p, (float)-y);
600600 }
601601
602602 private Matrix Quaternion2RotMatrix(Quaternion q)
@@ -633,7 +633,7 @@ namespace MMM_GraphEditor
633633 case 0:
634634 return "Z-X-Y";
635635 case 1:
636- return "Z-Y-X";
636+ return "X-Y-Z";
637637 case 2:
638638 return "X-Z-Y";
639639 }
--- a/MMM_GraphEditor/GraphPort.cs
+++ b/MMM_GraphEditor/GraphPort.cs
@@ -204,7 +204,7 @@ namespace MMM_GraphEditor
204204 if (is_rot_modified)
205205 {
206206 float angle = (rot_val_from_graph_Y(key_move_start_pos.Y) - rot_val_from_graph_Y(e.Location.Y));
207- rot = Quaternion.Multiply(key_move_orig_rot, Quaternion.Normalize(Quaternion.RotationAxis(rot_axis, angle)));
207+ rot = Quaternion.Multiply(key_move_orig_rot, Quaternion.Invert(Quaternion.Normalize(Quaternion.RotationAxis(rot_axis, angle))));
208208 }
209209
210210 MotionFrameData mfd = new MotionFrameData(o_mfd.FrameNumber, pos, rot);