protected override bool ThroughTriangle(FrustumParams data) { SelectedSubItems.Sort(); //if selection filter is ByPick/VisibleByPick selects only the first triangle if (vp.firstOnlyInternal && !vp.processVisibleOnly && SelectedSubItems.Count > 0) { return(false); } bool through = false; for (int i = 0; i < Triangles.Length; i++) { if (SelectedSubItems.BinarySearch(i) >= 0) { continue; } if (ThroughTriangle(data, GetTriangleVertices(Triangles[i]))) { SelectedSubItems.Add(i); through = true; if (vp.firstOnlyInternal && !vp.processVisibleOnly) { return(true); } } } return(through); }
protected override bool ThroughTriangleScreenPolygon(ScreenPolygonParams data) { SelectedSubItems.Sort(); for (int i = 0; i < Triangles.Length; i++) { if (SelectedSubItems.BinarySearch(i) >= 0) { continue; } var verts = GetTriangleVertices(Triangles[i]); if (ThroughTriangleScreenPolygon(verts[0], verts[1], verts[2], data)) { SelectedSubItems.Add(i); } } return(false); }