aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs19
1 files changed, 14 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 8038a83..24fc484 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -358,17 +358,27 @@ namespace OpenSim.Region.Environment.Scenes
358 } 358 }
359 } 359 }
360 360
361 public EntityIntersection testIntersection(Ray hRay) 361 public EntityIntersection TestIntersection(Ray hRay)
362 { 362 {
363 // We got a request from the inner_scene to raytrace along the Ray hRay
364 // We're going to check all of the prim in this group for intersection with the ray
365 // If we get a result, we're going to find the closest result to the origin of the ray
366 // and send back the intersection information back to the innerscene.
367
363 EntityIntersection returnresult = new EntityIntersection(); 368 EntityIntersection returnresult = new EntityIntersection();
364 bool gothit = false; 369
365 foreach (SceneObjectPart part in m_parts.Values) 370 foreach (SceneObjectPart part in m_parts.Values)
366 { 371 {
367 SceneObjectPart returnThisPart = null; 372
368 Vector3 partPosition = new Vector3(part.AbsolutePosition.X,part.AbsolutePosition.Y,part.AbsolutePosition.Z); 373 Vector3 partPosition = new Vector3(part.AbsolutePosition.X,part.AbsolutePosition.Y,part.AbsolutePosition.Z);
369 Quaternion parentrotation = new Quaternion(GroupRotation.W,GroupRotation.X,GroupRotation.Y,GroupRotation.Z); 374 Quaternion parentrotation = new Quaternion(GroupRotation.W,GroupRotation.X,GroupRotation.Y,GroupRotation.Z);
370 EntityIntersection inter = part.testIntersection(hRay,parentrotation); 375
376 // Telling the prim to raytrace.
377 EntityIntersection inter = part.TestIntersection(hRay,parentrotation);
371 378
379 // This may need to be updated to the maximum draw distance possible..
380 // We might (and probably will) be checking for prim creation from other sims
381 // when the camera crosses the border.
372 float idist = 256f; 382 float idist = 256f;
373 383
374 384
@@ -384,7 +394,6 @@ namespace OpenSim.Region.Environment.Scenes
384 returnresult.obj = part; 394 returnresult.obj = part;
385 returnresult.normal = inter.normal; 395 returnresult.normal = inter.normal;
386 returnresult.distance = inter.distance; 396 returnresult.distance = inter.distance;
387 gothit = true;
388 } 397 }
389 } 398 }
390 399