aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs16
-rw-r--r--OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs28
-rw-r--r--OpenSim/Region/Physics/Manager/IMesher.cs2
-rw-r--r--OpenSim/Region/Physics/Meshing/Mesh.cs16
4 files changed, 37 insertions, 25 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 54c420d..b79918a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -927,10 +927,10 @@ namespace OpenSim.Region.Framework.Scenes
927 { 927 {
928 throw; 928 throw;
929 } 929 }
930 catch (AccessViolationException e) 930 //catch (AccessViolationException e)
931 { 931 //{
932 m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); 932 // m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
933 } 933 //}
934 //catch (NullReferenceException e) 934 //catch (NullReferenceException e)
935 //{ 935 //{
936 // m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); 936 // m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
@@ -939,10 +939,10 @@ namespace OpenSim.Region.Framework.Scenes
939 { 939 {
940 m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); 940 m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
941 } 941 }
942 catch (Exception e) 942 //catch (Exception e)
943 { 943 //{
944 m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName); 944 // m_log.Error("[Scene]: Failed with exception " + e.ToString() + " On Region: " + RegionInfo.RegionName);
945 } 945 //}
946 finally 946 finally
947 { 947 {
948 //updateLock.ReleaseMutex(); 948 //updateLock.ReleaseMutex();
diff --git a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs
index 0f54a9f..9f68f02 100644
--- a/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs
+++ b/OpenSim/Region/Physics/BulletDotNETPlugin/BulletDotNETPrim.cs
@@ -35,7 +35,7 @@ using OpenMetaverse;
35using BulletDotNET; 35using BulletDotNET;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Region.Physics.Manager; 37using OpenSim.Region.Physics.Manager;
38using OpenSim.Region.Physics.Meshing; 38
39 39
40namespace OpenSim.Region.Physics.BulletDotNETPlugin 40namespace OpenSim.Region.Physics.BulletDotNETPlugin
41{ 41{
@@ -1012,8 +1012,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
1012 IMesh mesh = _parent_scene.mesher.CreateMesh(SOPName, _pbs, _size, meshlod, IsPhysical); 1012 IMesh mesh = _parent_scene.mesher.CreateMesh(SOPName, _pbs, _size, meshlod, IsPhysical);
1013 if (!positionOffset.IsIdentical(PhysicsVector.Zero,0.001f) || orientation != Quaternion.Identity) 1013 if (!positionOffset.IsIdentical(PhysicsVector.Zero,0.001f) || orientation != Quaternion.Identity)
1014 { 1014 {
1015 if (mesh is Mesh) 1015
1016 {
1017 float[] xyz = new float[3]; 1016 float[] xyz = new float[3];
1018 xyz[0] = positionOffset.X; 1017 xyz[0] = positionOffset.X;
1019 xyz[1] = positionOffset.Y; 1018 xyz[1] = positionOffset.Y;
@@ -1033,10 +1032,10 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
1033 matrix[2, 1] = m4.M32; 1032 matrix[2, 1] = m4.M32;
1034 matrix[2, 2] = m4.M33; 1033 matrix[2, 2] = m4.M33;
1035 1034
1036 Mesh mesh2 = (Mesh) mesh; 1035
1037 mesh2.TransformLinear(matrix, xyz); 1036 mesh.TransformLinear(matrix, xyz);
1038 mesh = (IMesh)mesh2; 1037
1039 } 1038
1040 1039
1041 } 1040 }
1042 1041
@@ -2120,7 +2119,7 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
2120 ProcessGeomCreationAsTriMesh(PhysicsVector.Zero, Quaternion.Identity); 2119 ProcessGeomCreationAsTriMesh(PhysicsVector.Zero, Quaternion.Identity);
2121 // createmesh returns null when it doesn't mesh. 2120 // createmesh returns null when it doesn't mesh.
2122 2121
2123 2122 /*
2124 if (_mesh is Mesh) 2123 if (_mesh is Mesh)
2125 { 2124 {
2126 } 2125 }
@@ -2129,7 +2128,9 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
2129 m_log.Warn("[PHYSICS]: Can't link a OpenSim.Region.Physics.Meshing.Mesh object"); 2128 m_log.Warn("[PHYSICS]: Can't link a OpenSim.Region.Physics.Meshing.Mesh object");
2130 return; 2129 return;
2131 } 2130 }
2132 Mesh pMesh = (Mesh) _mesh; 2131 */
2132
2133
2133 2134
2134 foreach (BulletDotNETPrim chld in childrenPrim) 2135 foreach (BulletDotNETPrim chld in childrenPrim)
2135 { 2136 {
@@ -2141,13 +2142,12 @@ namespace OpenSim.Region.Physics.BulletDotNETPlugin
2141 //pos *= Orientation; 2142 //pos *= Orientation;
2142 offset.setValues(pos.X, pos.Y, pos.Z); 2143 offset.setValues(pos.X, pos.Y, pos.Z);
2143 chld.ProcessGeomCreationAsTriMesh(offset, chld.Orientation); 2144 chld.ProcessGeomCreationAsTriMesh(offset, chld.Orientation);
2144 if (chld._mesh is Mesh) 2145
2145 { 2146 _mesh.Append(chld._mesh);
2146 pMesh.Append((Mesh)chld._mesh); 2147
2147 }
2148 2148
2149 } 2149 }
2150 setMesh(_parent_scene, pMesh); 2150 setMesh(_parent_scene, _mesh);
2151 2151
2152 //} 2152 //}
2153 2153
diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs
index fa13787..29f58f3 100644
--- a/OpenSim/Region/Physics/Manager/IMesher.cs
+++ b/OpenSim/Region/Physics/Manager/IMesher.cs
@@ -49,5 +49,7 @@ namespace OpenSim.Region.Physics.Manager
49 float[] getVertexListAsFloatLocked(); 49 float[] getVertexListAsFloatLocked();
50 void releaseSourceMeshData(); 50 void releaseSourceMeshData();
51 void releasePinned(); 51 void releasePinned();
52 void Append(IMesh newMesh);
53 void TransformLinear(float[,] matrix, float[] offset);
52 } 54 }
53} 55}
diff --git a/OpenSim/Region/Physics/Meshing/Mesh.cs b/OpenSim/Region/Physics/Meshing/Mesh.cs
index 5a565ff..719e364 100644
--- a/OpenSim/Region/Physics/Meshing/Mesh.cs
+++ b/OpenSim/Region/Physics/Meshing/Mesh.cs
@@ -296,12 +296,22 @@ namespace OpenSim.Region.Physics.Meshing
296 primMesh = null; 296 primMesh = null;
297 } 297 }
298 298
299 public void Append(Mesh newMesh) 299 public void Append(IMesh newMesh)
300 { 300 {
301 foreach (Vertex v in newMesh.vertices) 301 Mesh newMesh2;
302 if (newMesh is Mesh)
303 {
304 newMesh2 = (Mesh)newMesh;
305 }
306 else
307 {
308 return;
309 }
310
311 foreach (Vertex v in newMesh2.vertices)
302 vertices.Add(v); 312 vertices.Add(v);
303 313
304 foreach (Triangle t in newMesh.triangles) 314 foreach (Triangle t in newMesh2.triangles)
305 Add(t); 315 Add(t);
306 } 316 }
307 317