From 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 3 Jul 2007 14:37:29 +0000 Subject: * Optimized usings (the 'LL ate my scripts' commit) * added some licensing info --- .../Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 -- .../Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 6 +++--- OpenSim/Region/Physics/Manager/AssemblyInfo.cs | 2 -- OpenSim/Region/Physics/Manager/PhysicsActor.cs | 12 +++++------- OpenSim/Region/Physics/Manager/PhysicsManager.cs | 8 +++----- OpenSim/Region/Physics/Manager/PhysicsScene.cs | 11 ++++------- OpenSim/Region/Physics/Manager/PhysicsVector.cs | 4 ---- OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs | 2 -- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 17 +++++++++-------- OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs | 2 -- OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | 9 +++++---- 11 files changed, 29 insertions(+), 46 deletions(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 177c49d..ce567a9 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index e3f34da..393796f 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -25,8 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; +using Axiom.MathLib; using OpenSim.Physics.Manager; namespace OpenSim.Region.Physics.BasicPhysicsPlugin @@ -250,11 +250,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - return Axiom.MathLib.Quaternion.Identity; + return Quaternion.Identity; } set { diff --git a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs index 132f64a..9415db9 100644 --- a/OpenSim/Region/Physics/Manager/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/Manager/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 502d8e6..8c286e0 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -25,15 +25,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; +using Axiom.MathLib; namespace OpenSim.Physics.Manager { public delegate void PositionUpdate(PhysicsVector position); public delegate void VelocityUpdate(PhysicsVector velocity); - public delegate void OrientationUpdate(Axiom.MathLib.Quaternion orientation); + public delegate void OrientationUpdate(Quaternion orientation); public abstract class PhysicsActor { @@ -66,7 +64,7 @@ namespace OpenSim.Physics.Manager get; } - public abstract Axiom.MathLib.Quaternion Orientation + public abstract Quaternion Orientation { get; set; @@ -115,11 +113,11 @@ namespace OpenSim.Physics.Manager } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - return Axiom.MathLib.Quaternion.Identity; + return Quaternion.Identity; } set { diff --git a/OpenSim/Region/Physics/Manager/PhysicsManager.cs b/OpenSim/Region/Physics/Manager/PhysicsManager.cs index 0e28522..265bce6 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsManager.cs @@ -27,10 +27,8 @@ */ using System; using System.Collections.Generic; -using System.Collections; using System.IO; using System.Reflection; -using Axiom.MathLib; using OpenSim.Framework.Console; namespace OpenSim.Physics.Manager @@ -56,19 +54,19 @@ namespace OpenSim.Physics.Manager if(_plugins.ContainsKey(engineName)) { - OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW,"creating "+engineName); + MainLog.Instance.WriteLine(LogPriority.LOW,"creating "+engineName); return _plugins[engineName].GetScene(); } else { - OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName); + MainLog.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName); throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}",engineName)); } } public void LoadPlugins() { - string path = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory ,"Physics"); + string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory ,"Physics"); string[] pluginFiles = Directory.GetFiles(path, "*.dll"); diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 3f22585..d44da00 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs @@ -25,9 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; using OpenSim.Framework.Console; namespace OpenSim.Physics.Manager @@ -67,7 +64,7 @@ namespace OpenSim.Physics.Manager public override PhysicsActor AddAvatar(PhysicsVector position) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position); + MainLog.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position); return PhysicsActor.Null; } @@ -78,7 +75,7 @@ namespace OpenSim.Physics.Manager public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size); + MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size); return PhysicsActor.Null; } @@ -91,12 +88,12 @@ namespace OpenSim.Physics.Manager public override void GetResults() { - OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : GetResults()"); + MainLog.Instance.Verbose("NullPhysicsScene : GetResults()"); } public override void SetTerrain(float[] heightMap) { - OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); + MainLog.Instance.Verbose("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); } public override void DeleteTerrain() diff --git a/OpenSim/Region/Physics/Manager/PhysicsVector.cs b/OpenSim/Region/Physics/Manager/PhysicsVector.cs index c60da9d..e75f29b 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsVector.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsVector.cs @@ -25,10 +25,6 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - namespace OpenSim.Physics.Manager { public class PhysicsVector diff --git a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs index b49c8da..ee10430 100644 --- a/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/OdePlugin/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 8aca851..b85c052 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -27,8 +27,9 @@ */ using System; using System.Collections.Generic; -using OpenSim.Physics.Manager; +using Axiom.MathLib; using Ode.NET; +using OpenSim.Physics.Manager; namespace OpenSim.Region.Physics.OdePlugin { @@ -194,13 +195,13 @@ namespace OpenSim.Region.Physics.OdePlugin LandGeom = d.CreateHeightfield(space, HeightmapData, 1); d.Matrix3 R = new d.Matrix3(); - Axiom.MathLib.Quaternion q1 =Axiom.MathLib.Quaternion.FromAngleAxis(1.5707f, new Axiom.MathLib.Vector3(1,0,0)); - Axiom.MathLib.Quaternion q2 =Axiom.MathLib.Quaternion.FromAngleAxis(1.5707f, new Axiom.MathLib.Vector3(0,1,0)); + Quaternion q1 =Quaternion.FromAngleAxis(1.5707f, new Vector3(1,0,0)); + Quaternion q2 =Quaternion.FromAngleAxis(1.5707f, new Vector3(0,1,0)); //Axiom.MathLib.Quaternion q3 = Axiom.MathLib.Quaternion.FromAngleAxis(3.14f, new Axiom.MathLib.Vector3(0, 0, 1)); q1 = q1 * q2; //q1 = q1 * q3; - Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3(); + Vector3 v3 = new Vector3(); float angle = 0; q1.ToAngleAxis(ref angle, ref v3); @@ -287,11 +288,11 @@ namespace OpenSim.Region.Physics.OdePlugin } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - return Axiom.MathLib.Quaternion.Identity; + return Quaternion.Identity; } set { @@ -414,11 +415,11 @@ namespace OpenSim.Region.Physics.OdePlugin } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - Axiom.MathLib.Quaternion res = new Axiom.MathLib.Quaternion(); + Quaternion res = new Quaternion(); return res; } set diff --git a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs index b49c8da..ee10430 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs index 8bf794b..a75e5c7 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using OpenSim.Physics.Manager; using PhysXWrapper; +using Quaternion=Axiom.MathLib.Quaternion; namespace OpenSim.Region.Physics.PhysXPlugin { @@ -240,11 +241,11 @@ namespace OpenSim.Region.Physics.PhysXPlugin } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - return Axiom.MathLib.Quaternion.Identity; + return Quaternion.Identity; } set { @@ -377,11 +378,11 @@ namespace OpenSim.Region.Physics.PhysXPlugin } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - Axiom.MathLib.Quaternion res = new Axiom.MathLib.Quaternion(); + Quaternion res = new Quaternion(); PhysXWrapper.Quaternion quat = this._prim.GetOrientation(); res.w = quat.W; res.x = quat.X; -- cgit v1.1