aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorJeff Ames2008-08-18 00:39:10 +0000
committerJeff Ames2008-08-18 00:39:10 +0000
commit6ef9d4da901a346c232458317cca6268da888e2e (patch)
treedd1d935b10f34f261839da9f9879c02322e8ede7 /OpenSim/Region/Physics
parentUpdate svn properties, minor formatting cleanup. (diff)
downloadopensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.zip
opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.gz
opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.bz2
opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.xz
Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs2
-rw-r--r--OpenSim/Region/Physics/Manager/IMesher.cs1
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs2
-rw-r--r--OpenSim/Region/Physics/Meshing/Extruder.cs26
-rw-r--r--OpenSim/Region/Physics/Meshing/HelperTypes.cs2
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs12
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMesh.cs12
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODETestClass.cs6
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs164
9 files changed, 107 insertions, 120 deletions
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
index 213f1d4..3bf0956 100644
--- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
+++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin
70 public BasicScene() 70 public BasicScene()
71 { 71 {
72 } 72 }
73 73
74 public override void Initialise(IMesher meshmerizer, IConfigSource config) 74 public override void Initialise(IMesher meshmerizer, IConfigSource config)
75 { 75 {
76 // Does nothing right now 76 // Does nothing right now
diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs
index 48e4ba6..0042c40 100644
--- a/OpenSim/Region/Physics/Manager/IMesher.cs
+++ b/OpenSim/Region/Physics/Manager/IMesher.cs
@@ -48,6 +48,5 @@ namespace OpenSim.Region.Physics.Manager
48 int[] getIndexListAsIntLocked(); 48 int[] getIndexListAsIntLocked();
49 float[] getVertexListAsFloatLocked(); 49 float[] getVertexListAsFloatLocked();
50 void releasePinned(); 50 void releasePinned();
51
52 } 51 }
53} 52}
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index beca4da..d4af271 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -209,10 +209,8 @@ namespace OpenSim.Region.Physics.Manager
209 public override bool Stopped 209 public override bool Stopped
210 { 210 {
211 get{ return false; } 211 get{ return false; }
212
213 } 212 }
214 213
215
216 public override PhysicsVector Position 214 public override PhysicsVector Position
217 { 215 {
218 get { return PhysicsVector.Zero; } 216 get { return PhysicsVector.Zero; }
diff --git a/OpenSim/Region/Physics/Meshing/Extruder.cs b/OpenSim/Region/Physics/Meshing/Extruder.cs
index b14deeb..0c94669 100644
--- a/OpenSim/Region/Physics/Meshing/Extruder.cs
+++ b/OpenSim/Region/Physics/Meshing/Extruder.cs
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Physics.Meshing
286 // It's not quite clear what pushY (Y top shear) does, but subtracting it from the start and end 286 // It's not quite clear what pushY (Y top shear) does, but subtracting it from the start and end
287 // angles appears to approximate it's effects on path cut. Likewise, adding it to the angle used 287 // angles appears to approximate it's effects on path cut. Likewise, adding it to the angle used
288 // to calculate the sine for generating the path radius appears to approximate it's effects there 288 // to calculate the sine for generating the path radius appears to approximate it's effects there
289 // too, but there are some subtle differences in the radius which are noticeable as the prim size 289 // too, but there are some subtle differences in the radius which are noticeable as the prim size
290 // increases and it may affect megaprims quite a bit. The effect of the Y top shear parameter on 290 // increases and it may affect megaprims quite a bit. The effect of the Y top shear parameter on
291 // the meshes generated with this technique appear nearly identical in shape to the same prims when 291 // the meshes generated with this technique appear nearly identical in shape to the same prims when
292 // displayed by the viewer. 292 // displayed by the viewer.
@@ -369,28 +369,26 @@ namespace OpenSim.Region.Physics.Meshing
369 float yOffset; 369 float yOffset;
370 float zOffset; 370 float zOffset;
371 371
372
373 xOffset = 0.5f * (skewStart + totalSkew * (float)percentOfPath); 372 xOffset = 0.5f * (skewStart + totalSkew * (float)percentOfPath);
374 xOffset += (float) System.Math.Sin(angle) * pushX * 0.45f; 373 xOffset += (float) System.Math.Sin(angle) * pushX * 0.45f;
375 yOffset = (float)(System.Math.Cos(angle) * (0.5f - yPathScale)) * radiusScale; 374 yOffset = (float)(System.Math.Cos(angle) * (0.5f - yPathScale)) * radiusScale;
376 zOffset = (float)(System.Math.Sin(angle + pushY * 0.9f) * (0.5f - yPathScale)) * radiusScale; 375 zOffset = (float)(System.Math.Sin(angle + pushY * 0.9f) * (0.5f - yPathScale)) * radiusScale;
377 376
378 377 // next apply twist rotation to the profile layer
379 // next apply twist rotation to the profile layer 378 if (twistTotal != 0.0f || twistBot != 0.0f)
380 if (twistTotal != 0.0f || twistBot != 0.0f) 379 {
380 Quaternion profileRot = new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist);
381 foreach (Vertex v in newLayer.vertices)
381 { 382 {
382 Quaternion profileRot = new Quaternion(new Vertex(0.0f, 0.0f, 1.0f), twist); 383 if (v != null)
383 foreach (Vertex v in newLayer.vertices)
384 { 384 {
385 if (v != null) 385 vTemp = v * profileRot;
386 { 386 v.X = vTemp.X;
387 vTemp = v * profileRot; 387 v.Y = vTemp.Y;
388 v.X = vTemp.X; 388 v.Z = vTemp.Z;
389 v.Y = vTemp.Y;
390 v.Z = vTemp.Z;
391 }
392 } 389 }
393 } 390 }
391 }
394 392
395 // now orient the rotation of the profile layer relative to it's position on the path 393 // now orient the rotation of the profile layer relative to it's position on the path
396 // adding pushY to the angle used to generate the quat appears to approximate the viewer 394 // adding pushY to the angle used to generate the quat appears to approximate the viewer
diff --git a/OpenSim/Region/Physics/Meshing/HelperTypes.cs b/OpenSim/Region/Physics/Meshing/HelperTypes.cs
index 816b6bb..2cb8d04 100644
--- a/OpenSim/Region/Physics/Meshing/HelperTypes.cs
+++ b/OpenSim/Region/Physics/Meshing/HelperTypes.cs
@@ -118,7 +118,7 @@ public class Vertex : PhysicsVector, IComparable<Vertex>
118 { 118 {
119 return new Vertex(Y * v.Z - Z * v.Y, Z * v.X - X * v.Z, X * v.Y - Y * v.X); 119 return new Vertex(Y * v.Z - Z * v.Y, Z * v.X - X * v.Z, X * v.Y - Y * v.X);
120 } 120 }
121 121
122 // disable warning: mono compiler moans about overloading 122 // disable warning: mono compiler moans about overloading
123 // operators hiding base operator but should not according to C# 123 // operators hiding base operator but should not according to C#
124 // language spec 124 // language spec
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index f041aec..a038dc2 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -941,7 +941,7 @@ namespace OpenSim.Region.Physics.Meshing
941 extr.twistBot = (float)primShape.PathTwistBegin * (float)Math.PI * 0.01f; 941 extr.twistBot = (float)primShape.PathTwistBegin * (float)Math.PI * 0.01f;
942 extr.pathBegin = primShape.PathBegin; 942 extr.pathBegin = primShape.PathBegin;
943 extr.pathEnd = primShape.PathEnd; 943 extr.pathEnd = primShape.PathEnd;
944 944
945 //System.Console.WriteLine("[MESH]: twistTop = " + twistTop.ToString() + "|" + extr.twistTop.ToString() + ", twistMid = " + twistMid.ToString() + "|" + extr.twistMid.ToString() + ", twistbot = " + twistBot.ToString() + "|" + extr.twistBot.ToString()); 945 //System.Console.WriteLine("[MESH]: twistTop = " + twistTop.ToString() + "|" + extr.twistTop.ToString() + ", twistMid = " + twistMid.ToString() + "|" + extr.twistMid.ToString() + ", twistbot = " + twistBot.ToString() + "|" + extr.twistBot.ToString());
946 //Mesh result = extr.Extrude(m); 946 //Mesh result = extr.Extrude(m);
947 Mesh result = extr.ExtrudeLinearPath(m); 947 Mesh result = extr.ExtrudeLinearPath(m);
@@ -1340,7 +1340,7 @@ namespace OpenSim.Region.Physics.Meshing
1340 } 1340 }
1341 1341
1342 /// <summary> 1342 /// <summary>
1343 /// Creates a mesh for prim types torus, ring, tube, and sphere 1343 /// Creates a mesh for prim types torus, ring, tube, and sphere
1344 /// </summary> 1344 /// </summary>
1345 /// <param name="primName"></param> 1345 /// <param name="primName"></param>
1346 /// <param name="primShape"></param> 1346 /// <param name="primShape"></param>
@@ -1655,7 +1655,7 @@ namespace OpenSim.Region.Physics.Meshing
1655 1655
1656 // Vertex vTemp = new Vertex(0.0f, 0.0f, 0.0f); 1656 // Vertex vTemp = new Vertex(0.0f, 0.0f, 0.0f);
1657 1657
1658 1658
1659 float skew = primShape.PathSkew * 0.01f; 1659 float skew = primShape.PathSkew * 0.01f;
1660 float pathScaleX = (float)(200 - primShape.PathScaleX) * 0.01f; 1660 float pathScaleX = (float)(200 - primShape.PathScaleX) * 0.01f;
1661 float pathScaleY = (float)(200 - primShape.PathScaleY) * 0.01f; 1661 float pathScaleY = (float)(200 - primShape.PathScaleY) * 0.01f;
@@ -1700,7 +1700,7 @@ namespace OpenSim.Region.Physics.Meshing
1700 //System.Console.WriteLine("primShape.PathTaperX: " + primShape.PathTaperX.ToString()); 1700 //System.Console.WriteLine("primShape.PathTaperX: " + primShape.PathTaperX.ToString());
1701 //System.Console.WriteLine("primShape.PathTaperY: " + primShape.PathTaperY.ToString()); 1701 //System.Console.WriteLine("primShape.PathTaperY: " + primShape.PathTaperY.ToString());
1702 1702
1703 1703
1704 //System.Console.WriteLine("primShape.PathRadiusOffset: " + primShape.PathRadiusOffset.ToString()); 1704 //System.Console.WriteLine("primShape.PathRadiusOffset: " + primShape.PathRadiusOffset.ToString());
1705#endif 1705#endif
1706 1706
@@ -1875,7 +1875,7 @@ namespace OpenSim.Region.Physics.Meshing
1875 1875
1876 if (primShape.SculptEntry && primShape.SculptType != (byte)0 && primShape.SculptData.Length > 0) 1876 if (primShape.SculptEntry && primShape.SculptType != (byte)0 && primShape.SculptData.Length > 0)
1877 { 1877 {
1878 1878
1879 SculptMesh smesh = CreateSculptMesh(primName, primShape, size, lod); 1879 SculptMesh smesh = CreateSculptMesh(primName, primShape, size, lod);
1880 mesh = (Mesh)smesh; 1880 mesh = (Mesh)smesh;
1881 CalcNormals(mesh); 1881 CalcNormals(mesh);
@@ -1967,7 +1967,7 @@ namespace OpenSim.Region.Physics.Meshing
1967 float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f; 1967 float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f;
1968 float pathBegin = (float)primShape.PathBegin * 2.0e-5f; 1968 float pathBegin = (float)primShape.PathBegin * 2.0e-5f;
1969 float pathEnd = 1.0f - (float)primShape.PathEnd * 2.0e-5f; 1969 float pathEnd = 1.0f - (float)primShape.PathEnd * 2.0e-5f;
1970 1970
1971 float profileBegin = (float)primShape.ProfileBegin * 2.0e-5f; 1971 float profileBegin = (float)primShape.ProfileBegin * 2.0e-5f;
1972 float profileEnd = 1.0f - (float)primShape.ProfileEnd * 2.0e-5f; 1972 float profileEnd = 1.0f - (float)primShape.ProfileEnd * 2.0e-5f;
1973 1973
diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
index 95a244d..1c3153a 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
@@ -52,7 +52,7 @@ namespace OpenSim.Region.Physics.Meshing
52 { 52 {
53 if (_lod == 2f || _lod == 4f || _lod == 8f || _lod == 16f || _lod == 32f || _lod == 64f) 53 if (_lod == 2f || _lod == 4f || _lod == 8f || _lod == 16f || _lod == 32f || _lod == 64f)
54 lod = (int)_lod; 54 lod = (int)_lod;
55 55
56 try 56 try
57 { 57 {
58 idata = OpenJPEG.DecodeToImage(jpegData); 58 idata = OpenJPEG.DecodeToImage(jpegData);
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Physics.Meshing
81 } 81 }
82 } 82 }
83 83
84 84
85 } 85 }
86 private Vertex ColorToVertex(Color input) 86 private Vertex ColorToVertex(Color input)
87 { 87 {
@@ -225,7 +225,7 @@ namespace OpenSim.Region.Physics.Meshing
225 // Create a vertex position from the RGB channels in the current pixel 225 // Create a vertex position from the RGB channels in the current pixel
226 // int ypos = y * bLOD.Width; 226 // int ypos = y * bLOD.Width;
227 227
228 228
229 if (y == 0) 229 if (y == 0)
230 { 230 {
231 v1 = northpole; 231 v1 = northpole;
@@ -291,7 +291,7 @@ namespace OpenSim.Region.Physics.Meshing
291 Add(tri2); 291 Add(tri2);
292 } 292 }
293 } 293 }
294 294
295 } 295 }
296 //Vertex vt31 = sVertices[(y * x_max + x)]; 296 //Vertex vt31 = sVertices[(y * x_max + x)];
297 //Vertex vt32 = sVertices[(y * x_max + 0)]; 297 //Vertex vt32 = sVertices[(y * x_max + 0)];
@@ -311,7 +311,7 @@ namespace OpenSim.Region.Physics.Meshing
311 //Add(tri3); 311 //Add(tri3);
312 // } 312 // }
313 //} 313 //}
314 314
315 //Vertex vt41 = sVertices[(y * x_max + x)]; 315 //Vertex vt41 = sVertices[(y * x_max + x)];
316 //Vertex vt42 = sVertices[((y + 1) * x_max + 0)]; 316 //Vertex vt42 = sVertices[((y + 1) * x_max + 0)];
317 //Vertex vt43 = sVertices[((y + 1) * x_max + x)]; 317 //Vertex vt43 = sVertices[((y + 1) * x_max + x)];
@@ -329,7 +329,7 @@ namespace OpenSim.Region.Physics.Meshing
329 //Add(tri4); 329 //Add(tri4);
330 //} 330 //}
331 //} 331 //}
332 332
333 } 333 }
334 } 334 }
335 } 335 }
diff --git a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs
index bc2ad69..074170a 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODETestClass.cs
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Physics.OdePlugin
40 private OdePlugin cbt; 40 private OdePlugin cbt;
41 private PhysicsScene ps; 41 private PhysicsScene ps;
42 private IMeshingPlugin imp; 42 private IMeshingPlugin imp;
43 43
44 [SetUp] 44 [SetUp]
45 public void Initialize() 45 public void Initialize()
46 { 46 {
@@ -96,11 +96,11 @@ namespace OpenSim.Region.Physics.OdePlugin
96 96
97 Assert.That(!oprim.m_taintadd); 97 Assert.That(!oprim.m_taintadd);
98 Console.WriteLine("Prim Position (" + oprim.m_localID + "): " + prim.Position.ToString()); 98 Console.WriteLine("Prim Position (" + oprim.m_localID + "): " + prim.Position.ToString());
99 99
100 // Make sure we're above the ground 100 // Make sure we're above the ground
101 //Assert.That(prim.Position.Z > 20f); 101 //Assert.That(prim.Position.Z > 20f);
102 //Console.WriteLine("PrimCollisionScore (" + oprim.m_localID + "): " + oprim.m_collisionscore); 102 //Console.WriteLine("PrimCollisionScore (" + oprim.m_localID + "): " + oprim.m_collisionscore);
103 103
104 // Make sure we've got a Body 104 // Make sure we've got a Body
105 Assert.That(oprim.Body != (IntPtr)0); 105 Assert.That(oprim.Body != (IntPtr)0);
106 //Console.WriteLine( 106 //Console.WriteLine(
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 3f8aa26..f285911 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -252,7 +252,6 @@ namespace OpenSim.Region.Physics.OdePlugin
252 public int physics_logging_interval = 0; 252 public int physics_logging_interval = 0;
253 public bool physics_logging_append_existing_logfile = false; 253 public bool physics_logging_append_existing_logfile = false;
254 254
255
256 /// <summary> 255 /// <summary>
257 /// Initiailizes the scene 256 /// Initiailizes the scene
258 /// Sets many properties that ODE requires to be stable 257 /// Sets many properties that ODE requires to be stable
@@ -352,14 +351,13 @@ namespace OpenSim.Region.Physics.OdePlugin
352 351
353 geomDefaultDensity = physicsconfig.GetFloat("geometry_default_density", 10.000006836f); 352 geomDefaultDensity = physicsconfig.GetFloat("geometry_default_density", 10.000006836f);
354 bodyFramesAutoDisable = physicsconfig.GetInt("body_frames_auto_disable", 20); 353 bodyFramesAutoDisable = physicsconfig.GetInt("body_frames_auto_disable", 20);
355 354
356 bodyPIDD = physicsconfig.GetFloat("body_pid_derivative", 35f); 355 bodyPIDD = physicsconfig.GetFloat("body_pid_derivative", 35f);
357 bodyPIDG = physicsconfig.GetFloat("body_pid_gain", 25f); 356 bodyPIDG = physicsconfig.GetFloat("body_pid_gain", 25f);
358 357
359 meshSculptedPrim = physicsconfig.GetBoolean("mesh_sculpted_prim", true); 358 meshSculptedPrim = physicsconfig.GetBoolean("mesh_sculpted_prim", true);
360 meshSculptLOD = physicsconfig.GetFloat("mesh_lod", 32f); 359 meshSculptLOD = physicsconfig.GetFloat("mesh_lod", 32f);
361 MeshSculptphysicalLOD = physicsconfig.GetFloat("mesh_physical_lod", 16f); 360 MeshSculptphysicalLOD = physicsconfig.GetFloat("mesh_physical_lod", 16f);
362
363 361
364 if (Environment.OSVersion.Platform == PlatformID.Unix) 362 if (Environment.OSVersion.Platform == PlatformID.Unix)
365 { 363 {
@@ -367,7 +365,6 @@ namespace OpenSim.Region.Physics.OdePlugin
367 avPIDP = physicsconfig.GetFloat("av_pid_proportional_linux", 1400.0f); 365 avPIDP = physicsconfig.GetFloat("av_pid_proportional_linux", 1400.0f);
368 avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_linux", 2000000f); 366 avStandupTensor = physicsconfig.GetFloat("av_capsule_standup_tensor_linux", 2000000f);
369 bodyMotorJointMaxforceTensor = physicsconfig.GetFloat("body_motor_joint_maxforce_tensor_linux", 2f); 367 bodyMotorJointMaxforceTensor = physicsconfig.GetFloat("body_motor_joint_maxforce_tensor_linux", 2f);
370
371 } 368 }
372 else 369 else
373 { 370 {
@@ -547,7 +544,6 @@ namespace OpenSim.Region.Physics.OdePlugin
547 } 544 }
548 catch (AccessViolationException) 545 catch (AccessViolationException)
549 { 546 {
550
551 m_log.Warn("[PHYSICS]: Unable to collide test an object"); 547 m_log.Warn("[PHYSICS]: Unable to collide test an object");
552 return; 548 return;
553 } 549 }
@@ -603,7 +599,6 @@ namespace OpenSim.Region.Physics.OdePlugin
603 p2.CollidingGround = true; 599 p2.CollidingGround = true;
604 break; 600 break;
605 } 601 }
606
607 602
608 // we don't want prim or avatar to explode 603 // we don't want prim or avatar to explode
609 604
@@ -850,87 +845,87 @@ namespace OpenSim.Region.Physics.OdePlugin
850 case ActorTypes.Agent: 845 case ActorTypes.Agent:
851 cc2 = (OdeCharacter)p2; 846 cc2 = (OdeCharacter)p2;
852 847
853 // obj1LocalID = cc2.m_localID; 848 // obj1LocalID = cc2.m_localID;
854 switch ((ActorTypes)p1.PhysicsActorType) 849 switch ((ActorTypes)p1.PhysicsActorType)
855 { 850 {
856 case ActorTypes.Agent: 851 case ActorTypes.Agent:
857 cc1 = (OdeCharacter)p1; 852 cc1 = (OdeCharacter)p1;
858 obj2LocalID = cc1.m_localID; 853 obj2LocalID = cc1.m_localID;
859 cc1.AddCollisionEvent(cc2.m_localID, collisiondepth); 854 cc1.AddCollisionEvent(cc2.m_localID, collisiondepth);
860 //ctype = (int)CollisionCategories.Character; 855 //ctype = (int)CollisionCategories.Character;
861 856
862 //if (cc1.CollidingObj) 857 //if (cc1.CollidingObj)
863 //cStartStop = (int)StatusIndicators.Generic; 858 //cStartStop = (int)StatusIndicators.Generic;
864 //else 859 //else
865 //cStartStop = (int)StatusIndicators.Start; 860 //cStartStop = (int)StatusIndicators.Start;
866 861
867 //returncollisions = true; 862 //returncollisions = true;
868 break; 863 break;
869 case ActorTypes.Prim: 864 case ActorTypes.Prim:
870 cp1 = (OdePrim)p1; 865 cp1 = (OdePrim)p1;
871 obj2LocalID = cp1.m_localID; 866 obj2LocalID = cp1.m_localID;
872 cp1.AddCollisionEvent(cc2.m_localID, collisiondepth); 867 cp1.AddCollisionEvent(cc2.m_localID, collisiondepth);
873 //ctype = (int)CollisionCategories.Geom; 868 //ctype = (int)CollisionCategories.Geom;
874 869
875 //if (cp1.CollidingObj) 870 //if (cp1.CollidingObj)
876 //cStartStop = (int)StatusIndicators.Generic; 871 //cStartStop = (int)StatusIndicators.Generic;
877 //else 872 //else
878 //cStartStop = (int)StatusIndicators.Start; 873 //cStartStop = (int)StatusIndicators.Start;
879 874
880 //returncollisions = true; 875 //returncollisions = true;
881 break; 876 break;
882 877
883 case ActorTypes.Ground: 878 case ActorTypes.Ground:
884 case ActorTypes.Unknown: 879 case ActorTypes.Unknown:
885 obj2LocalID = 0; 880 obj2LocalID = 0;
886 //ctype = (int)CollisionCategories.Land; 881 //ctype = (int)CollisionCategories.Land;
887 //returncollisions = true; 882 //returncollisions = true;
888 break; 883 break;
889 } 884 }
890 885
891 cc2.AddCollisionEvent(obj2LocalID, collisiondepth); 886 cc2.AddCollisionEvent(obj2LocalID, collisiondepth);
892 break; 887 break;
893 case ActorTypes.Prim: 888 case ActorTypes.Prim:
894 cp2 = (OdePrim)p2; 889 cp2 = (OdePrim)p2;
895 890
896 // obj1LocalID = cp2.m_localID; 891 // obj1LocalID = cp2.m_localID;
897 switch ((ActorTypes)p1.PhysicsActorType) 892 switch ((ActorTypes)p1.PhysicsActorType)
898 { 893 {
899 case ActorTypes.Agent: 894 case ActorTypes.Agent:
900 cc1 = (OdeCharacter)p1; 895 cc1 = (OdeCharacter)p1;
901 obj2LocalID = cc1.m_localID; 896 obj2LocalID = cc1.m_localID;
902 cc1.AddCollisionEvent(cp2.m_localID, collisiondepth); 897 cc1.AddCollisionEvent(cp2.m_localID, collisiondepth);
903 //ctype = (int)CollisionCategories.Character; 898 //ctype = (int)CollisionCategories.Character;
904 899
905 //if (cc1.CollidingObj) 900 //if (cc1.CollidingObj)
906 //cStartStop = (int)StatusIndicators.Generic; 901 //cStartStop = (int)StatusIndicators.Generic;
907 //else 902 //else
908 //cStartStop = (int)StatusIndicators.Start; 903 //cStartStop = (int)StatusIndicators.Start;
909 //returncollisions = true; 904 //returncollisions = true;
910 905
911 break; 906 break;
912 case ActorTypes.Prim: 907 case ActorTypes.Prim:
913 cp1 = (OdePrim)p1; 908 cp1 = (OdePrim)p1;
914 obj2LocalID = cp1.m_localID; 909 obj2LocalID = cp1.m_localID;
915 cp1.AddCollisionEvent(cp2.m_localID, collisiondepth); 910 cp1.AddCollisionEvent(cp2.m_localID, collisiondepth);
916 //ctype = (int)CollisionCategories.Geom; 911 //ctype = (int)CollisionCategories.Geom;
917 912
918 //if (cp1.CollidingObj) 913 //if (cp1.CollidingObj)
919 //cStartStop = (int)StatusIndicators.Generic; 914 //cStartStop = (int)StatusIndicators.Generic;
920 //else 915 //else
921 //cStartStop = (int)StatusIndicators.Start; 916 //cStartStop = (int)StatusIndicators.Start;
922 917
923 //returncollisions = true; 918 //returncollisions = true;
924 break; 919 break;
925 920
926 case ActorTypes.Ground: 921 case ActorTypes.Ground:
927 case ActorTypes.Unknown: 922 case ActorTypes.Unknown:
928 obj2LocalID = 0; 923 obj2LocalID = 0;
929 //ctype = (int)CollisionCategories.Land; 924 //ctype = (int)CollisionCategories.Land;
930 925
931 //returncollisions = true; 926 //returncollisions = true;
932 break; 927 break;
933 } 928 }
934 929
935 cp2.AddCollisionEvent(obj2LocalID, collisiondepth); 930 cp2.AddCollisionEvent(obj2LocalID, collisiondepth);
936 break; 931 break;
@@ -1015,7 +1010,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1015 /// <param name="timeStep"></param> 1010 /// <param name="timeStep"></param>
1016 private void collision_optimized(float timeStep) 1011 private void collision_optimized(float timeStep)
1017 { 1012 {
1018
1019 foreach (OdeCharacter chr in _characters) 1013 foreach (OdeCharacter chr in _characters)
1020 { 1014 {
1021 // Reset the collision values to false 1015 // Reset the collision values to false
@@ -1579,7 +1573,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1579 // if (pbs.ProfileShape == ProfileShape.EquilateralTriangle) 1573 // if (pbs.ProfileShape == ProfileShape.EquilateralTriangle)
1580 // return true; 1574 // return true;
1581 1575
1582 1576
1583 1577
1584 // return false; 1578 // return false;
1585 1579
@@ -1625,7 +1619,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1625 //m_log.Info(timeStep.ToString()); 1619 //m_log.Info(timeStep.ToString());
1626 step_time += timeStep; 1620 step_time += timeStep;
1627 1621
1628
1629 // If We're loaded down by something else, 1622 // If We're loaded down by something else,
1630 // or debugging with the Visual Studio project on pause 1623 // or debugging with the Visual Studio project on pause
1631 // skip a few frames to catch up gracefully. 1624 // skip a few frames to catch up gracefully.
@@ -1739,7 +1732,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1739 } 1732 }
1740 1733
1741 d.WorldQuickStep(world, ODE_STEPSIZE); 1734 d.WorldQuickStep(world, ODE_STEPSIZE);
1742
1743 d.JointGroupEmpty(contactgroup); 1735 d.JointGroupEmpty(contactgroup);
1744 //ode.dunlock(world); 1736 //ode.dunlock(world);
1745 } 1737 }
@@ -2075,7 +2067,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2075 if (resultarr2[y, x] <= 0) 2067 if (resultarr2[y, x] <= 0)
2076 { 2068 {
2077 returnarr[i] = 0.0000001f; 2069 returnarr[i] = 0.0000001f;
2078 2070
2079 } 2071 }
2080 else 2072 else
2081 returnarr[i] = resultarr2[y, x]; 2073 returnarr[i] = resultarr2[y, x];