aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
authorAdam Frisby2008-04-21 07:09:17 +0000
committerAdam Frisby2008-04-21 07:09:17 +0000
commitfef3b3689492dea63693c964bcdbec9f5137eb5e (patch)
tree7791eef001d85d3e1de863a68f26ff9434d062ca /OpenSim/Region/Physics/OdePlugin
parent* Terrain Module code has been reformatted to comply with guidelines. (diff)
downloadopensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.zip
opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.gz
opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.bz2
opensim-SC_OLD-fef3b3689492dea63693c964bcdbec9f5137eb5e.tar.xz
* Optimised using statements and namespace references across entire project (this took a while to run).
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs6
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs21
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODETestClass.cs7
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs16
4 files changed, 25 insertions, 25 deletions
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
121 _acceleration = new PhysicsVector(); 121 _acceleration = new PhysicsVector();
122 _parent_scene = parent_scene; 122 _parent_scene = parent_scene;
123 123
124 if (System.Environment.OSVersion.Platform == PlatformID.Unix) 124 if (Environment.OSVersion.Platform == PlatformID.Unix)
125 { 125 {
126 m_tensor = 2000000f; 126 m_tensor = 2000000f;
127 } 127 }
@@ -413,7 +413,7 @@ namespace OpenSim.Region.Physics.OdePlugin
413 private void AvatarGeomAndBodyCreation(float npositionX, float npositionY, float npositionZ, float tensor) 413 private void AvatarGeomAndBodyCreation(float npositionX, float npositionY, float npositionZ, float tensor)
414 { 414 {
415 415
416 if (System.Environment.OSVersion.Platform == PlatformID.Unix) 416 if (Environment.OSVersion.Platform == PlatformID.Unix)
417 { 417 {
418 m_tensor = 2000000f; 418 m_tensor = 2000000f;
419 } 419 }
@@ -641,7 +641,7 @@ namespace OpenSim.Region.Physics.OdePlugin
641 641
642 // If the PID Controller isn't active then we set our force 642 // If the PID Controller isn't active then we set our force
643 // calculating base velocity to the current position 643 // calculating base velocity to the current position
644 if (System.Environment.OSVersion.Platform == PlatformID.Unix) 644 if (Environment.OSVersion.Platform == PlatformID.Unix)
645 { 645 {
646 PID_D = 3200.0f; 646 PID_D = 3200.0f;
647 PID_P = 1400.0f; 647 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 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection;
30using System.Runtime.InteropServices; 31using System.Runtime.InteropServices;
32using System.Threading;
31using Axiom.Math; 33using Axiom.Math;
34using log4net;
32using Ode.NET; 35using Ode.NET;
33using OpenSim.Framework; 36using OpenSim.Framework;
34using OpenSim.Region.Physics.Manager; 37using OpenSim.Region.Physics.Manager;
@@ -37,7 +40,7 @@ namespace OpenSim.Region.Physics.OdePlugin
37{ 40{
38 public class OdePrim : PhysicsActor 41 public class OdePrim : PhysicsActor
39 { 42 {
40 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 43 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
41 44
42 public PhysicsVector _position; 45 public PhysicsVector _position;
43 private PhysicsVector _velocity; 46 private PhysicsVector _velocity;
@@ -663,7 +666,7 @@ namespace OpenSim.Region.Physics.OdePlugin
663 // This sleeper is there to moderate how long it takes between 666 // This sleeper is there to moderate how long it takes between
664 // setting up the mesh and pre-processing it when we get rapid fire mesh requests on a single object 667 // setting up the mesh and pre-processing it when we get rapid fire mesh requests on a single object
665 668
666 System.Threading.Thread.Sleep(10); 669 Thread.Sleep(10);
667 670
668 //Kill Body so that mesh can re-make the geom 671 //Kill Body so that mesh can re-make the geom
669 if (IsPhysical && Body != (IntPtr) 0) 672 if (IsPhysical && Body != (IntPtr) 0)
@@ -692,7 +695,7 @@ namespace OpenSim.Region.Physics.OdePlugin
692 SetGeom(d.CreateTriMesh(m_targetSpace, _triMeshData, parent_scene.triCallback, null, null)); 695 SetGeom(d.CreateTriMesh(m_targetSpace, _triMeshData, parent_scene.triCallback, null, null));
693 } 696 }
694 } 697 }
695 catch (System.AccessViolationException) 698 catch (AccessViolationException)
696 { 699 {
697 700
698 m_log.Error("[PHYSICS]: MESH LOCKED"); 701 m_log.Error("[PHYSICS]: MESH LOCKED");
@@ -934,7 +937,7 @@ namespace OpenSim.Region.Physics.OdePlugin
934 { 937 {
935 SetGeom(d.CreateSphere(m_targetSpace, _size.X / 2)); 938 SetGeom(d.CreateSphere(m_targetSpace, _size.X / 2));
936 } 939 }
937 catch (System.AccessViolationException) 940 catch (AccessViolationException)
938 { 941 {
939 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); 942 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object");
940 ode.dunlock(_parent_scene.world); 943 ode.dunlock(_parent_scene.world);
@@ -948,7 +951,7 @@ namespace OpenSim.Region.Physics.OdePlugin
948 { 951 {
949 SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); 952 SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z));
950 } 953 }
951 catch (System.AccessViolationException) 954 catch (AccessViolationException)
952 { 955 {
953 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); 956 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object");
954 ode.dunlock(_parent_scene.world); 957 ode.dunlock(_parent_scene.world);
@@ -963,7 +966,7 @@ namespace OpenSim.Region.Physics.OdePlugin
963 { 966 {
964 SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); 967 SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z));
965 } 968 }
966 catch (System.AccessViolationException) 969 catch (AccessViolationException)
967 { 970 {
968 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); 971 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object");
969 ode.dunlock(_parent_scene.world); 972 ode.dunlock(_parent_scene.world);
@@ -990,7 +993,7 @@ namespace OpenSim.Region.Physics.OdePlugin
990 { 993 {
991 SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z)); 994 SetGeom(d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z));
992 } 995 }
993 catch (System.AccessViolationException) 996 catch (AccessViolationException)
994 { 997 {
995 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object"); 998 m_log.Warn("[PHYSICS]: Unable to create physics proxy for object");
996 ode.dunlock(_parent_scene.world); 999 ode.dunlock(_parent_scene.world);
@@ -1135,7 +1138,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1135 1138
1136 // If the PID Controller isn't active then we set our force 1139 // If the PID Controller isn't active then we set our force
1137 // calculating base velocity to the current position 1140 // calculating base velocity to the current position
1138 if (System.Environment.OSVersion.Platform == PlatformID.Unix) 1141 if (Environment.OSVersion.Platform == PlatformID.Unix)
1139 { 1142 {
1140 PID_D = 3200.0f; 1143 PID_D = 3200.0f;
1141 //PID_P = 1400.0f; 1144 //PID_P = 1400.0f;
@@ -1670,7 +1673,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1670 { 1673 {
1671 1674
1672 1675
1673 System.Threading.Thread.Sleep(20); 1676 Thread.Sleep(20);
1674 if (IsPhysical) 1677 if (IsPhysical)
1675 { 1678 {
1676 if (Body != (IntPtr)0) 1679 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 @@
26 */ 26 */
27 27
28using System; 28using System;
29using System.Collections.Generic;
30using System.Runtime.InteropServices;
31using Axiom.Math; 29using Axiom.Math;
32using Ode.NET; 30using NUnit.Framework;
33using OpenSim.Framework; 31using OpenSim.Framework;
34using OpenSim.Framework.Console;
35using OpenSim.Region.Physics.Manager; 32using OpenSim.Region.Physics.Manager;
36using NUnit.Framework;
37using NUnit.Framework.SyntaxHelpers;
38 33
39namespace OpenSim.Region.Physics.OdePlugin 34namespace OpenSim.Region.Physics.OdePlugin
40{ 35{
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 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection;
30using System.Runtime.InteropServices; 31using System.Runtime.InteropServices;
32using System.Threading;
31using Axiom.Math; 33using Axiom.Math;
34using log4net;
32using Ode.NET; 35using Ode.NET;
33using OpenSim.Framework; 36using OpenSim.Framework;
34using OpenSim.Framework.Console;
35using OpenSim.Region.Physics.Manager; 37using OpenSim.Region.Physics.Manager;
36 38
37//using OpenSim.Region.Physics.OdePlugin.Meshing; 39//using OpenSim.Region.Physics.OdePlugin.Meshing;
@@ -114,12 +116,12 @@ namespace OpenSim.Region.Physics.OdePlugin
114 116
115 public class OdeScene : PhysicsScene 117 public class OdeScene : PhysicsScene
116 { 118 {
117 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 119 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
118 private Dictionary<string, sCollisionData> m_storedCollisions = new Dictionary<string, sCollisionData>(); 120 private Dictionary<string, sCollisionData> m_storedCollisions = new Dictionary<string, sCollisionData>();
119 121
120 CollisionLocker ode; 122 CollisionLocker ode;
121 123
122 protected Random fluidRandomizer = new Random(System.Environment.TickCount); 124 protected Random fluidRandomizer = new Random(Environment.TickCount);
123 125
124 private const uint m_regionWidth = Constants.RegionSize; 126 private const uint m_regionWidth = Constants.RegionSize;
125 private const uint m_regionHeight = Constants.RegionSize; 127 private const uint m_regionHeight = Constants.RegionSize;
@@ -331,7 +333,7 @@ namespace OpenSim.Region.Physics.OdePlugin
331 { 333 {
332 d.SpaceCollide2(g1, g2, IntPtr.Zero, nearCallback); 334 d.SpaceCollide2(g1, g2, IntPtr.Zero, nearCallback);
333 } 335 }
334 catch (System.AccessViolationException) 336 catch (AccessViolationException)
335 { 337 {
336 m_log.Warn("[PHYSICS]: Unable to collide test a space"); 338 m_log.Warn("[PHYSICS]: Unable to collide test a space");
337 return; 339 return;
@@ -404,7 +406,7 @@ namespace OpenSim.Region.Physics.OdePlugin
404 ode.drelease(world); 406 ode.drelease(world);
405 base.TriggerPhysicsBasedRestart(); 407 base.TriggerPhysicsBasedRestart();
406 } 408 }
407 catch (System.AccessViolationException) 409 catch (AccessViolationException)
408 { 410 {
409 411
410 m_log.Warn("[PHYSICS]: Unable to collide test an object"); 412 m_log.Warn("[PHYSICS]: Unable to collide test an object");
@@ -1166,7 +1168,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1166 } 1168 }
1167 1169
1168 } 1170 }
1169 catch (System.AccessViolationException) 1171 catch (AccessViolationException)
1170 { 1172 {
1171 m_log.Info("[PHYSICS]: Couldn't remove prim from physics scene, it was already be removed."); 1173 m_log.Info("[PHYSICS]: Couldn't remove prim from physics scene, it was already be removed.");
1172 } 1174 }
@@ -1243,7 +1245,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1243 // never be called if the prim is physical(active) 1245 // never be called if the prim is physical(active)
1244 1246
1245 // All physical prim end up in the root space 1247 // All physical prim end up in the root space
1246 System.Threading.Thread.Sleep(20); 1248 Thread.Sleep(20);
1247 if (currentspace != space) 1249 if (currentspace != space)
1248 { 1250 {
1249 //m_log.Info("[SPACE]: C:" + currentspace.ToString() + " g:" + geom.ToString()); 1251 //m_log.Info("[SPACE]: C:" + currentspace.ToString() + " g:" + geom.ToString());