aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Framework/Scenes/BinBVHAnimation.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/BinBVHAnimation.cs b/OpenSim/Region/Framework/Scenes/BinBVHAnimation.cs
index 367e8d8..1dd9613 100644
--- a/OpenSim/Region/Framework/Scenes/BinBVHAnimation.cs
+++ b/OpenSim/Region/Framework/Scenes/BinBVHAnimation.cs
@@ -345,6 +345,12 @@ namespace OpenSim.Region.Framework.Scenes
345 // argh! floats into two bytes!.. bad bad bad bad 345 // argh! floats into two bytes!.. bad bad bad bad
346 // After fighting with it for a while.. -1, to 1 seems to give the best results 346 // After fighting with it for a while.. -1, to 1 seems to give the best results
347 rotations = readKeys(data, ref i, rotationkeys, -1f, 1f); 347 rotations = readKeys(data, ref i, rotationkeys, -1f, 1f);
348 for (int iter = 0; iter < rotations.Length; iter++)
349 {
350 rotations[iter].W = 1f -
351 (rotations[iter].key_element.X + rotations[iter].key_element.Y +
352 rotations[iter].key_element.Z);
353 }
348 354
349 355
350 if (!BitConverter.IsLittleEndian) 356 if (!BitConverter.IsLittleEndian)
@@ -481,6 +487,8 @@ namespace OpenSim.Region.Framework.Scenes
481 /// </summary> 487 /// </summary>
482 public Vector3 key_element; 488 public Vector3 key_element;
483 489
490 public float W;
491
484 public void WriteBytesToStream(BinaryWriter iostream, float InPoint, float OutPoint, float min, float max) 492 public void WriteBytesToStream(BinaryWriter iostream, float InPoint, float OutPoint, float min, float max)
485 { 493 {
486 iostream.Write(BinBVHUtil.ES(Utils.UInt16ToBytes(BinBVHUtil.FloatToUInt16(time, InPoint, OutPoint)))); 494 iostream.Write(BinBVHUtil.ES(Utils.UInt16ToBytes(BinBVHUtil.FloatToUInt16(time, InPoint, OutPoint))));