diff options
author | Matt Ebb <matt@mke3.net> | 2010-01-25 09:24:05 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-01-25 09:24:05 +0300 |
commit | 0c5998e7998cba70d1dceacc5ed8109a5bba9e23 (patch) | |
tree | f9e250055d9de1647b283e7c493902bc51f0a9a5 /source/gameengine | |
parent | c94f385fce14fa5beb8637590ad4d4662cd733c6 (diff) |
Radians -> Degrees (in UI)
Rotations are now stored internally as radians, while exposing degrees in the UI -
in the graph editor and UI controls. This is done in two areas:
1) Using the unit system to convert RNA data to display as degrees in the UI controls
2) FCurves now use degrees for rotation, so you can edit in the graph editor what
you see in the UI.
All rotation data is consistently accessible in DNA and RNA as radians, degrees are only
used for the UI controls and graph editor.
This commit includes conversions will convert old files (stored data and also fcurve data)
to the new units, hopefully everything should go smoothly!
Part of this also changes a few properties that were hard-coded as degrees before (such
as IK pole angle and brush texture rotation) to also use the same consistent system of
radians (dna/rna) and degrees (ui).
Thanks to Joshua for hints and review here too.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index a54c229593f..1d95ef13ca8 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -2584,13 +2584,11 @@ void BL_ConvertBlenderObjects(struct Main* maggie, if (gameobj->GetPhysicsController()) { - float radsPerDeg = 6.283185307179586232f / 360.f; - PHY_IPhysicsController* physctrl = (PHY_IPhysicsController*) gameobj->GetPhysicsController()->GetUserData(); //we need to pass a full constraint frame, not just axis //localConstraintFrameBasis - MT_Matrix3x3 localCFrame(MT_Vector3(radsPerDeg*dat->axX,radsPerDeg*dat->axY,radsPerDeg*dat->axZ)); + MT_Matrix3x3 localCFrame(MT_Vector3(dat->axX,dat->axY,dat->axZ)); MT_Vector3 axis0 = localCFrame.getColumn(0); MT_Vector3 axis1 = localCFrame.getColumn(1); MT_Vector3 axis2 = localCFrame.getColumn(2); |