diff options
author | ubit | 2012-10-03 21:38:35 +0200 |
---|---|---|
committer | ubit | 2012-10-03 21:38:35 +0200 |
commit | 33b2096c5fb3a014294e6d32e529e7accb91ee9f (patch) | |
tree | 2b71cf76930306af69f8a1f8f4b6a9705ed44dc6 /OpenSim/Region/Physics | |
parent | Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff) | |
parent | making meshworker have more work.. (diff) | |
download | opensim-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.cs | 24 | ||||
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODEPrim.cs | 3 |
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 @@ | |||
5 | using System; | 5 | using System; |
6 | using System.Threading; | 6 | using System.Threading; |
7 | using System.Collections.Generic; | 7 | using System.Collections.Generic; |
8 | using System.IO; | ||
8 | using System.Reflection; | 9 | using System.Reflection; |
9 | using System.Runtime.InteropServices; | 10 | using System.Runtime.InteropServices; |
10 | using System.Text; | 11 | using 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 | { |