diff options
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 33 |
2 files changed, 29 insertions, 25 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 123c8ff..56e3b7e 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -638,7 +638,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
638 | float profileEnd; | 638 | float profileEnd; |
639 | 639 | ||
640 | if (_pbs.PathCurve == (byte)Extrusion.Straight || _pbs.PathCurve == (byte)Extrusion.Flexible) | 640 | if (_pbs.PathCurve == (byte)Extrusion.Straight || _pbs.PathCurve == (byte)Extrusion.Flexible) |
641 | { | 641 | { |
642 | taperX1 = _pbs.PathScaleX * 0.01f; | 642 | taperX1 = _pbs.PathScaleX * 0.01f; |
643 | if (taperX1 > 1.0f) | 643 | if (taperX1 > 1.0f) |
644 | taperX1 = 2.0f - taperX1; | 644 | taperX1 = 2.0f - taperX1; |
@@ -648,9 +648,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
648 | if (taperY1 > 1.0f) | 648 | if (taperY1 > 1.0f) |
649 | taperY1 = 2.0f - taperY1; | 649 | taperY1 = 2.0f - taperY1; |
650 | taperY = 1.0f - taperY1; | 650 | taperY = 1.0f - taperY1; |
651 | } | 651 | } |
652 | else | 652 | else |
653 | { | 653 | { |
654 | taperX = _pbs.PathTaperX * 0.01f; | 654 | taperX = _pbs.PathTaperX * 0.01f; |
655 | if (taperX < 0.0f) | 655 | if (taperX < 0.0f) |
656 | taperX = -taperX; | 656 | taperX = -taperX; |
@@ -660,9 +660,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
660 | if (taperY < 0.0f) | 660 | if (taperY < 0.0f) |
661 | taperY = -taperY; | 661 | taperY = -taperY; |
662 | taperY1 = 1.0f - taperY; | 662 | taperY1 = 1.0f - taperY; |
663 | 663 | } | |
664 | } | ||
665 | |||
666 | 664 | ||
667 | volume *= (taperX1 * taperY1 + 0.5f * (taperX1 * taperY + taperX * taperY1) + 0.3333333333f * taperX * taperY); | 665 | volume *= (taperX1 * taperY1 + 0.5f * (taperX1 * taperY + taperX * taperY1) + 0.3333333333f * taperX * taperY); |
668 | 666 | ||
@@ -859,7 +857,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
859 | 857 | ||
860 | public void ProcessTaints(float timestep) | 858 | public void ProcessTaints(float timestep) |
861 | { | 859 | { |
862 | //Console.WriteLine("ProcessTaints for " + Name); | 860 | #if SPAM |
861 | Console.WriteLine("ZProcessTaints for " + Name); | ||
862 | #endif | ||
863 | if (m_taintadd) | 863 | if (m_taintadd) |
864 | { | 864 | { |
865 | changeadd(timestep); | 865 | changeadd(timestep); |
@@ -1323,7 +1323,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1323 | 1323 | ||
1324 | public void CreateGeom(IntPtr m_targetSpace, IMesh _mesh) | 1324 | public void CreateGeom(IntPtr m_targetSpace, IMesh _mesh) |
1325 | { | 1325 | { |
1326 | //Console.WriteLine("CreateGeom:"); | 1326 | #if SPAM |
1327 | Console.WriteLine("CreateGeom:"); | ||
1328 | #endif | ||
1327 | if (_mesh != null) | 1329 | if (_mesh != null) |
1328 | { | 1330 | { |
1329 | setMesh(_parent_scene, _mesh); | 1331 | setMesh(_parent_scene, _mesh); |
@@ -1944,7 +1946,6 @@ Console.WriteLine(" JointCreateFixed"); | |||
1944 | if (_parent_scene.needsMeshing(_pbs)) | 1946 | if (_parent_scene.needsMeshing(_pbs)) |
1945 | mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); | 1947 | mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); |
1946 | 1948 | ||
1947 | //IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); | ||
1948 | #if SPAM | 1949 | #if SPAM |
1949 | Console.WriteLine("changesize 1"); | 1950 | Console.WriteLine("changesize 1"); |
1950 | #endif | 1951 | #endif |
@@ -2056,8 +2057,8 @@ Console.WriteLine("changesize 2"); | |||
2056 | if (IsPhysical) | 2057 | if (IsPhysical) |
2057 | meshlod = _parent_scene.MeshSculptphysicalLOD; | 2058 | meshlod = _parent_scene.MeshSculptphysicalLOD; |
2058 | 2059 | ||
2059 | IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); | ||
2060 | // createmesh returns null when it doesn't mesh. | 2060 | // createmesh returns null when it doesn't mesh. |
2061 | IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size, meshlod, IsPhysical); | ||
2061 | #if SPAM | 2062 | #if SPAM |
2062 | Console.WriteLine("changeshape needed meshing"); | 2063 | Console.WriteLine("changeshape needed meshing"); |
2063 | #endif | 2064 | #endif |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index 99392cc..7b8a80c 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs | |||
@@ -1723,20 +1723,21 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1723 | PhysicsActor result; | 1723 | PhysicsActor result; |
1724 | IMesh mesh = null; | 1724 | IMesh mesh = null; |
1725 | 1725 | ||
1726 | if (needsMeshing(pbs)) | 1726 | // Don't create the mesh here - wait until the mesh data is loaded from the asset store. |
1727 | { | 1727 | // if (needsMeshing(pbs)) |
1728 | try | 1728 | // { |
1729 | { | 1729 | // try |
1730 | mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); | 1730 | // { |
1731 | } | 1731 | // mesh = mesher.CreateMesh(primName, pbs, size, 32f, isPhysical); |
1732 | catch(Exception e) | 1732 | // } |
1733 | { | 1733 | // catch(Exception e) |
1734 | m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); | 1734 | // { |
1735 | m_log.Debug(e.ToString()); | 1735 | // m_log.ErrorFormat("[PHYSICS]: Exception while meshing prim {0}.", primName); |
1736 | mesh = null; | 1736 | // m_log.Debug(e.ToString()); |
1737 | return null; | 1737 | // mesh = null; |
1738 | } | 1738 | // return null; |
1739 | } | 1739 | // } |
1740 | // } | ||
1740 | 1741 | ||
1741 | result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); | 1742 | result = AddPrim(primName, position, size, rotation, mesh, pbs, isPhysical); |
1742 | 1743 | ||
@@ -2590,7 +2591,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
2590 | { | 2591 | { |
2591 | if (!(_taintedPrimH.Contains(taintedprim))) | 2592 | if (!(_taintedPrimH.Contains(taintedprim))) |
2592 | { | 2593 | { |
2593 | //Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.m_primName); | 2594 | #if SPAM |
2595 | Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name); | ||
2596 | #endif | ||
2594 | _taintedPrimH.Add(taintedprim); // HashSet for searching | 2597 | _taintedPrimH.Add(taintedprim); // HashSet for searching |
2595 | _taintedPrimL.Add(taintedprim); // List for ordered readout | 2598 | _taintedPrimL.Add(taintedprim); // List for ordered readout |
2596 | } | 2599 | } |