diff options
Diffstat (limited to 'OpenSim/Region/Physics/Manager/PhysicsScene.cs')
-rw-r--r-- | OpenSim/Region/Physics/Manager/PhysicsScene.cs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 13ea084..0de4626 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -37,6 +37,18 @@ namespace OpenSim.Region.Physics.Manager | |||
37 | public delegate void physicsCrash(); | 37 | public delegate void physicsCrash(); |
38 | 38 | ||
39 | public delegate void RaycastCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 normal); | 39 | public delegate void RaycastCallback(bool hitYN, Vector3 collisionPoint, uint localid, float distance, Vector3 normal); |
40 | public delegate void RayCallback(List<ContactResult> list); | ||
41 | |||
42 | /// <summary> | ||
43 | /// Contact result from a raycast. | ||
44 | /// </summary> | ||
45 | public struct ContactResult | ||
46 | { | ||
47 | public Vector3 Pos; | ||
48 | public float Depth; | ||
49 | public uint ConsumerID; | ||
50 | public Vector3 Normal; | ||
51 | } | ||
40 | 52 | ||
41 | public abstract class PhysicsScene | 53 | public abstract class PhysicsScene |
42 | { | 54 | { |
@@ -61,7 +73,6 @@ namespace OpenSim.Region.Physics.Manager | |||
61 | } | 73 | } |
62 | } | 74 | } |
63 | 75 | ||
64 | |||
65 | public abstract void Initialise(IMesher meshmerizer, IConfigSource config); | 76 | public abstract void Initialise(IMesher meshmerizer, IConfigSource config); |
66 | 77 | ||
67 | public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying); | 78 | public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying); |
@@ -225,6 +236,17 @@ namespace OpenSim.Region.Physics.Manager | |||
225 | retMethod(false, Vector3.Zero, 0, 999999999999f, Vector3.Zero); | 236 | retMethod(false, Vector3.Zero, 0, 999999999999f, Vector3.Zero); |
226 | } | 237 | } |
227 | 238 | ||
239 | public virtual void RaycastWorld(Vector3 position, Vector3 direction, float length, int Count, RayCallback retMethod) | ||
240 | { | ||
241 | if (retMethod != null) | ||
242 | retMethod(new List<ContactResult>()); | ||
243 | } | ||
244 | |||
245 | public virtual List<ContactResult> RaycastWorld(Vector3 position, Vector3 direction, float length, int Count) | ||
246 | { | ||
247 | return new List<ContactResult>(); | ||
248 | } | ||
249 | |||
228 | private class NullPhysicsScene : PhysicsScene | 250 | private class NullPhysicsScene : PhysicsScene |
229 | { | 251 | { |
230 | private static int m_workIndicator; | 252 | private static int m_workIndicator; |