Example #1
0
 private void BuilFaceToLeafMap(FaceToLeafMap faceMap, int i, leaf_t dleaf)
 {
     if (dleaf.first_leaf_face >= 0 && dleaf.num_leaf_faces >= 0)
         for (int j = dleaf.first_leaf_face; j < dleaf.first_leaf_face + dleaf.num_leaf_faces; ++j)
             faceMap.Faces[(int)listOfFaces[j]].AddLeaf(i);
 }
Example #2
0
 private BspTreeLeaf BuildLeaf(leaf_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]);
     //for (int i = dleaf.first_leaf_brush; i < dleaf.first_leaf_brush + dleaf.num_leaf_brushes; ++i)
     //{
     //    BspCollisionObject b = BuildLeafBrush((int)listOfBrushes[i]);
     //    if (b != null)
     //        res.Colliders.Add(b);
     //}
     return res;
 }