Exemple #1
0
 private void BuilFaceToLeafMap(FaceToLeafMap faceMap, int i, dleaf_t dleaf)
 {
     if (dleaf.numleaffaces >= 0 && dleaf.firstleafface >= 0 && dleaf.firstleafface != ushort.MaxValue)
         for (int j = dleaf.firstleafface; j < dleaf.firstleafface + dleaf.numleaffaces; ++j)
             faceMap.Faces[(int)listOfFaces[j]].AddLeaf(i);
 }
Exemple #2
0
        private BspTreeLeaf BuildLeaf(dleaf_t dleaf)
        {
            var res = new BspTreeLeaf();
            res.Mins = new Vector3(dleaf.box.mins[0], dleaf.box.mins[1], dleaf.box.mins[2]);
            res.Maxs = new Vector3(dleaf.box.maxs[0], dleaf.box.maxs[1], dleaf.box.maxs[2]);

            //if (dleaf.firstleafface != ushort.MaxValue)
            //	res.Geometries.Add(BuildGeometry(dleaf.firstleafface, dleaf.numleaffaces));
            return res;
        }