From fef3b3689492dea63693c964bcdbec9f5137eb5e Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Mon, 21 Apr 2008 07:09:17 +0000 Subject: * Optimised using statements and namespace references across entire project (this took a while to run). --- OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 6 +++--- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 21 ++++++++++++--------- OpenSim/Region/Physics/OdePlugin/ODETestClass.cs | 7 +------ OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 16 +++++++++------- 4 files changed, 25 insertions(+), 25 deletions(-) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 81126b6..042042c 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -121,7 +121,7 @@ namespace OpenSim.Region.Physics.OdePlugin _acceleration = new PhysicsVector(); _parent_scene = parent_scene; - if (System.Environment.OSVersion.Platform == PlatformID.Unix) + if (Environment.OSVersion.Platform == PlatformID.Unix) { m_tensor = 2000000f; } @@ -413,7 +413,7 @@ namespace OpenSim.Region.Physics.OdePlugin private void AvatarGeomAndBodyCreation(float npositionX, float npositionY, float npositionZ, float tensor) { - if (System.Environment.OSVersion.Platform == PlatformID.Unix) + if (Environment.OSVersion.Platform == PlatformID.Unix) { m_tensor = 2000000f; } @@ -641,7 +641,7 @@ namespace OpenSim.Region.Physics.OdePlugin // If the PID Controller isn't active then we set our force // calculating base velocity to the current position - if (System.Environment.OSVersion.Platform == PlatformID.Unix) + if (Environment.OSVersion.Platform == PlatformID.Unix) { PID_D = 3200.0f; PID_P = 1400.0f; diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 4e39eb4..8e0640b 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -27,8 +27,11 @@ using System; using System.Collections.Generic; +using System.Reflection; using System.Runtime.InteropServices; +using System.Threading; using Axiom.Math; +using log4net; using Ode.NET; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; @@ -37,7 +40,7 @@ namespace OpenSim.Region.Physics.OdePlugin { public class OdePrim : PhysicsActor { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); public PhysicsVector _position; private PhysicsVector _velocity; @@ -663,7 +666,7 @@ namespace OpenSim.Region.Physics.OdePlugin // This sleeper is there to moderate how long it takes between // setting up the mesh and pre-processing it when we get rapid fire mesh requests on a single object - System.Threading.Thread.Sleep(10); + Thread.Sleep(10); //Kill Body so that mesh can re-make the geom if (IsPhysical && Body != (IntPtr) 0) @@ -692,7 +695,7 @@ namespace OpenSim.Region.Physics.OdePlugin SetGeom(d.CreateTriMesh(m_targetSpace, _triMeshData, parent_scene.triCallback, null, null)); } } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Error("[PHYSICS]: MESH LOCKED"); @@ -934,7 +937,7 @@ namespace OpenSim.Region.Physics.OdePlugin { SetGeom(d.CreateSphere(m_targetSpace, _size.X / 2)); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); ode.dunlock(_parent_scene.world); @@ -948,7 +951,7 @@ namespace OpenSim.Region.Physics.OdePlugin { SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); ode.dunlock(_parent_scene.world); @@ -963,7 +966,7 @@ namespace OpenSim.Region.Physics.OdePlugin { SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); ode.dunlock(_parent_scene.world); @@ -990,7 +993,7 @@ namespace OpenSim.Region.Physics.OdePlugin { SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); ode.dunlock(_parent_scene.world); @@ -1135,7 +1138,7 @@ namespace OpenSim.Region.Physics.OdePlugin // If the PID Controller isn't active then we set our force // calculating base velocity to the current position - if (System.Environment.OSVersion.Platform == PlatformID.Unix) + if (Environment.OSVersion.Platform == PlatformID.Unix) { PID_D = 3200.0f; //PID_P = 1400.0f; @@ -1670,7 +1673,7 @@ namespace OpenSim.Region.Physics.OdePlugin { - System.Threading.Thread.Sleep(20); + Thread.Sleep(20); if (IsPhysical) { if (Body != (IntPtr)0) diff --git a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs index f56cf5c..94d98cb 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs @@ -26,15 +26,10 @@ */ using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; using Axiom.Math; -using Ode.NET; +using NUnit.Framework; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Physics.Manager; -using NUnit.Framework; -using NUnit.Framework.SyntaxHelpers; namespace OpenSim.Region.Physics.OdePlugin { diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index a2f440e..c346960 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -27,11 +27,13 @@ using System; using System.Collections.Generic; +using System.Reflection; using System.Runtime.InteropServices; +using System.Threading; using Axiom.Math; +using log4net; using Ode.NET; using OpenSim.Framework; -using OpenSim.Framework.Console; using OpenSim.Region.Physics.Manager; //using OpenSim.Region.Physics.OdePlugin.Meshing; @@ -114,12 +116,12 @@ namespace OpenSim.Region.Physics.OdePlugin public class OdeScene : PhysicsScene { - private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Dictionary m_storedCollisions = new Dictionary(); CollisionLocker ode; - protected Random fluidRandomizer = new Random(System.Environment.TickCount); + protected Random fluidRandomizer = new Random(Environment.TickCount); private const uint m_regionWidth = Constants.RegionSize; private const uint m_regionHeight = Constants.RegionSize; @@ -331,7 +333,7 @@ namespace OpenSim.Region.Physics.OdePlugin { d.SpaceCollide2(g1, g2, IntPtr.Zero, nearCallback); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to collide test a space"); return; @@ -404,7 +406,7 @@ namespace OpenSim.Region.Physics.OdePlugin ode.drelease(world); base.TriggerPhysicsBasedRestart(); } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Warn("[PHYSICS]: Unable to collide test an object"); @@ -1166,7 +1168,7 @@ namespace OpenSim.Region.Physics.OdePlugin } } - catch (System.AccessViolationException) + catch (AccessViolationException) { m_log.Info("[PHYSICS]: Couldn't remove prim from physics scene, it was already be removed."); } @@ -1243,7 +1245,7 @@ namespace OpenSim.Region.Physics.OdePlugin // never be called if the prim is physical(active) // All physical prim end up in the root space - System.Threading.Thread.Sleep(20); + Thread.Sleep(20); if (currentspace != space) { //m_log.Info("[SPACE]: C:" + currentspace.ToString() + " g:" + geom.ToString()); -- cgit v1.1