소스 검색

- use degrees for quaternion properties

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7725 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 14 년 전
부모
커밋
6fd3105fef
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/properties/QuaternionPropertyEditor.java

+ 2 - 2
jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/properties/QuaternionPropertyEditor.java

@@ -74,7 +74,7 @@ public class QuaternionPropertyEditor implements PropertyEditor {
 
     public String getAsText() {
         float[] angles=quaternion.toAngles(new float[3]);
-        return "[" + angles[0] + ", " + angles[1] + ", " + angles[2] + "]";
+        return "[" + (float)Math.toDegrees(angles[0]) + ", " + (float)Math.toDegrees(angles[1]) + ", " + (float)Math.toDegrees(angles[2]) + "]";
     }
 
     public void setAsText(String text) throws IllegalArgumentException {
@@ -87,7 +87,7 @@ public class QuaternionPropertyEditor implements PropertyEditor {
         float[] floats = new float[3];
         for (int i = 0; i < values.length; i++) {
             String string = values[i];
-            floats[i] = Float.parseFloat(string);
+            floats[i] = (float)Math.toRadians(Float.parseFloat(string));
         }
         Quaternion old=new Quaternion();
         old.set(quaternion);