2018-01-31 21:09:08 -06:00
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
using ACE.Entity.Enum;
|
2017-09-15 08:22:51 -07:00
|
|
|
|
|
|
|
|
namespace ACE.DatLoader.Entity
|
|
|
|
|
{
|
2018-01-31 21:09:08 -06:00
|
|
|
public class BSPTree : IUnpackable
|
2017-09-15 08:22:51 -07:00
|
|
|
{
|
2018-01-31 21:09:08 -06:00
|
|
|
public BSPNode RootNode { get; private set; } = new BSPNode();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// You must use the Unpack(BinaryReader reader, BSPType treeType) method.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <exception cref="NotSupportedException">You must use the Unpack(BinaryReader reader, BSPType treeType) method.</exception>
|
|
|
|
|
public void Unpack(BinaryReader reader)
|
|
|
|
|
{
|
|
|
|
|
throw new NotSupportedException();
|
|
|
|
|
}
|
2017-09-15 08:22:51 -07:00
|
|
|
|
2018-01-31 21:09:08 -06:00
|
|
|
public void Unpack(BinaryReader reader, BSPType treeType)
|
2017-09-15 08:22:51 -07:00
|
|
|
{
|
2018-01-31 21:09:08 -06:00
|
|
|
RootNode = BSPNode.ReadNode(reader, treeType);
|
2017-09-15 08:22:51 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|