diff options
author | Diva Canto | 2015-06-11 11:31:44 -0700 |
---|---|---|
committer | Diva Canto | 2015-06-11 11:31:44 -0700 |
commit | fe116b6af79af519367abd15f4fd6ef3fd886f88 (patch) | |
tree | 0ac05e60c2f7a6b555009d5169e4b0abe58c51e9 | |
parent | Restoring ICSharpCode.SharpZipLib.dll to what it was before, as it seems to h... (diff) | |
parent | SceneObjectPart.UpdateLookAt() now uses corrected libomv quaternion functions. (diff) | |
download | opensim-SC-fe116b6af79af519367abd15f4fd6ef3fd886f88.zip opensim-SC-fe116b6af79af519367abd15f4fd6ef3fd886f88.tar.gz opensim-SC-fe116b6af79af519367abd15f4fd6ef3fd886f88.tar.bz2 opensim-SC-fe116b6af79af519367abd15f4fd6ef3fd886f88.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 22 | ||||
-rwxr-xr-x | bin/OpenMetaverse.Rendering.Meshmerizer.dll | bin | 20480 -> 24576 bytes | |||
-rwxr-xr-x | bin/OpenMetaverse.StructuredData.dll | bin | 106496 -> 118784 bytes | |||
-rwxr-xr-x | bin/OpenMetaverse.dll | bin | 2244608 -> 2433024 bytes | |||
-rwxr-xr-x | bin/OpenMetaverseTypes.dll | bin | 110592 -> 122880 bytes |
5 files changed, 6 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 57ec1ae..781c20c 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -4909,25 +4909,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
4909 | 4909 | ||
4910 | Quaternion currRot = GetWorldRotation(); | 4910 | Quaternion currRot = GetWorldRotation(); |
4911 | currRot.Normalize(); | 4911 | currRot.Normalize(); |
4912 | 4912 | ||
4913 | // difference between current orientation and desired orientation | 4913 | // difference between current orientation and desired orientation |
4914 | Quaternion dR = new Quaternion(currRot.X, currRot.Y, currRot.Z, -currRot.W) * APIDTarget; | 4914 | Quaternion dR = currRot / APIDTarget; |
4915 | 4915 | ||
4916 | // find axis of rotation to rotate to desired orientation | 4916 | // find axis and angle of rotation to rotate to desired orientation |
4917 | Vector3 axis = Vector3.UnitX; | 4917 | Vector3 axis = Vector3.UnitX; |
4918 | float s = (float)Math.Sqrt(1.0f - dR.W * dR.W); | 4918 | float angle; |
4919 | if (s >= 0.001) | 4919 | dR.GetAxisAngle(out axis, out angle); |
4920 | { | 4920 | axis = axis * currRot; |
4921 | float invS = 1.0f / s; | ||
4922 | if (dR.W < 0) invS = -invS; | ||
4923 | axis = new Vector3(dR.X * invS, dR.Y * invS, dR.Z * invS) * currRot; | ||
4924 | axis.Normalize(); | ||
4925 | } | ||
4926 | |||
4927 | // angle between current and desired orientation | ||
4928 | float angle = 2.0f * (float)Math.Acos(dR.W); | ||
4929 | if (angle > Math.PI) | ||
4930 | angle = 2.0f * (float)Math.PI - angle; | ||
4931 | 4921 | ||
4932 | // clamp strength to avoid overshoot | 4922 | // clamp strength to avoid overshoot |
4933 | float strength = 1.0f / APIDStrength; | 4923 | float strength = 1.0f / APIDStrength; |
diff --git a/bin/OpenMetaverse.Rendering.Meshmerizer.dll b/bin/OpenMetaverse.Rendering.Meshmerizer.dll index 8a72dc3..328bb0b 100755 --- a/bin/OpenMetaverse.Rendering.Meshmerizer.dll +++ b/bin/OpenMetaverse.Rendering.Meshmerizer.dll | |||
Binary files differ | |||
diff --git a/bin/OpenMetaverse.StructuredData.dll b/bin/OpenMetaverse.StructuredData.dll index 39f439e..a48c62b 100755 --- a/bin/OpenMetaverse.StructuredData.dll +++ b/bin/OpenMetaverse.StructuredData.dll | |||
Binary files differ | |||
diff --git a/bin/OpenMetaverse.dll b/bin/OpenMetaverse.dll index 1f83c3a..618bc64 100755 --- a/bin/OpenMetaverse.dll +++ b/bin/OpenMetaverse.dll | |||
Binary files differ | |||
diff --git a/bin/OpenMetaverseTypes.dll b/bin/OpenMetaverseTypes.dll index ceea86b..10401f9 100755 --- a/bin/OpenMetaverseTypes.dll +++ b/bin/OpenMetaverseTypes.dll | |||
Binary files differ | |||