aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2016-12-12 19:16:51 +0000
committerUbitUmarov2016-12-12 19:16:51 +0000
commit7d8cb244d1148d70b43c51add04e095bd1160cd7 (patch)
tree3ebd42ee5b7f6757ac5fa325e9562d9543ef9d29
parentubOde simple spheres and boxes with type convex have no holes on physics(long... (diff)
downloadopensim-SC_OLD-7d8cb244d1148d70b43c51add04e095bd1160cd7.zip
opensim-SC_OLD-7d8cb244d1148d70b43c51add04e095bd1160cd7.tar.gz
opensim-SC_OLD-7d8cb244d1148d70b43c51add04e095bd1160cd7.tar.bz2
opensim-SC_OLD-7d8cb244d1148d70b43c51add04e095bd1160cd7.tar.xz
ubOde other convex type objects other than mesh and sculpt also don't have holes
-rw-r--r--OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs9
2 files changed, 7 insertions, 4 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs b/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
index 5a3008d..bb661e5 100644
--- a/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
+++ b/OpenSim/Region/PhysicsModules/ubOde/ODEMeshWorker.cs
@@ -433,7 +433,7 @@ namespace OpenSim.Region.PhysicsModule.ubOde
433 { 433 {
434 convex = true; 434 convex = true;
435 // sculpts pseudo convex 435 // sculpts pseudo convex
436 if (pbs.SculptType != (byte)SculptType.Mesh) 436 if (pbs.SculptEntry && pbs.SculptType != (byte)SculptType.Mesh)
437 clod = (int)LevelOfDetail.Low; 437 clod = (int)LevelOfDetail.Low;
438 } 438 }
439 439
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
index 2ae0881..7f0713a 100644
--- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs
@@ -349,7 +349,7 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
349 } 349 }
350 else 350 else
351 { 351 {
352 if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, lod, out coords, out faces)) 352 if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, lod, convex, out coords, out faces))
353 return null; 353 return null;
354 } 354 }
355 355
@@ -942,7 +942,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
942 /// <param name="faces">Faces are added to this list by the method.</param> 942 /// <param name="faces">Faces are added to this list by the method.</param>
943 /// <returns>true if coords and faces were successfully generated, false if not</returns> 943 /// <returns>true if coords and faces were successfully generated, false if not</returns>
944 private bool GenerateCoordsAndFacesFromPrimShapeData( 944 private bool GenerateCoordsAndFacesFromPrimShapeData(
945 string primName, PrimitiveBaseShape primShape, float lod, out List<Coord> coords, out List<Face> faces) 945 string primName, PrimitiveBaseShape primShape, float lod, bool convex,
946 out List<Coord> coords, out List<Face> faces)
946 { 947 {
947 PrimMesh primMesh; 948 PrimMesh primMesh;
948 coords = new List<Coord>(); 949 coords = new List<Coord>();
@@ -970,7 +971,9 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
970 profileBegin = profileEnd - 0.02f; 971 profileBegin = profileEnd - 0.02f;
971 972
972 float profileHollow = (float)primShape.ProfileHollow * 2.0e-5f; 973 float profileHollow = (float)primShape.ProfileHollow * 2.0e-5f;
973 if (profileHollow > 0.95f) 974 if(convex)
975 profileHollow = 0.0f;
976 else if (profileHollow > 0.95f)
974 profileHollow = 0.95f; 977 profileHollow = 0.95f;
975 978
976 int sides = 4; 979 int sides = 4;