diff options
author | Teravus Ovares | 2008-03-25 16:09:43 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-03-25 16:09:43 +0000 |
commit | 3d1b4f8578e4dc3df0436c1c13f1b2983d3b55e7 (patch) | |
tree | 0e6e421b696c94a8331c99782259ebce5a7b92d7 /OpenSim/Region/Environment | |
parent | * Refactored out circular reference in Region.Environment <-> Framework.Data.... (diff) | |
download | opensim-SC_OLD-3d1b4f8578e4dc3df0436c1c13f1b2983d3b55e7.zip opensim-SC_OLD-3d1b4f8578e4dc3df0436c1c13f1b2983d3b55e7.tar.gz opensim-SC_OLD-3d1b4f8578e4dc3df0436c1c13f1b2983d3b55e7.tar.bz2 opensim-SC_OLD-3d1b4f8578e4dc3df0436c1c13f1b2983d3b55e7.tar.xz |
* On Ray casting. Now returning the face normal of the collision face.
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/EntityBase.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EntityBase.cs b/OpenSim/Region/Environment/Scenes/EntityBase.cs index 713b205..c6a5b29 100644 --- a/OpenSim/Region/Environment/Scenes/EntityBase.cs +++ b/OpenSim/Region/Environment/Scenes/EntityBase.cs | |||
@@ -228,7 +228,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
228 | public class EntityIntersection | 228 | public class EntityIntersection |
229 | { | 229 | { |
230 | public Vector3 ipoint = new Vector3(0, 0, 0); | 230 | public Vector3 ipoint = new Vector3(0, 0, 0); |
231 | public float normal = 0; | 231 | public Vector3 normal = new Vector3(0, 0, 0); |
232 | public bool HitTF = false; | 232 | public bool HitTF = false; |
233 | public SceneObjectPart obj; | 233 | public SceneObjectPart obj; |
234 | public float distance = 0; | 234 | public float distance = 0; |
@@ -237,7 +237,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
237 | { | 237 | { |
238 | } | 238 | } |
239 | 239 | ||
240 | public EntityIntersection(Vector3 _ipoint, float _normal, bool _HitTF) | 240 | public EntityIntersection(Vector3 _ipoint, Vector3 _normal, bool _HitTF) |
241 | { | 241 | { |
242 | ipoint = _ipoint; | 242 | ipoint = _ipoint; |
243 | normal = _normal; | 243 | normal = _normal; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 2c65a8f..acb2588 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -953,7 +953,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
953 | 953 | ||
954 | // Normal is calculated by the difference and then normalizing the result | 954 | // Normal is calculated by the difference and then normalizing the result |
955 | Vector3 normalpart = ipoint - vAbsolutePosition; | 955 | Vector3 normalpart = ipoint - vAbsolutePosition; |
956 | returnresult.normal = normalpart.Normalize(); | 956 | returnresult.normal = normalpart / normalpart.Length; |
957 | 957 | ||
958 | // It's funny how the LLVector3 object has a Distance function, but the Axiom.Math object doesnt. | 958 | // It's funny how the LLVector3 object has a Distance function, but the Axiom.Math object doesnt. |
959 | // I can write a function to do it.. but I like the fact that this one is Static. | 959 | // I can write a function to do it.. but I like the fact that this one is Static. |
@@ -1261,7 +1261,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1261 | returnresult.HitTF = true; | 1261 | returnresult.HitTF = true; |
1262 | returnresult.ipoint = q; | 1262 | returnresult.ipoint = q; |
1263 | //m_log.Info("[POINT]: " + q.ToString()); | 1263 | //m_log.Info("[POINT]: " + q.ToString()); |
1264 | returnresult.normal = 1; | 1264 | returnresult.normal = normals[i]; |
1265 | 1265 | ||
1266 | } | 1266 | } |
1267 | } | 1267 | } |