diff options
author | Melanie | 2012-04-17 01:50:49 +0100 |
---|---|---|
committer | Melanie | 2012-04-17 01:50:49 +0100 |
commit | ab1a3688e24db08071f74c9804d552d5763bbeb2 (patch) | |
tree | 030bafc8ce646fbf80bd20a1e7647618222e7fc2 /OpenSim/Region/Physics/Manager | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'ubitwork' (diff) | |
download | opensim-SC-ab1a3688e24db08071f74c9804d552d5763bbeb2.zip opensim-SC-ab1a3688e24db08071f74c9804d552d5763bbeb2.tar.gz opensim-SC-ab1a3688e24db08071f74c9804d552d5763bbeb2.tar.bz2 opensim-SC-ab1a3688e24db08071f74c9804d552d5763bbeb2.tar.xz |
Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster
Diffstat (limited to 'OpenSim/Region/Physics/Manager')
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsActor.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsScene.cs | 40 |
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) |