using System;
using System.Linq;
using Chernobyl.App.Layout;
using Chernobyl.ComponentModel;
using Chernobyl.Creation;
using Chernobyl.Mathematics;
using Chernobyl.Mathematics.Vectors;
using Task = Chernobyl.ComponentModel.Task;
namespace Chernobyl.App.Visual
{
///
/// Factory for creating the tab that displays the visual.
///
public class VisualFactory : Builder, IFactory
{
/// The method that determines the color of the image at each pixel.
public VisualFactory(Func colorFactory)
{
_colorFactory = colorFactory;
}
///
public Content Create()
{
var view = new VisualViewModel(_colorFactory);
var content = new Content(Enumerable.Empty(), "Visual", view);
ReportCreation(content);
return content;
}
// See constructor param for info.
readonly Func _colorFactory;
}
}