aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs
diff options
context:
space:
mode:
authorubit2012-10-03 21:38:35 +0200
committerubit2012-10-03 21:38:35 +0200
commit33b2096c5fb3a014294e6d32e529e7accb91ee9f (patch)
tree2b71cf76930306af69f8a1f8f4b6a9705ed44dc6 /OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs
parentMerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff)
parent making meshworker have more work.. (diff)
downloadopensim-SC-33b2096c5fb3a014294e6d32e529e7accb91ee9f.zip
opensim-SC-33b2096c5fb3a014294e6d32e529e7accb91ee9f.tar.gz
opensim-SC-33b2096c5fb3a014294e6d32e529e7accb91ee9f.tar.bz2
opensim-SC-33b2096c5fb3a014294e6d32e529e7accb91ee9f.tar.xz
Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs24
1 files changed, 20 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs
index 81d59a6..f57149c 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs
@@ -5,6 +5,7 @@
5using System; 5using System;
6using System.Threading; 6using System.Threading;
7using System.Collections.Generic; 7using System.Collections.Generic;
8using System.IO;
8using System.Reflection; 9using System.Reflection;
9using System.Runtime.InteropServices; 10using System.Runtime.InteropServices;
10using System.Text; 11using System.Text;
@@ -177,7 +178,7 @@ namespace OpenSim.Region.Physics.OdePlugin
177 Vector3 size = psize; 178 Vector3 size = psize;
178 byte shapetype = pshapetype; 179 byte shapetype = pshapetype;
179 180
180 if (needsMeshing(pbs) && (pbs.SculptData.Length > 0)) 181 if (needsMeshing(pbs))
181 { 182 {
182 bool convex; 183 bool convex;
183 int clod = (int)LevelOfDetail.High; 184 int clod = (int)LevelOfDetail.High;
@@ -189,9 +190,24 @@ namespace OpenSim.Region.Physics.OdePlugin
189 if (pbs.SculptType != (byte)SculptType.Mesh) 190 if (pbs.SculptType != (byte)SculptType.Mesh)
190 clod = (int)LevelOfDetail.Low; 191 clod = (int)LevelOfDetail.Low;
191 } 192 }
192 mesh = m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex); 193 mesh = m_mesher.GetMesh(actor.Name, pbs, size, clod, true, convex);
193 if(mesh == null) 194 if (mesh == null)
194 mesh = m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex); 195 {
196 if (!pbs.SculptEntry)
197 return m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex);
198
199 if (pbs.SculptTexture == UUID.Zero)
200 return null;
201
202 if(pbs.SculptType != (byte)SculptType.Mesh)
203 { // check for sculpt decoded image on cache)
204 if (File.Exists(System.IO.Path.Combine("j2kDecodeCache", "smap_" + pbs.SculptTexture.ToString())))
205 return m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex);
206 }
207
208 if(pbs.SculptData != null && pbs.SculptData.Length >0)
209 return m_mesher.CreateMesh(actor.Name, pbs, size, clod, true, convex);
210 }
195 } 211 }
196 return mesh; 212 return mesh;
197 } 213 }