Esempio n. 1
0
 public BSPTree(short rootId, BSPNode[] nodes)
 {
     this.rootId = rootId;
     this.nodes = nodes;
 }
Esempio n. 2
0
        static void ReadMOBN(BinaryReader file, WMOGroup group, uint size)
        {
            uint count = size/0x10;

            group.BSPNodes = new BSPNode[count];
            for (var i=0;i<count;i++)
            {
                var node = new BSPNode
                               {
                                   flags = (BSPNodeFlags) file.ReadUInt16(),
                                   negChild = file.ReadInt16(),
                                   posChild = file.ReadInt16(),
                                   nFaces = file.ReadUInt16(),
                                   faceStart = file.ReadUInt32(),
                                   planeDist = file.ReadSingle()
                               };

                group.BSPNodes[i] = node;
            }
        }