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