aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2012-10-03 20:36:41 +0100
committerUbitUmarov2012-10-03 20:36:41 +0100
commit4f51cc325c627e9e9c1381e6e813a266968895d4 (patch)
treeb33e1b5b044f71f7113aa585b3226f9cc911b41b
parent introduce a ODEMeshWorker class, should be pure cosmetic changes for now (diff)
downloadopensim-SC-4f51cc325c627e9e9c1381e6e813a266968895d4.zip
opensim-SC-4f51cc325c627e9e9c1381e6e813a266968895d4.tar.gz
opensim-SC-4f51cc325c627e9e9c1381e6e813a266968895d4.tar.bz2
opensim-SC-4f51cc325c627e9e9c1381e6e813a266968895d4.tar.xz
making meshworker have more work..
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEMeshWorker.cs24
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs3
2 files changed, 23 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 }
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
index 545bd27..f328066 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs
@@ -1353,6 +1353,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1353 { 1353 {
1354 if (m_mesh == null) 1354 if (m_mesh == null)
1355 { 1355 {
1356/*
1356 bool convex; 1357 bool convex;
1357 int clod = (int)LevelOfDetail.High; 1358 int clod = (int)LevelOfDetail.High;
1358 1359
@@ -1366,6 +1367,8 @@ namespace OpenSim.Region.Physics.OdePlugin
1366 } 1367 }
1367 1368
1368 mesh = _parent_scene.mesher.CreateMesh(Name, _pbs, _size, clod, true, convex); 1369 mesh = _parent_scene.mesher.CreateMesh(Name, _pbs, _size, clod, true, convex);
1370*/
1371 mesh = _parent_scene.m_meshWorker.getMesh(this, _pbs, _size, m_shapetype);
1369 } 1372 }
1370 else 1373 else
1371 { 1374 {