VeBox.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #region License information
  2. // ----------------------------------------------------------------------------
  3. //
  4. // libeq2 - A library for analyzing the Everquest II File Format
  5. // Blaz (blaz@blazlabs.com)
  6. //
  7. // This program is free software; you can redistribute it and/or
  8. // modify it under the terms of the GNU General Public License
  9. // as published by the Free Software Foundation; either version 2
  10. // of the License, or (at your option) any later version.
  11. //
  12. // This program is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. // GNU General Public License for more details.
  16. //
  17. // You should have received a copy of the GNU General Public License
  18. // along with this program; if not, write to the Free Software
  19. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  20. //
  21. // ( The full text of the license can be found in the License.txt file )
  22. //
  23. // ----------------------------------------------------------------------------
  24. #endregion
  25. #region Using directives
  26. using System;
  27. using System.Collections.Generic;
  28. #endregion
  29. namespace Everquest2.Visualization
  30. {
  31. public class VeBox : VeVolume
  32. {
  33. public VeBox()
  34. {
  35. }
  36. /// <summary>
  37. /// Special constructor used when deserializing the instance of the class.
  38. /// </summary>
  39. /// <param name="reader">Reader used to read the instance data.</param>
  40. protected VeBox(Util.Eq2Reader reader, Util.StreamingContext context) : base(reader, context)
  41. {
  42. byte classVersion = context.ClassVersions[typeof(VeBox)];
  43. minPoint[0] = reader.ReadSingle();
  44. minPoint[1] = reader.ReadSingle();
  45. minPoint[2] = reader.ReadSingle();
  46. maxPoint[0] = reader.ReadSingle();
  47. maxPoint[1] = reader.ReadSingle();
  48. maxPoint[2] = reader.ReadSingle();
  49. if (classVersion == 0)
  50. {
  51. unk2[0] = reader.ReadSingle();
  52. unk2[1] = reader.ReadSingle();
  53. unk2[2] = reader.ReadSingle();
  54. }
  55. }
  56. public float[] minPoint = new float[3];
  57. public float[] maxPoint = new float[3];
  58. public float[] unk2 = new float[3];
  59. }
  60. }