aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/InnerScene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/InnerScene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 38a8a06..8f7cbee 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -253,6 +253,33 @@ namespace OpenSim.Region.Environment.Scenes
253 return null; 253 return null;
254 } 254 }
255 255
256 public EntityIntersection GetClosestIntersectingPrim(Ray hray)
257 {
258 // Primitive Ray Tracing
259 bool gothit = false;
260 float closestDistance = 280f;
261 EntityIntersection returnResult = new EntityIntersection();
262 foreach (EntityBase ent in Entities.Values)
263 {
264 if (ent is SceneObjectGroup)
265 {
266 SceneObjectGroup reportingG = (SceneObjectGroup)ent;
267 EntityIntersection result = reportingG.testIntersection(hray);
268 if (result.HitTF)
269 {
270 if (result.distance < closestDistance)
271 {
272 gothit = true;
273 closestDistance = result.distance;
274 returnResult = result;
275 }
276 }
277 }
278
279 }
280 return returnResult;
281 }
282
256 public SceneObjectPart GetSceneObjectPart(uint localID) 283 public SceneObjectPart GetSceneObjectPart(uint localID)
257 { 284 {
258 SceneObjectGroup group = GetGroupByPrim(localID); 285 SceneObjectGroup group = GetGroupByPrim(localID);