From 7d89e122930be39e84a6d174548fa2d12ac0484a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 6 Sep 2008 07:52:41 +0000 Subject: * This is the fabled LibOMV update with all of the libOMV types from JHurliman * This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke. --- .../SceneObjectGroupDiff.cs | 28 ++++++++++------------ 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs') diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs index 38938c6..ba937f5 100644 --- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs +++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs @@ -37,7 +37,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Drawing; -using libsecondlife; +using OpenMetaverse; using Nini.Config; @@ -48,8 +48,6 @@ using OpenSim.Region.Physics.Manager; using log4net; -using Axiom.Math; - namespace OpenSim.Region.Environment.Modules.ContentManagement { #region Enumerations @@ -99,14 +97,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #region Private Methods - private static bool AreQuaternionsEquivalent(LLQuaternion first, LLQuaternion second) + private static bool AreQuaternionsEquivalent(Quaternion first, Quaternion second) { - LLVector3 firstVector = llRot2Euler(first); - LLVector3 secondVector = llRot2Euler(second); + Vector3 firstVector = llRot2Euler(first); + Vector3 secondVector = llRot2Euler(second); return AreVectorsEquivalent(firstVector, secondVector); } - private static bool AreVectorsEquivalent(LLVector3 first, LLVector3 second) + private static bool AreVectorsEquivalent(Vector3 first, Vector3 second) { if(TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2) && TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2) @@ -133,21 +131,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs // Also changed the original function from LSL_Types to LL types - private static LLVector3 llRot2Euler(LLQuaternion r) + private static Vector3 llRot2Euler(Quaternion r) { - LLQuaternion t = new LLQuaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.W * r.W); + Quaternion t = new Quaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.W * r.W); double m = (t.X + t.Y + t.Z + t.W); - if (m == 0) return new LLVector3(); + if (m == 0) return new Vector3(); double n = 2 * (r.Y * r.W + r.X * r.Z); double p = m * m - n * n; if (p > 0) - return new LLVector3((float)NormalizeAngle(Math.Atan2(2.0 * (r.X * r.W - r.Y * r.Z), (-t.X - t.Y + t.Z + t.W))), + return new Vector3((float)NormalizeAngle(Math.Atan2(2.0 * (r.X * r.W - r.Y * r.Z), (-t.X - t.Y + t.Z + t.W))), (float)NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))), (float)NormalizeAngle(Math.Atan2(2.0 * (r.Z * r.W - r.X * r.Y), (t.X - t.Y - t.Z + t.W)))); else if (n > 0) - return new LLVector3(0.0f, (float)(Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z))); + return new Vector3(0.0f, (float)(Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z))); else - return new LLVector3(0.0f, (float)(-Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z))); + return new Vector3(0.0f, (float)(-Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z))); } #endregion Private Methods @@ -187,7 +185,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement result |= Diff.ROTATIONOFFSET; - // MISC COMPARISONS (LLUUID, Byte) + // MISC COMPARISONS (UUID, Byte) if(first.ClickAction != second.ClickAction) result |= Diff.CLICKACTION; if(first.ObjectOwner != second.ObjectOwner) @@ -217,4 +215,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement #endregion Public Methods } -} \ No newline at end of file +} -- cgit v1.1