aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index d18efe0..bdc7d70 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -361,6 +361,14 @@ namespace OpenSim.Region.ScriptEngine.Shared
361 s = 1; 361 s = 1;
362 } 362 }
363 363
364 public Quaternion(OMV_Quaternion rot)
365 {
366 x = rot.X;
367 y = rot.Y;
368 z = rot.Z;
369 s = rot.W;
370 }
371
364 #endregion 372 #endregion
365 373
366 #region Overriders 374 #region Overriders
@@ -407,6 +415,16 @@ namespace OpenSim.Region.ScriptEngine.Shared
407 return new list(new object[] { r }); 415 return new list(new object[] { r });
408 } 416 }
409 417
418 public static implicit operator OMV_Quaternion(Quaternion rot)
419 {
420 return new OMV_Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
421 }
422
423 public static implicit operator Quaternion(OMV_Quaternion rot)
424 {
425 return new Quaternion(rot);
426 }
427
410 public static bool operator ==(Quaternion lhs, Quaternion rhs) 428 public static bool operator ==(Quaternion lhs, Quaternion rhs)
411 { 429 {
412 // Return true if the fields match: 430 // Return true if the fields match: