diff options
author | UbitUmarov | 2015-12-26 21:38:36 +0000 |
---|---|---|
committer | UbitUmarov | 2015-12-26 21:38:36 +0000 |
commit | e2517b51f8944b2c5e5c25478d1b418faa8dbb05 (patch) | |
tree | 177c59568d851392f60087dde06d5fff875ace4f /OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | |
parent | ODE lib: update the lib for linux 32bit and 64bit, this time without debug in... (diff) | |
download | opensim-SC_OLD-e2517b51f8944b2c5e5c25478d1b418faa8dbb05.zip opensim-SC_OLD-e2517b51f8944b2c5e5c25478d1b418faa8dbb05.tar.gz opensim-SC_OLD-e2517b51f8944b2c5e5c25478d1b418faa8dbb05.tar.bz2 opensim-SC_OLD-e2517b51f8944b2c5e5c25478d1b418faa8dbb05.tar.xz |
ubMeshmerizer: remove some wrong faces still present in taper cases, some code cleanup
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs index a6e303a..bcf8e2b 100644 --- a/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs +++ b/OpenSim/Region/PhysicsModules/ubOdeMeshing/Meshmerizer.cs | |||
@@ -121,6 +121,22 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
121 | 121 | ||
122 | CacheExpire = TimeSpan.FromHours(fcache); | 122 | CacheExpire = TimeSpan.FromHours(fcache); |
123 | 123 | ||
124 | if(doMeshFileCache && cachePath != "") | ||
125 | { | ||
126 | lock (diskLock) | ||
127 | { | ||
128 | try | ||
129 | { | ||
130 | if (!Directory.Exists(cachePath)) | ||
131 | Directory.CreateDirectory(cachePath); | ||
132 | } | ||
133 | catch | ||
134 | { | ||
135 | doMeshFileCache = false; | ||
136 | doCacheExpire = false; | ||
137 | } | ||
138 | } | ||
139 | } | ||
124 | } | 140 | } |
125 | } | 141 | } |
126 | 142 | ||
@@ -347,8 +363,8 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
347 | { | 363 | { |
348 | Face f = faces[i]; | 364 | Face f = faces[i]; |
349 | mesh.Add(new Triangle(coords[f.v1].X, coords[f.v1].Y, coords[f.v1].Z, | 365 | mesh.Add(new Triangle(coords[f.v1].X, coords[f.v1].Y, coords[f.v1].Z, |
350 | coords[f.v2].X, coords[f.v2].Y, coords[f.v2].Z, | 366 | coords[f.v2].X, coords[f.v2].Y, coords[f.v2].Z, |
351 | coords[f.v3].X, coords[f.v3].Y, coords[f.v3].Z)); | 367 | coords[f.v3].X, coords[f.v3].Y, coords[f.v3].Z)); |
352 | } | 368 | } |
353 | 369 | ||
354 | coords.Clear(); | 370 | coords.Clear(); |
@@ -972,6 +988,14 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing | |||
972 | primMesh.taperX = primShape.PathTaperX * 0.01f; | 988 | primMesh.taperX = primShape.PathTaperX * 0.01f; |
973 | primMesh.taperY = primShape.PathTaperY * 0.01f; | 989 | primMesh.taperY = primShape.PathTaperY * 0.01f; |
974 | 990 | ||
991 | if(profshape == (byte)ProfileShape.HalfCircle) | ||
992 | { | ||
993 | if(primMesh.holeSizeY < 0.01f) | ||
994 | primMesh.holeSizeY = 0.01f; | ||
995 | else if(primMesh.holeSizeY > 1.0f) | ||
996 | primMesh.holeSizeY = 1.0f; | ||
997 | } | ||
998 | |||
975 | #if SPAM | 999 | #if SPAM |
976 | m_log.Debug("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString()); | 1000 | m_log.Debug("****** PrimMesh Parameters (Circular) ******\n" + primMesh.ParamsToDisplayString()); |
977 | #endif | 1001 | #endif |