* Optimised using statements and namespace references across entire project (this took a while to run).

This commit is contained in:
Adam Frisby
2008-04-21 07:09:17 +00:00
parent 05e24c8f58
commit fef3b36894
306 changed files with 1011 additions and 1306 deletions

View File

@@ -31,12 +31,10 @@ using System;
using System.Collections.Generic;
using MonoXnaCompactMaths;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Region.Physics.Manager;
using XnaDevRu.BulletX;
using XnaDevRu.BulletX.Dynamics;
using AxiomQuaternion = Axiom.Math.Quaternion;
using BoxShape=XnaDevRu.BulletX.BoxShape;
#endregion

View File

@@ -27,7 +27,6 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace OpenSim.Region.Physics.Manager
{

View File

@@ -29,7 +29,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using OpenSim.Framework.Console;
using log4net;
namespace OpenSim.Region.Physics.Manager
{
@@ -38,7 +38,7 @@ namespace OpenSim.Region.Physics.Manager
/// </summary>
public class PhysicsPluginManager
{
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<string, IPhysicsPlugin> _PhysPlugins = new Dictionary<string, IPhysicsPlugin>();
private Dictionary<string, IMeshingPlugin> _MeshPlugins = new Dictionary<string, IMeshingPlugin>();

View File

@@ -25,10 +25,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
using System;
using System.Reflection;
using Axiom.Math;
using log4net;
using OpenSim.Framework;
using OpenSim.Framework.Console;
namespace OpenSim.Region.Physics.Manager
{
@@ -36,7 +36,7 @@ namespace OpenSim.Region.Physics.Manager
public abstract class 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);
// The only thing that should register for this event is the InnerScene
// Anything else could cause problems.

View File

@@ -26,10 +26,7 @@
*/
using System;
using System.Collections.Generic;
using System.Timers;
using Axiom.Math;
using OpenSim.Framework;
namespace OpenSim.Region.Physics.Manager
{

View File

@@ -28,7 +28,6 @@
using System;
using System.Collections.Generic;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Region.Physics.Manager;
namespace OpenSim.Region.Physics.Meshing

View File

@@ -27,7 +27,6 @@
using System;
using System.Collections.Generic;
using OpenSim.Framework.Console;
using OpenSim.Region.Physics.Manager;
namespace OpenSim.Region.Physics.Meshing

View File

@@ -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;

View File

@@ -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)

View File

@@ -26,15 +26,10 @@
*/
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using Axiom.Math;
using Ode.NET;
using OpenSim.Framework;
using OpenSim.Framework.Console;
using OpenSim.Region.Physics.Manager;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using OpenSim.Framework;
using OpenSim.Region.Physics.Manager;
namespace OpenSim.Region.Physics.OdePlugin
{

View File

@@ -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<string, sCollisionData> m_storedCollisions = new Dictionary<string, sCollisionData>();
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());