diff options
author | Jeff Ames | 2008-02-20 18:38:20 +0000 |
---|---|---|
committer | Jeff Ames | 2008-02-20 18:38:20 +0000 |
commit | a8cfbbe963529728acbab4d9936cb89af380d1ac (patch) | |
tree | 16a72fba3d15556f6702127e7cfb98aa9fb9cf81 /OpenSim/Region/Physics | |
parent | Fix exception when reading OpenSim.ini file. (diff) | |
download | opensim-SC-a8cfbbe963529728acbab4d9936cb89af380d1ac.zip opensim-SC-a8cfbbe963529728acbab4d9936cb89af380d1ac.tar.gz opensim-SC-a8cfbbe963529728acbab4d9936cb89af380d1ac.tar.bz2 opensim-SC-a8cfbbe963529728acbab4d9936cb89af380d1ac.tar.xz |
Minor cleanup.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/ZeroMesher.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Meshing/HelperTypes.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Meshing/SimpleHull.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 33 |
7 files changed, 25 insertions, 53 deletions
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index 8482e4c..180e14c 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | |||
@@ -13,7 +13,7 @@ | |||
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
81 | /// </summary> | 81 | /// </summary> |
82 | public class BulletXMaths | 82 | public class BulletXMaths |
83 | { | 83 | { |
84 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 84 | //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
85 | 85 | ||
86 | //Vector3 | 86 | //Vector3 |
87 | public static Vector3 PhysicsVectorToXnaVector3(PhysicsVector physicsVector) | 87 | public static Vector3 PhysicsVectorToXnaVector3(PhysicsVector physicsVector) |
@@ -313,10 +313,9 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
313 | 313 | ||
314 | bool needsCollision = base.NeedsCollision(bodyA, bodyB); | 314 | bool needsCollision = base.NeedsCollision(bodyA, bodyB); |
315 | 315 | ||
316 | //m_log.Debug("[BulletX]: A collision was detected between {0} and {1} --> {2}", nameA, nameB, | 316 | //m_log.DebugFormat("[BulletX]: A collision was detected between {0} and {1} --> {2}", nameA, nameB, |
317 | //needsCollision); | 317 | //needsCollision); |
318 | 318 | ||
319 | |||
320 | return needsCollision; | 319 | return needsCollision; |
321 | } | 320 | } |
322 | } | 321 | } |
diff --git a/OpenSim/Region/Physics/Manager/ZeroMesher.cs b/OpenSim/Region/Physics/Manager/ZeroMesher.cs index 7dae4ac..928a628 100644 --- a/OpenSim/Region/Physics/Manager/ZeroMesher.cs +++ b/OpenSim/Region/Physics/Manager/ZeroMesher.cs | |||
@@ -13,7 +13,7 @@ | |||
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
diff --git a/OpenSim/Region/Physics/Meshing/HelperTypes.cs b/OpenSim/Region/Physics/Meshing/HelperTypes.cs index ac06614..bcc2c37 100644 --- a/OpenSim/Region/Physics/Meshing/HelperTypes.cs +++ b/OpenSim/Region/Physics/Meshing/HelperTypes.cs | |||
@@ -13,7 +13,7 @@ | |||
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index ec13564..30fab39 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -13,7 +13,7 @@ | |||
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
53 | 53 | ||
54 | public class Meshmerizer : IMesher | 54 | public class Meshmerizer : IMesher |
55 | { | 55 | { |
56 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 56 | //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
57 | 57 | ||
58 | // Setting baseDir to a path will enable the dumping of raw files | 58 | // Setting baseDir to a path will enable the dumping of raw files |
59 | // raw files can be imported by blender so a visual inspection of the results can be done | 59 | // raw files can be imported by blender so a visual inspection of the results can be done |
@@ -530,12 +530,11 @@ namespace OpenSim.Region.Physics.Meshing | |||
530 | } | 530 | } |
531 | } | 531 | } |
532 | 532 | ||
533 | |||
534 | |||
535 | Mesh result = extr.Extrude(m); | 533 | Mesh result = extr.Extrude(m); |
536 | result.DumpRaw(baseDir, primName, "Z extruded"); | 534 | result.DumpRaw(baseDir, primName, "Z extruded"); |
537 | return result; | 535 | return result; |
538 | } | 536 | } |
537 | |||
539 | private static Mesh CreateCyllinderMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size) | 538 | private static Mesh CreateCyllinderMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size) |
540 | // Builds the z (+ and -) surfaces of a box shaped prim | 539 | // Builds the z (+ and -) surfaces of a box shaped prim |
541 | { | 540 | { |
@@ -601,7 +600,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
601 | Vertex Q1Q13 = new Vertex(-0.43f, -0.24f, 0.0f); | 600 | Vertex Q1Q13 = new Vertex(-0.43f, -0.24f, 0.0f); |
602 | Vertex Q1Q14 = new Vertex(-0.40f, -0.30f, 0.0f); | 601 | Vertex Q1Q14 = new Vertex(-0.40f, -0.30f, 0.0f); |
603 | 602 | ||
604 | |||
605 | SimpleHull outerHull = new SimpleHull(); | 603 | SimpleHull outerHull = new SimpleHull(); |
606 | //Clockwise around the quadrants | 604 | //Clockwise around the quadrants |
607 | outerHull.AddVertex(Q1Q15); | 605 | outerHull.AddVertex(Q1Q15); |
@@ -684,7 +682,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
684 | // Calculated separately to avoid errors | 682 | // Calculated separately to avoid errors |
685 | cutHull.AddVertex(legEnd); | 683 | cutHull.AddVertex(legEnd); |
686 | 684 | ||
687 | // m_log.DebugFormat("Starting cutting of the hollow shape from the prim {1}", 0, primName); | 685 | // m_log.DebugFormat("Starting cutting of the hollow shape from the prim {1}", 0, primName); |
688 | SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); | 686 | SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); |
689 | 687 | ||
690 | outerHull = cuttedHull; | 688 | outerHull = cuttedHull; |
@@ -693,7 +691,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
693 | // Deal with the hole here | 691 | // Deal with the hole here |
694 | if (hollowFactor > 0) | 692 | if (hollowFactor > 0) |
695 | { | 693 | { |
696 | |||
697 | SimpleHull holeHull = BuildHoleHull(primShape, primShape.ProfileShape, primShape.HollowShape, hollowFactor); | 694 | SimpleHull holeHull = BuildHoleHull(primShape, primShape.ProfileShape, primShape.HollowShape, hollowFactor); |
698 | if (holeHull != null) | 695 | if (holeHull != null) |
699 | { | 696 | { |
@@ -799,10 +796,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
799 | Mesh result = extr.Extrude(m); | 796 | Mesh result = extr.Extrude(m); |
800 | result.DumpRaw(baseDir, primName, "Z extruded"); | 797 | result.DumpRaw(baseDir, primName, "Z extruded"); |
801 | return result; | 798 | return result; |
802 | |||
803 | } | 799 | } |
804 | 800 | ||
805 | |||
806 | private static Mesh CreatePrismMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size) | 801 | private static Mesh CreatePrismMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size) |
807 | // Builds the z (+ and -) surfaces of a box shaped prim | 802 | // Builds the z (+ and -) surfaces of a box shaped prim |
808 | { | 803 | { |
@@ -837,7 +832,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
837 | outerHull.AddVertex(PM); | 832 | outerHull.AddVertex(PM); |
838 | outerHull.AddVertex(PP); | 833 | outerHull.AddVertex(PP); |
839 | 834 | ||
840 | |||
841 | // Deal with cuts now | 835 | // Deal with cuts now |
842 | if ((profileBegin != 0) || (profileEnd != 0)) | 836 | if ((profileBegin != 0) || (profileEnd != 0)) |
843 | { | 837 | { |
@@ -882,8 +876,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
882 | // Deal with the hole here | 876 | // Deal with the hole here |
883 | if (hollowFactor > 0) | 877 | if (hollowFactor > 0) |
884 | { | 878 | { |
885 | |||
886 | |||
887 | SimpleHull holeHull = BuildHoleHull(primShape, primShape.ProfileShape, primShape.HollowShape, hollowFactor); | 879 | SimpleHull holeHull = BuildHoleHull(primShape, primShape.ProfileShape, primShape.HollowShape, hollowFactor); |
888 | if (holeHull != null) | 880 | if (holeHull != null) |
889 | { | 881 | { |
@@ -940,7 +932,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
940 | extr.taperBotFactorX = 1.0f - ((100 - (float)taperX) / 100); | 932 | extr.taperBotFactorX = 1.0f - ((100 - (float)taperX) / 100); |
941 | //m_log.Warn("taperBotFactorX: " + extr.taperBotFactorX.ToString()); | 933 | //m_log.Warn("taperBotFactorX: " + extr.taperBotFactorX.ToString()); |
942 | } | 934 | } |
943 | |||
944 | } | 935 | } |
945 | 936 | ||
946 | if (taperY != 100) | 937 | if (taperY != 100) |
@@ -957,7 +948,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
957 | } | 948 | } |
958 | } | 949 | } |
959 | 950 | ||
960 | |||
961 | if (pathShearX != 0) | 951 | if (pathShearX != 0) |
962 | { | 952 | { |
963 | if (pathShearX > 50) | 953 | if (pathShearX > 50) |
@@ -988,8 +978,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
988 | } | 978 | } |
989 | } | 979 | } |
990 | 980 | ||
991 | |||
992 | |||
993 | Mesh result = extr.Extrude(m); | 981 | Mesh result = extr.Extrude(m); |
994 | result.DumpRaw(baseDir, primName, "Z extruded"); | 982 | result.DumpRaw(baseDir, primName, "Z extruded"); |
995 | return result; | 983 | return result; |
@@ -1090,4 +1078,4 @@ namespace OpenSim.Region.Physics.Meshing | |||
1090 | return mesh; | 1078 | return mesh; |
1091 | } | 1079 | } |
1092 | } | 1080 | } |
1093 | } \ No newline at end of file | 1081 | } |
diff --git a/OpenSim/Region/Physics/Meshing/SimpleHull.cs b/OpenSim/Region/Physics/Meshing/SimpleHull.cs index 91df98f..58b9a0e 100644 --- a/OpenSim/Region/Physics/Meshing/SimpleHull.cs +++ b/OpenSim/Region/Physics/Meshing/SimpleHull.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
42 | // is defined by the hull lies inside or outside the simplex chain | 42 | // is defined by the hull lies inside or outside the simplex chain |
43 | public class SimpleHull | 43 | public class SimpleHull |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 45 | //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private List<Vertex> vertices = new List<Vertex>(); | 47 | private List<Vertex> vertices = new List<Vertex>(); |
48 | private List<Vertex> holeVertices = new List<Vertex>(); // Only used, when the hull is hollow | 48 | private List<Vertex> holeVertices = new List<Vertex>(); // Only used, when the hull is hollow |
@@ -228,8 +228,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
228 | distToV1 = distTemp; | 228 | distToV1 = distTemp; |
229 | bestIntersectingSimplex = sTest; | 229 | bestIntersectingSimplex = sTest; |
230 | } | 230 | } |
231 | } // end if vTemp | 231 | } |
232 | } // end foreach | 232 | } |
233 | 233 | ||
234 | Intersection = bestIntersection; | 234 | Intersection = bestIntersection; |
235 | if (bestIntersectingSimplex != null) | 235 | if (bestIntersectingSimplex != null) |
@@ -308,7 +308,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
308 | //m_log.Debug("State after intersection detection for the base hull"); | 308 | //m_log.Debug("State after intersection detection for the base hull"); |
309 | //m_log.DebugFormat("The otherHull is:\n{1}", 0, otherHullClone.ToString()); | 309 | //m_log.DebugFormat("The otherHull is:\n{1}", 0, otherHullClone.ToString()); |
310 | 310 | ||
311 | |||
312 | bool otherIsInBase = baseHullClone.containsPointsFrom(otherHullClone); | 311 | bool otherIsInBase = baseHullClone.containsPointsFrom(otherHullClone); |
313 | if (!intersects && otherIsInBase) | 312 | if (!intersects && otherIsInBase) |
314 | { | 313 | { |
@@ -317,7 +316,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
317 | return baseHullClone; | 316 | return baseHullClone; |
318 | } | 317 | } |
319 | 318 | ||
320 | |||
321 | SimpleHull result = new SimpleHull(); | 319 | SimpleHull result = new SimpleHull(); |
322 | 320 | ||
323 | // Find a good starting Simplex from baseHull | 321 | // Find a good starting Simplex from baseHull |
@@ -394,4 +392,4 @@ namespace OpenSim.Region.Physics.Meshing | |||
394 | return result; | 392 | return result; |
395 | } | 393 | } |
396 | } | 394 | } |
397 | } \ No newline at end of file | 395 | } |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index c41f812..499422f 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -56,7 +56,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
56 | } | 56 | } |
57 | public class OdeCharacter : PhysicsActor | 57 | public class OdeCharacter : PhysicsActor |
58 | { | 58 | { |
59 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 59 | //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
60 | 60 | ||
61 | private PhysicsVector _position; | 61 | private PhysicsVector _position; |
62 | private d.Vector3 _zeroPosition; | 62 | private d.Vector3 _zeroPosition; |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 0cfb5ff..a8ee20d 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
44 | /// </summary> | 44 | /// </summary> |
45 | public class OdePlugin : IPhysicsPlugin | 45 | public class OdePlugin : IPhysicsPlugin |
46 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 47 | //private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
48 | 48 | ||
49 | private CollisionLocker ode; | 49 | private CollisionLocker ode; |
50 | private OdeScene _mScene; | 50 | private OdeScene _mScene; |
@@ -75,8 +75,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
75 | 75 | ||
76 | public void Dispose() | 76 | public void Dispose() |
77 | { | 77 | { |
78 | |||
79 | |||
80 | } | 78 | } |
81 | } | 79 | } |
82 | 80 | ||
@@ -324,7 +322,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
324 | 322 | ||
325 | //if (id == d.GeomClassId.TriMeshClass) | 323 | //if (id == d.GeomClassId.TriMeshClass) |
326 | //{ | 324 | //{ |
327 | // m_log.Info("near: A collision was detected between {1} and {2}", 0, name1, name2); | 325 | // m_log.InfoFormat("near: A collision was detected between {1} and {2}", 0, name1, name2); |
328 | //System.Console.WriteLine("near: A collision was detected between {1} and {2}", 0, name1, name2); | 326 | //System.Console.WriteLine("near: A collision was detected between {1} and {2}", 0, name1, name2); |
329 | //} | 327 | //} |
330 | 328 | ||
@@ -357,7 +355,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
357 | IntPtr joint; | 355 | IntPtr joint; |
358 | // If we're colliding with terrain, use 'TerrainContact' instead of contact. | 356 | // If we're colliding with terrain, use 'TerrainContact' instead of contact. |
359 | // allows us to have different settings | 357 | // allows us to have different settings |
360 | |||
361 | 358 | ||
362 | if (!actor_name_map.TryGetValue(g1, out p1)) | 359 | if (!actor_name_map.TryGetValue(g1, out p1)) |
363 | { | 360 | { |
@@ -371,7 +368,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
371 | // We only need to test p2 for 'jump crouch purposes' | 368 | // We only need to test p2 for 'jump crouch purposes' |
372 | p2.IsColliding = true; | 369 | p2.IsColliding = true; |
373 | 370 | ||
374 | |||
375 | switch (p1.PhysicsActorType) | 371 | switch (p1.PhysicsActorType) |
376 | { | 372 | { |
377 | case (int)ActorTypes.Agent: | 373 | case (int)ActorTypes.Agent: |
@@ -395,12 +391,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
395 | 391 | ||
396 | if (contacts[i].depth >= 0.08f) | 392 | if (contacts[i].depth >= 0.08f) |
397 | { | 393 | { |
398 | //This is disabled at the moment only because it needs more tweaking | 394 | //This is disabled at the moment only because it needs more tweaking |
399 | //It will eventually be uncommented | 395 | //It will eventually be uncommented |
400 | 396 | ||
401 | if (contacts[i].depth >= 1.00f) | 397 | if (contacts[i].depth >= 1.00f) |
402 | { | 398 | { |
403 | //m_log.Debug("[PHYSICS]: " +contacts[i].depth.ToString()); | 399 | //m_log.Debug("[PHYSICS]: " + contacts[i].depth.ToString()); |
404 | } | 400 | } |
405 | 401 | ||
406 | //If you interpenetrate a prim with an agent | 402 | //If you interpenetrate a prim with an agent |
@@ -769,7 +765,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
769 | // If the geometry is in the targetspace, remove it from the target space | 765 | // If the geometry is in the targetspace, remove it from the target space |
770 | //m_log.Warn(prim.m_targetSpace); | 766 | //m_log.Warn(prim.m_targetSpace); |
771 | 767 | ||
772 | |||
773 | //if (prim.m_targetSpace != (IntPtr)0) | 768 | //if (prim.m_targetSpace != (IntPtr)0) |
774 | //{ | 769 | //{ |
775 | if (d.SpaceQuery(prim.m_targetSpace, prim.prim_geom)) | 770 | if (d.SpaceQuery(prim.m_targetSpace, prim.prim_geom)) |
@@ -832,12 +827,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
832 | //} | 827 | //} |
833 | } | 828 | } |
834 | 829 | ||
835 | |||
836 | |||
837 | ode.dunlock(world); | 830 | ode.dunlock(world); |
838 | |||
839 | } | 831 | } |
840 | } | 832 | } |
833 | |||
841 | /// <summary> | 834 | /// <summary> |
842 | /// Takes a space pointer and zeros out the array we're using to hold the spaces | 835 | /// Takes a space pointer and zeros out the array we're using to hold the spaces |
843 | /// </summary> | 836 | /// </summary> |
@@ -914,7 +907,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
914 | } | 907 | } |
915 | } | 908 | } |
916 | 909 | ||
917 | |||
918 | //If there are no more geometries in the sub-space, we don't need it in the main space anymore | 910 | //If there are no more geometries in the sub-space, we don't need it in the main space anymore |
919 | if (d.SpaceGetNumGeoms(currentspace) == 0) | 911 | if (d.SpaceGetNumGeoms(currentspace) == 0) |
920 | { | 912 | { |
@@ -980,7 +972,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
980 | } | 972 | } |
981 | } | 973 | } |
982 | 974 | ||
983 | |||
984 | // The routines in the Position and Size sections do the 'inserting' into the space, | 975 | // The routines in the Position and Size sections do the 'inserting' into the space, |
985 | // so all we have to do is make sure that the space that we're putting the prim into | 976 | // so all we have to do is make sure that the space that we're putting the prim into |
986 | // is in the 'main' space. | 977 | // is in the 'main' space. |
@@ -1111,7 +1102,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1111 | name2 = "null"; | 1102 | name2 = "null"; |
1112 | } | 1103 | } |
1113 | 1104 | ||
1114 | m_log.Info("TriArrayCallback: A collision was detected between {1} and {2}", 0, name1, name2); | 1105 | m_log.InfoFormat("TriArrayCallback: A collision was detected between {1} and {2}", 0, name1, name2); |
1115 | */ | 1106 | */ |
1116 | return 1; | 1107 | return 1; |
1117 | } | 1108 | } |
@@ -1131,14 +1122,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1131 | name2 = "null"; | 1122 | name2 = "null"; |
1132 | } | 1123 | } |
1133 | 1124 | ||
1134 | // m_log.Info("TriCallback: A collision was detected between {1} and {2}. Index was {3}", 0, name1, name2, triangleIndex); | 1125 | // m_log.InfoFormat("TriCallback: A collision was detected between {1} and {2}. Index was {3}", 0, name1, name2, triangleIndex); |
1135 | 1126 | ||
1136 | d.Vector3 v0 = new d.Vector3(); | 1127 | d.Vector3 v0 = new d.Vector3(); |
1137 | d.Vector3 v1 = new d.Vector3(); | 1128 | d.Vector3 v1 = new d.Vector3(); |
1138 | d.Vector3 v2 = new d.Vector3(); | 1129 | d.Vector3 v2 = new d.Vector3(); |
1139 | 1130 | ||
1140 | d.GeomTriMeshGetTriangle(trimesh, 0, ref v0, ref v1, ref v2); | 1131 | d.GeomTriMeshGetTriangle(trimesh, 0, ref v0, ref v1, ref v2); |
1141 | // m_log.Debug("Triangle {0} is <{1},{2},{3}>, <{4},{5},{6}>, <{7},{8},{9}>", triangleIndex, v0.X, v0.Y, v0.Z, v1.X, v1.Y, v1.Z, v2.X, v2.Y, v2.Z); | 1132 | // m_log.DebugFormat("Triangle {0} is <{1},{2},{3}>, <{4},{5},{6}>, <{7},{8},{9}>", triangleIndex, v0.X, v0.Y, v0.Z, v1.X, v1.Y, v1.Z, v2.X, v2.Y, v2.Z); |
1142 | 1133 | ||
1143 | return 1; | 1134 | return 1; |
1144 | } | 1135 | } |
@@ -1282,10 +1273,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1282 | foreach (OdeCharacter actor in _characters) | 1273 | foreach (OdeCharacter actor in _characters) |
1283 | { | 1274 | { |
1284 | actor.Move(timeStep); | 1275 | actor.Move(timeStep); |
1285 | |||
1286 | } | 1276 | } |
1287 | 1277 | ||
1288 | |||
1289 | collision_optimized(timeStep); | 1278 | collision_optimized(timeStep); |
1290 | 1279 | ||
1291 | d.WorldQuickStep(world, ODE_STEPSIZE); | 1280 | d.WorldQuickStep(world, ODE_STEPSIZE); |
@@ -1299,9 +1288,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1299 | ode.dunlock(world); | 1288 | ode.dunlock(world); |
1300 | } | 1289 | } |
1301 | 1290 | ||
1302 | |||
1303 | |||
1304 | |||
1305 | step_time -= ODE_STEPSIZE; | 1291 | step_time -= ODE_STEPSIZE; |
1306 | i++; | 1292 | i++; |
1307 | } | 1293 | } |
@@ -1691,6 +1677,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1691 | public override void DeleteTerrain() | 1677 | public override void DeleteTerrain() |
1692 | { | 1678 | { |
1693 | } | 1679 | } |
1680 | |||
1694 | public override void Dispose() | 1681 | public override void Dispose() |
1695 | { | 1682 | { |
1696 | lock (OdeLock) | 1683 | lock (OdeLock) |