aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/Manager')
-rw-r--r--OpenSim/Region/Physics/Manager/IMesher.cs13
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs17
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs5
-rw-r--r--OpenSim/Region/Physics/Manager/ZeroMesher.cs9
4 files changed, 41 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/Manager/IMesher.cs b/OpenSim/Region/Physics/Manager/IMesher.cs
index a8c99f7..ecc2918 100644
--- a/OpenSim/Region/Physics/Manager/IMesher.cs
+++ b/OpenSim/Region/Physics/Manager/IMesher.cs
@@ -37,9 +37,11 @@ namespace OpenSim.Region.Physics.Manager
37 { 37 {
38 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod); 38 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod);
39 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical); 39 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical);
40 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical,bool convex); 40 IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex, bool forOde);
41 IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex);
41 void ReleaseMesh(IMesh mesh); 42 void ReleaseMesh(IMesh mesh);
42 void ExpireReleaseMeshs(); 43 void ExpireReleaseMeshs();
44 void ExpireFileCache();
43 } 45 }
44 46
45 // Values for level of detail to be passed to the mesher. 47 // Values for level of detail to be passed to the mesher.
@@ -57,6 +59,7 @@ namespace OpenSim.Region.Physics.Manager
57 { 59 {
58 } 60 }
59 61
62 [Serializable()]
60 [StructLayout(LayoutKind.Explicit)] 63 [StructLayout(LayoutKind.Explicit)]
61 public struct AMeshKey 64 public struct AMeshKey
62 { 65 {
@@ -66,6 +69,13 @@ namespace OpenSim.Region.Physics.Manager
66 public ulong hashA; 69 public ulong hashA;
67 [FieldOffset(8)] 70 [FieldOffset(8)]
68 public ulong hashB; 71 public ulong hashB;
72 [FieldOffset(16)]
73 public ulong hashC;
74
75 public override string ToString()
76 {
77 return uuid.ToString() + "-" + hashC.ToString("x") ;
78 }
69 } 79 }
70 80
71 public interface IMesh 81 public interface IMesh
@@ -81,5 +91,6 @@ namespace OpenSim.Region.Physics.Manager
81 void Append(IMesh newMesh); 91 void Append(IMesh newMesh);
82 void TransformLinear(float[,] matrix, float[] offset); 92 void TransformLinear(float[,] matrix, float[] offset);
83 Vector3 GetCentroid(); 93 Vector3 GetCentroid();
94 Vector3 GetOBB();
84 } 95 }
85} 96}
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index a2c72c3..14f65b8 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -315,6 +315,23 @@ namespace OpenSim.Region.Physics.Manager
315 } 315 }
316 } 316 }
317 317
318
319 public virtual float PhysicsCost
320 {
321 get
322 {
323 return 0.1f;
324 }
325 }
326
327 public virtual float StreamCost
328 {
329 get
330 {
331 return 1.0f;
332 }
333 }
334
318 /// <summary> 335 /// <summary>
319 /// Velocity of this actor. 336 /// Velocity of this actor.
320 /// </summary> 337 /// </summary>
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 5274f3b..ce269fa 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -106,7 +106,7 @@ namespace OpenSim.Region.Physics.Manager
106 get { return new NullPhysicsScene(); } 106 get { return new NullPhysicsScene(); }
107 } 107 }
108 108
109 public RequestAssetDelegate RequestAssetMethod { private get; set; } 109 public RequestAssetDelegate RequestAssetMethod { get; set; }
110 110
111 public virtual void TriggerPhysicsBasedRestart() 111 public virtual void TriggerPhysicsBasedRestart()
112 { 112 {
@@ -246,6 +246,9 @@ namespace OpenSim.Region.Physics.Manager
246 246
247 public abstract void AddPhysicsActorTaint(PhysicsActor prim); 247 public abstract void AddPhysicsActorTaint(PhysicsActor prim);
248 248
249
250 public virtual void PrepareSimulation() { }
251
249 /// <summary> 252 /// <summary>
250 /// Perform a simulation of the current physics scene over the given timestep. 253 /// Perform a simulation of the current physics scene over the given timestep.
251 /// </summary> 254 /// </summary>
diff --git a/OpenSim/Region/Physics/Manager/ZeroMesher.cs b/OpenSim/Region/Physics/Manager/ZeroMesher.cs
index f555cb9..16846e6 100644
--- a/OpenSim/Region/Physics/Manager/ZeroMesher.cs
+++ b/OpenSim/Region/Physics/Manager/ZeroMesher.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Region.Physics.Manager
67 return CreateMesh(primName, primShape, size, lod, false); 67 return CreateMesh(primName, primShape, size, lod, false);
68 } 68 }
69 69
70 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex) 70 public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex,bool forOde)
71 { 71 {
72 return CreateMesh(primName, primShape, size, lod, false); 72 return CreateMesh(primName, primShape, size, lod, false);
73 } 73 }
@@ -79,7 +79,14 @@ namespace OpenSim.Region.Physics.Manager
79 79
80 return null; 80 return null;
81 } 81 }
82
83 public IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex)
84 {
85 return null;
86 }
87
82 public void ReleaseMesh(IMesh mesh) { } 88 public void ReleaseMesh(IMesh mesh) { }
83 public void ExpireReleaseMeshs() { } 89 public void ExpireReleaseMeshs() { }
90 public void ExpireFileCache() { }
84 } 91 }
85} 92}