aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2012-03-21 01:24:30 +0000
committerUbitUmarov2012-03-21 01:24:30 +0000
commit2e41294da969cd124a013070aaf6ce5dd9f01a5c (patch)
treee7a37cb7c7f45b64058132723f565b94adfec948
parentUpdate prebuild (diff)
downloadopensim-SC_OLD-2e41294da969cd124a013070aaf6ce5dd9f01a5c.zip
opensim-SC_OLD-2e41294da969cd124a013070aaf6ce5dd9f01a5c.tar.gz
opensim-SC_OLD-2e41294da969cd124a013070aaf6ce5dd9f01a5c.tar.bz2
opensim-SC_OLD-2e41294da969cd124a013070aaf6ce5dd9f01a5c.tar.xz
add convex state to mesh key, so a change is detected.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs8
-rw-r--r--OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs2
2 files changed, 9 insertions, 1 deletions
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index 9cfc7ed..c6ccc9e 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -881,6 +881,11 @@ namespace OpenSim.Framework
881 881
882 public ulong GetMeshKey(Vector3 size, float lod) 882 public ulong GetMeshKey(Vector3 size, float lod)
883 { 883 {
884 return GetMeshKey(size, lod, false);
885 }
886
887 public ulong GetMeshKey(Vector3 size, float lod, bool convex)
888 {
884 ulong hash = 5381; 889 ulong hash = 5381;
885 890
886 hash = djb2(hash, this.PathCurve); 891 hash = djb2(hash, this.PathCurve);
@@ -926,6 +931,9 @@ namespace OpenSim.Framework
926 hash = djb2(hash, scaleBytes[i]); 931 hash = djb2(hash, scaleBytes[i]);
927 } 932 }
928 933
934 if(convex)
935 hash = djb2(hash, 0xa5);
936
929 return hash; 937 return hash;
930 } 938 }
931 939
diff --git a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs
index 7667e91..df08381 100644
--- a/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs
@@ -995,7 +995,7 @@ namespace OpenSim.Region.Physics.Meshing
995 995
996 // If this mesh has been created already, return it instead of creating another copy 996 // If this mesh has been created already, return it instead of creating another copy
997 // For large regions with 100k+ prims and hundreds of copies of each, this can save a GB or more of memory 997 // For large regions with 100k+ prims and hundreds of copies of each, this can save a GB or more of memory
998 key = primShape.GetMeshKey(size, lod); 998 key = primShape.GetMeshKey(size, lod, convex);
999 if (m_uniqueMeshes.TryGetValue(key, out mesh)) 999 if (m_uniqueMeshes.TryGetValue(key, out mesh))
1000 return mesh; 1000 return mesh;
1001 1001