private void addToDisplayList(List <IObject> displayList, IObject obj, IViewport viewport) { if (!viewport.IsObjectVisible(obj)) { return; } displayList.Add(obj); }
private void addToDisplayList(ViewportDisplayList displayList, IObject obj, IViewport viewport) { if (!viewport.IsObjectVisible(obj)) { return; } var layer = displayList.DisplayListPerLayer.GetOrAdd(obj?.RenderLayer?.Z ?? 0, _ => new LayerDisplayList(_comparer)); if (!layer.IsDirty) { return; } layer.Items.Add(obj); }