aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/OdeScene.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 7b8a80c..ba8cba4 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -3736,6 +3736,34 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
3736 } 3736 }
3737 } 3737 }
3738 3738
3739 public override void RaycastWorld(Vector3 position, Vector3 direction, float length, int Count, RayCallback retMethod)
3740 {
3741 if (retMethod != null)
3742 {
3743 m_rayCastManager.QueueRequest(position, direction, length, Count, retMethod);
3744 }
3745 }
3746
3747 public override List<ContactResult> RaycastWorld(Vector3 position, Vector3 direction, float length, int Count)
3748 {
3749 ContactResult[] ourResults = null;
3750 RayCallback retMethod = delegate(List<ContactResult> results)
3751 {
3752 ourResults = new ContactResult[results.Count];
3753 results.CopyTo(ourResults, 0);
3754 };
3755 int waitTime = 0;
3756 m_rayCastManager.QueueRequest(position, direction, length, Count, retMethod);
3757 while (ourResults == null && waitTime < 1000)
3758 {
3759 Thread.Sleep(1);
3760 waitTime++;
3761 }
3762 if (ourResults == null)
3763 return new List<ContactResult> ();
3764 return new List<ContactResult>(ourResults);
3765 }
3766
3739#if USE_DRAWSTUFF 3767#if USE_DRAWSTUFF
3740 // Keyboard callback 3768 // Keyboard callback
3741 public void command(int cmd) 3769 public void command(int cmd)