aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Animation
diff options
context:
space:
mode:
authorMelanie Thielker2017-01-05 19:07:37 +0000
committerMelanie Thielker2017-01-05 19:07:37 +0000
commitb16abc8166c29585cb76cc55c3bdd76e5833cb4f (patch)
tree6a34f465a74b7a3a6dc00a3d7aa8dcc25ac3e3a5 /OpenSim/Region/Framework/Scenes/Animation
parentMake it possible to disable the bakes module in the way it is described in co... (diff)
downloadopensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.zip
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.gz
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.bz2
opensim-SC-b16abc8166c29585cb76cc55c3bdd76e5833cb4f.tar.xz
Massive tab and trailing space cleanup
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs18
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs40
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs6
4 files changed, 33 insertions, 33 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index eb1a970..4d350dd 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -48,16 +48,16 @@ namespace OpenSim.Region.Framework.Scenes.Animation
48 private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation(); 48 private OpenSim.Framework.Animation m_defaultAnimation = new OpenSim.Framework.Animation();
49 private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>(); 49 private List<OpenSim.Framework.Animation> m_animations = new List<OpenSim.Framework.Animation>();
50 50
51 public OpenSim.Framework.Animation DefaultAnimation 51 public OpenSim.Framework.Animation DefaultAnimation
52 { 52 {
53 get { return m_defaultAnimation; } 53 get { return m_defaultAnimation; }
54 } 54 }
55 55
56 public OpenSim.Framework.Animation ImplicitDefaultAnimation 56 public OpenSim.Framework.Animation ImplicitDefaultAnimation
57 { 57 {
58 get { return m_implicitDefaultAnimation; } 58 get { return m_implicitDefaultAnimation; }
59 } 59 }
60 60
61 public AnimationSet() 61 public AnimationSet()
62 { 62 {
63 ResetDefaultAnimation(); 63 ResetDefaultAnimation();
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
101 /// </summary> 101 /// </summary>
102 /// <param name='animID'></param> 102 /// <param name='animID'></param>
103 /// <param name='allowNoDefault'> 103 /// <param name='allowNoDefault'>
104 /// If true, then the default animation can be entirely removed. 104 /// If true, then the default animation can be entirely removed.
105 /// If false, then removing the default animation will reset it to the simulator default (currently STAND). 105 /// If false, then removing the default animation will reset it to the simulator default (currently STAND).
106 /// </param> 106 /// </param>
107 public bool Remove(UUID animID, bool allowNoDefault) 107 public bool Remove(UUID animID, bool allowNoDefault)
@@ -215,9 +215,9 @@ namespace OpenSim.Region.Framework.Scenes.Animation
215 foreach (OpenSim.Framework.Animation anim in m_animations) 215 foreach (OpenSim.Framework.Animation anim in m_animations)
216 theArray[i++] = anim; 216 theArray[i++] = anim;
217 } 217 }
218 catch 218 catch
219 { 219 {
220 /* S%^t happens. Ignore. */ 220 /* S%^t happens. Ignore. */
221 } 221 }
222 return theArray; 222 return theArray;
223 } 223 }
diff --git a/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs b/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs
index b3b38b2..def993f 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/BinBVHAnimation.cs
@@ -33,8 +33,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
33{ 33{
34 /// <summary> 34 /// <summary>
35 /// Written to decode and encode a binary animation asset. 35 /// Written to decode and encode a binary animation asset.
36 /// The SecondLife Client reads in a BVH file and converts 36 /// The SecondLife Client reads in a BVH file and converts
37 /// it to the format described here. This isn't 37 /// it to the format described here. This isn't
38 /// </summary> 38 /// </summary>
39 public class BinBVHAnimation 39 public class BinBVHAnimation
40 { 40 {
@@ -109,7 +109,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
109 /// Contains an array of joints 109 /// Contains an array of joints
110 /// </summary> 110 /// </summary>
111 public binBVHJoint[] Joints; 111 public binBVHJoint[] Joints;
112 112
113 113
114 public byte[] ToBytes() 114 public byte[] ToBytes()
115 { 115 {
@@ -136,14 +136,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation
136 Joints[i].WriteBytesToStream(iostream, InPoint, OutPoint); 136 Joints[i].WriteBytesToStream(iostream, InPoint, OutPoint);
137 } 137 }
138 iostream.Write(BinBVHUtil.ES(Utils.IntToBytes(0))); 138 iostream.Write(BinBVHUtil.ES(Utils.IntToBytes(0)));
139 139
140 using (MemoryStream ms2 = (MemoryStream)iostream.BaseStream) 140 using (MemoryStream ms2 = (MemoryStream)iostream.BaseStream)
141 outputbytes = ms2.ToArray(); 141 outputbytes = ms2.ToArray();
142 } 142 }
143 143
144 return outputbytes; 144 return outputbytes;
145 } 145 }
146 146
147 public BinBVHAnimation() 147 public BinBVHAnimation()
148 { 148 {
149 rotationkeys = 0; 149 rotationkeys = 0;
@@ -160,7 +160,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
160 EaseOutTime = 0; 160 EaseOutTime = 0;
161 HandPose = 1; 161 HandPose = 1;
162 m_jointCount = 0; 162 m_jointCount = 0;
163 163
164 Joints = new binBVHJoint[1]; 164 Joints = new binBVHJoint[1];
165 Joints[0] = new binBVHJoint(); 165 Joints[0] = new binBVHJoint();
166 Joints[0].Name = "mPelvis"; 166 Joints[0].Name = "mPelvis";
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
180 Joints[0].positionkeys[0].key_element.X = ((float)rnd.NextDouble() * 2 - 1); 180 Joints[0].positionkeys[0].key_element.X = ((float)rnd.NextDouble() * 2 - 1);
181 Joints[0].positionkeys[0].key_element.Y = ((float)rnd.NextDouble() * 2 - 1); 181 Joints[0].positionkeys[0].key_element.Y = ((float)rnd.NextDouble() * 2 - 1);
182 Joints[0].positionkeys[0].key_element.Z = ((float)rnd.NextDouble() * 2 - 1); 182 Joints[0].positionkeys[0].key_element.Z = ((float)rnd.NextDouble() * 2 - 1);
183 183
184 184
185 } 185 }
186 186
@@ -235,7 +235,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
235 } 235 }
236 } 236 }
237 237
238 238
239 /// <summary> 239 /// <summary>
240 /// Variable length strings seem to be null terminated in the animation asset.. but.. 240 /// Variable length strings seem to be null terminated in the animation asset.. but..
241 /// use with caution, home grown. 241 /// use with caution, home grown.
@@ -294,7 +294,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
294 /// <returns>The Joint data serialized into the binBVHJoint structure</returns> 294 /// <returns>The Joint data serialized into the binBVHJoint structure</returns>
295 private binBVHJoint readJoint(byte[] data, ref int i) 295 private binBVHJoint readJoint(byte[] data, ref int i)
296 { 296 {
297 297
298 binBVHJointKey[] positions; 298 binBVHJointKey[] positions;
299 binBVHJointKey[] rotations; 299 binBVHJointKey[] rotations;
300 300
@@ -312,14 +312,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation
312 312
313 pJoint.Name = ReadBytesUntilNull(data, ref i); // Joint name 313 pJoint.Name = ReadBytesUntilNull(data, ref i); // Joint name
314 314
315 /* 315 /*
316 2 <- Priority Revisited 316 2 <- Priority Revisited
317 0 317 0
318 0 318 0
319 0 319 0
320 */ 320 */
321 321
322 /* 322 /*
323 5 <-- 5 keyframes 323 5 <-- 5 keyframes
324 0 324 0
325 0 325 0
@@ -327,7 +327,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
327 ... 5 Keyframe data blocks 327 ... 5 Keyframe data blocks
328 */ 328 */
329 329
330 /* 330 /*
331 2 <-- 2 keyframes 331 2 <-- 2 keyframes
332 0 332 0
333 0 333 0
@@ -428,8 +428,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
428 } 428 }
429 return m_keys; 429 return m_keys;
430 } 430 }
431 431
432 432
433 433
434 } 434 }
435 /// <summary> 435 /// <summary>
@@ -443,7 +443,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
443 public string Name; 443 public string Name;
444 444
445 /// <summary> 445 /// <summary>
446 /// Joint Animation Override? Was the same as the Priority in testing.. 446 /// Joint Animation Override? Was the same as the Priority in testing..
447 /// </summary> 447 /// </summary>
448 public int Priority; 448 public int Priority;
449 449
@@ -523,7 +523,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
523 public static class BinBVHUtil 523 public static class BinBVHUtil
524 { 524 {
525 public const float ONE_OVER_U16_MAX = 1.0f / UInt16.MaxValue; 525 public const float ONE_OVER_U16_MAX = 1.0f / UInt16.MaxValue;
526 526
527 public static UInt16 FloatToUInt16(float val, float lower, float upper) 527 public static UInt16 FloatToUInt16(float val, float lower, float upper)
528 { 528 {
529 UInt16 uival = 0; 529 UInt16 uival = 0;
@@ -536,7 +536,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
536 { 536 {
537 upper -= lower; 537 upper -= lower;
538 val = val - lower; 538 val = val - lower;
539 539
540 // start with 500 upper and 200 lower.. subtract 200 from the upper and the value 540 // start with 500 upper and 200 lower.. subtract 200 from the upper and the value
541 } 541 }
542 else //if (lower < 0 && upper > 0) 542 else //if (lower < 0 && upper > 0)
@@ -558,8 +558,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
558 558
559 return uival; 559 return uival;
560 } 560 }
561 561
562 562
563 /// <summary> 563 /// <summary>
564 /// Endian Swap 564 /// Endian Swap
565 /// Swaps endianness if necessary 565 /// Swaps endianness if necessary
@@ -590,7 +590,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
590 output[i] = Convert.ToByte(chr[i]); 590 output[i] = Convert.ToByte(chr[i]);
591 591
592 } 592 }
593 593
594 output[i] = Convert.ToByte('\0'); 594 output[i] = Convert.ToByte('\0');
595 return output; 595 return output;
596 } 596 }
diff --git a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs
index b79dd8f..b8db3a9 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/DefaultAvatarAnimations.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
55 private static void LoadAnimations(string path) 55 private static void LoadAnimations(string path)
56 { 56 {
57// Dictionary<string, UUID> animations = new Dictionary<string, UUID>(); 57// Dictionary<string, UUID> animations = new Dictionary<string, UUID>();
58 58
59 using (XmlTextReader reader = new XmlTextReader(path)) 59 using (XmlTextReader reader = new XmlTextReader(path))
60 { 60 {
61 XmlDocument doc = new XmlDocument(); 61 XmlDocument doc = new XmlDocument();
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index 13d4562..6b31555 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
123 /// </summary> 123 /// </summary>
124 /// <param name='animID'></param> 124 /// <param name='animID'></param>
125 /// <param name='allowNoDefault'> 125 /// <param name='allowNoDefault'>
126 /// If true, then the default animation can be entirely removed. 126 /// If true, then the default animation can be entirely removed.
127 /// If false, then removing the default animation will reset it to the simulator default (currently STAND). 127 /// If false, then removing the default animation will reset it to the simulator default (currently STAND).
128 /// </param> 128 /// </param>
129 public void RemoveAnimation(UUID animID, bool allowNoDefault) 129 public void RemoveAnimation(UUID animID, bool allowNoDefault)
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
192 /// that are mutually exclusive, e.g. flying and sitting. 192 /// that are mutually exclusive, e.g. flying and sitting.
193 /// </summary> 193 /// </summary>
194 /// <returns>'true' if the animation was updated</returns> 194 /// <returns>'true' if the animation was updated</returns>
195 /// 195 ///
196 196
197 197
198 198
@@ -488,7 +488,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
488 m_animTickLand = Environment.TickCount; 488 m_animTickLand = Environment.TickCount;
489 // TODO: SOFT_LAND support 489 // TODO: SOFT_LAND support
490 float fallVsq = m_lastFallVelocity * m_lastFallVelocity; 490 float fallVsq = m_lastFallVelocity * m_lastFallVelocity;
491 if (fallVsq > 300f) // aprox 20*h 491 if (fallVsq > 300f) // aprox 20*h
492 return "STANDUP"; 492 return "STANDUP";
493 else if (fallVsq > 160f) 493 else if (fallVsq > 160f)
494 return "SOFT_LAND"; 494 return "SOFT_LAND";