internal bool IntersectsWithTriangle(OctreeNode ot, int triangleIndex) { List <Point> vertices = vertexIndexByTri[triangleIndex].Select(v => this.vertices[v]).ToList(); using (Polygon pol = Polygon.ByPoints(vertices)) { if (!ot.bbox.Intersects(BoundingBox.ByGeometry(pol))) { return(false); } using (Cuboid cube = ot.bbox.ToCuboid()) { return(cube.DoesIntersect(pol)); } } }