aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager
diff options
context:
space:
mode:
authorUbitUmarov2012-04-16 16:16:55 +0100
committerUbitUmarov2012-04-16 16:16:55 +0100
commit86a2169d7343825c74ae271f637002377b92b438 (patch)
tree5bfc66b130edcacc738d3f4e8b4efa854a37fe7e /OpenSim/Region/Physics/Manager
parentUse chode character actor.SetMomentum() to force full restore Velocity in sce... (diff)
downloadopensim-SC_OLD-86a2169d7343825c74ae271f637002377b92b438.zip
opensim-SC_OLD-86a2169d7343825c74ae271f637002377b92b438.tar.gz
opensim-SC_OLD-86a2169d7343825c74ae271f637002377b92b438.tar.bz2
opensim-SC_OLD-86a2169d7343825c74ae271f637002377b92b438.tar.xz
ubitODE + physmanager: - Revised use of ODE collisions categories and bits(flags) for better use as filters together with top spaces (for example physical prims are on topactivespace and not physical are on topstaticspace) - Added new world raycast with filters. This blocks calling thread with a timeout of 500ms waiting for heartbeat ode thread signal job done. - Don't let ode bodies being disabled for 2 long except for vehicles. This is necessary to detect when the object is at rest at top of other and that is removed. Assume that vehicles can be enabled by used action.
Diffstat (limited to 'OpenSim/Region/Physics/Manager')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs6
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs40
2 files changed, 46 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index be67204..b66d7f1 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -172,6 +172,12 @@ namespace OpenSim.Region.Physics.Manager
172 172
173 public virtual bool Phantom { get; set; } 173 public virtual bool Phantom { get; set; }
174 174
175 public virtual bool IsVolumeDtc
176 {
177 get { return false; }
178 set { return; }
179 }
180
175 public virtual byte PhysicsShapeType { get; set; } 181 public virtual byte PhysicsShapeType { get; set; }
176 182
177 public abstract PrimitiveBaseShape Shape { set; } 183 public abstract PrimitiveBaseShape Shape { set; }
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index f2c0c28..d10a2aa 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -43,6 +43,34 @@ namespace OpenSim.Region.Physics.Manager
43 public delegate void JointDeactivated(PhysicsJoint joint); 43 public delegate void JointDeactivated(PhysicsJoint joint);
44 public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation" 44 public delegate void JointErrorMessage(PhysicsJoint joint, string message); // this refers to an "error message due to a problem", not "amount of joint constraint violation"
45 45
46 public enum RayFilterFlags:ushort
47 {
48 // the flags
49 water = 0x01,
50 land = 0x02,
51 agent = 0x04,
52 nonphysical = 0x08,
53 physical = 0x10,
54 phantom = 0x20,
55 volumedtc = 0x40,
56
57 // ray cast colision control (may only work for meshs)
58 BackFaceCull = 0x4000,
59 ClosestHit = 0x8000,
60
61 // some combinations
62 LSLPhanton = phantom | volumedtc,
63 PrimsNonPhantom = nonphysical | physical,
64 PrimsNonPhantomAgents = nonphysical | physical | agent,
65
66 AllPrims = nonphysical | phantom | volumedtc | physical,
67 AllButLand = agent | nonphysical | physical | phantom | volumedtc,
68
69 ClosestAndBackCull = ClosestHit | BackFaceCull,
70
71 All = 0x3f
72 }
73
46 /// <summary> 74 /// <summary>
47 /// Contact result from a raycast. 75 /// Contact result from a raycast.
48 /// </summary> 76 /// </summary>
@@ -54,6 +82,8 @@ namespace OpenSim.Region.Physics.Manager
54 public Vector3 Normal; 82 public Vector3 Normal;
55 } 83 }
56 84
85
86
57 public abstract class PhysicsScene 87 public abstract class PhysicsScene
58 { 88 {
59// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 89// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -280,6 +310,16 @@ namespace OpenSim.Region.Physics.Manager
280 return new List<ContactResult>(); 310 return new List<ContactResult>();
281 } 311 }
282 312
313 public virtual object RaycastWorld(Vector3 position, Vector3 direction, float length, int Count, RayFilterFlags filter)
314 {
315 return null;
316 }
317
318 public virtual bool SuportsRaycastWorldFiltered()
319 {
320 return false;
321 }
322
283 public virtual void RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, RaycastCallback retMethod){} 323 public virtual void RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, RaycastCallback retMethod){}
284 public virtual void RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, int Count, RayCallback retMethod) { } 324 public virtual void RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, int Count, RayCallback retMethod) { }
285 public virtual List<ContactResult> RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, int Count) 325 public virtual List<ContactResult> RaycastActor(PhysicsActor actor, Vector3 position, Vector3 direction, float length, int Count)