From f415256e0b0d4b0191d52cb84090a0f1b0044ae9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 11 Feb 2012 03:25:17 +0000 Subject: Use mesh to estimate real center of prims if avaiable. Let sculpt map textures with alpha channel work. On linux J2DecodeCache folder must be deleted to remove bad entries. Corrently this can't be cached on linux (mono/ cairo/? problem) --- OpenSim/Region/Physics/Manager/IMesher.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index 3a9ca1b..cc92484 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -65,5 +65,6 @@ namespace OpenSim.Region.Physics.Manager void releasePinned(); void Append(IMesh newMesh); void TransformLinear(float[,] matrix, float[] offset); + Vector3 GetCentroid(); } } -- cgit v1.1 From 8817b6e74cd792808c4bf1d7c125ff3ecace4d89 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 21 Mar 2012 00:02:41 +0000 Subject: let convex be a parameter to createMesh so it can be used. Was forced to add it also to original mesher code and zeromesher --- OpenSim/Region/Physics/Manager/IMesher.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index cc92484..c32cf38 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -36,6 +36,7 @@ namespace OpenSim.Region.Physics.Manager { IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod); IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical); + IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical,bool convex); } // Values for level of detail to be passed to the mesher. -- cgit v1.1 From 36a1248b317cd80717fef6bc7c8fab318172a075 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Mon, 6 Aug 2012 09:06:46 +0100 Subject: ** DANGER someone should stress test more ** release unused physics meshs, including unmanaged memory allocations (allocated by managed code) --- OpenSim/Region/Physics/Manager/IMesher.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index c32cf38..19aa747 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -37,6 +37,8 @@ namespace OpenSim.Region.Physics.Manager IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod); IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical); IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical,bool convex); + void ReleaseMesh(IMesh mesh); + void ExpireReleaseMeshs(); } // Values for level of detail to be passed to the mesher. -- cgit v1.1 From eef6bb97c0f96a98468c44bae5392c9d129bfb1f Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 7 Aug 2012 17:42:29 +0100 Subject: use a bit more complex mesh key identifier, plus a bug fix --- OpenSim/Region/Physics/Manager/IMesher.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index 19aa747..a8c99f7 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -27,6 +27,7 @@ using System; using System.Collections.Generic; +using System.Runtime.InteropServices; using OpenSim.Framework; using OpenMetaverse; @@ -56,6 +57,17 @@ namespace OpenSim.Region.Physics.Manager { } + [StructLayout(LayoutKind.Explicit)] + public struct AMeshKey + { + [FieldOffset(0)] + public UUID uuid; + [FieldOffset(0)] + public ulong hashA; + [FieldOffset(8)] + public ulong hashB; + } + public interface IMesh { List getVertexList(); -- cgit v1.1 From 7137b234b4e99d8d19e83dfb5268674c72f46479 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 3 Oct 2012 19:33:28 +0100 Subject: introduce a ODEMeshWorker class, should be pure cosmetic changes for now --- OpenSim/Region/Physics/Manager/IMesher.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index a8c99f7..06f3c8b 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -37,7 +37,8 @@ namespace OpenSim.Region.Physics.Manager { IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod); IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical); - IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical,bool convex); + IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex); + IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex); void ReleaseMesh(IMesh mesh); void ExpireReleaseMeshs(); } -- cgit v1.1 From 51e1830f86cd0253879f4f60470a3b5fa2b3db7c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 4 Oct 2012 04:55:53 +0100 Subject: more changes. Most code not in use --- OpenSim/Region/Physics/Manager/IMesher.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index 06f3c8b..460b48e 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -82,5 +82,6 @@ namespace OpenSim.Region.Physics.Manager void Append(IMesh newMesh); void TransformLinear(float[,] matrix, float[] offset); Vector3 GetCentroid(); + Vector3 GetOBB(); } } -- cgit v1.1 From 87175412882e8e4b7cd9d92d6a9be8546ec7e9e9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 9 Oct 2012 04:31:50 +0100 Subject: force allocation of mesh data on creation ( messy code version ) --- OpenSim/Region/Physics/Manager/IMesher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index 460b48e..fdba6ee 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -37,7 +37,7 @@ namespace OpenSim.Region.Physics.Manager { IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod); IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical); - IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex); + IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex, bool forOde); IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex); void ReleaseMesh(IMesh mesh); void ExpireReleaseMeshs(); -- cgit v1.1 From 13cb64a2c57db34bcb6706075d3d7998bb416392 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 12 Oct 2012 23:46:48 +0100 Subject: missing file --- OpenSim/Region/Physics/Manager/IMesher.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index fdba6ee..d7ab20b 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -58,6 +58,7 @@ namespace OpenSim.Region.Physics.Manager { } + [Serializable()] [StructLayout(LayoutKind.Explicit)] public struct AMeshKey { @@ -67,6 +68,11 @@ namespace OpenSim.Region.Physics.Manager public ulong hashA; [FieldOffset(8)] public ulong hashB; + + public override string ToString() + { + return uuid.ToString(); + } } public interface IMesh -- cgit v1.1 From 48d2258f41b3ce8e9a1bfe98e9835f5ea947a815 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 13 Oct 2012 00:41:19 +0100 Subject: longer meshs identification keys, so first part on disk cache is it's asset id --- OpenSim/Region/Physics/Manager/IMesher.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index d7ab20b..d0e3996 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -68,10 +68,12 @@ namespace OpenSim.Region.Physics.Manager public ulong hashA; [FieldOffset(8)] public ulong hashB; + [FieldOffset(16)] + public ulong hashC; public override string ToString() { - return uuid.ToString(); + return uuid.ToString() + "-" + hashC.ToString() ; } } -- cgit v1.1 From 666fb744a36ca5497dc8868298f47c23cd72b1a8 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 13 Oct 2012 01:41:18 +0100 Subject: retouch mesh ids --- OpenSim/Region/Physics/Manager/IMesher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index d0e3996..21a5fa0 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -73,7 +73,7 @@ namespace OpenSim.Region.Physics.Manager public override string ToString() { - return uuid.ToString() + "-" + hashC.ToString() ; + return uuid.ToString() + "-" + hashC.ToString("x") ; } } -- cgit v1.1 From 5986b4ee3980d27d6e8524c4b8f5ad4c9a701288 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 13 Oct 2012 22:30:34 +0100 Subject: add mesh cache expire on region startup. Expires will be relative to previus expire (assumed done only once at startup). File 'cntr' on cache folder stores time. Deleting it will force a skip on expire. Default time is 48hours before previus startup to account for failed ones etc. --- OpenSim/Region/Physics/Manager/IMesher.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index 21a5fa0..ecc2918 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -41,6 +41,7 @@ namespace OpenSim.Region.Physics.Manager IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex); void ReleaseMesh(IMesh mesh); void ExpireReleaseMeshs(); + void ExpireFileCache(); } // Values for level of detail to be passed to the mesher. -- cgit v1.1 From f00ecf5fe71df4eb5ad5dd1c195616300e988820 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 29 May 2013 02:18:05 +0100 Subject: missing files --- OpenSim/Region/Physics/Manager/IMesher.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Physics/Manager/IMesher.cs') diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs index 5485eb7..e290dc9 100644 --- a/OpenSim/Region/Physics/Manager/IMesher.cs +++ b/OpenSim/Region/Physics/Manager/IMesher.cs @@ -37,6 +37,7 @@ namespace OpenSim.Region.Physics.Manager { IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod); IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical); + IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex, bool forOde); IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool shouldCache, bool convex, bool forOde); IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex); void ReleaseMesh(IMesh mesh); -- cgit v1.1