diff options
-rw-r--r-- | OpenSim/Framework/PrimitiveBaseShape.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Physics/UbitMeshing/Meshmerizer.cs | 2 |
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 | ||