public void Set(RenderOptions renderOptions, List <FractalGradient> fractalColours, List <WooFractalIteration> fractalIterations, MaterialSelection materialSelection) { _RenderOptions = renderOptions; _FractalColours = fractalColours; _FractalIterations = fractalIterations; _MaterialSelection = materialSelection; }
public FractalColourControl(FractalGradient fractalColours, MaterialSelection materialSelection) { InitializeComponent(); _FractalColours = fractalColours; _MaterialSelection = materialSelection; SetupGUI(); }
public FractalSettings() { _FractalIterations = new List <WooFractalIteration>(); _RenderOptions = new RenderOptions(); _FractalColours = new List <FractalGradient>(); FractalGradient fractalGradient = new FractalGradient(); _FractalColours.Add(fractalGradient); _MaterialSelection = new MaterialSelection(); }
public void LoadXML(XmlReader reader) { _FractalColours.Clear(); _FractalIterations = new List <WooFractalIteration>(); while (reader.NodeType != XmlNodeType.EndElement && reader.Read()) { if (reader.NodeType == XmlNodeType.Element && reader.Name == "MATERIALSELECTION") { _MaterialSelection = new MaterialSelection(); _MaterialSelection.LoadXML(reader); } if (reader.NodeType == XmlNodeType.Element && reader.Name == "RENDEROPTIONS") { _RenderOptions = new RenderOptions(); _RenderOptions.LoadXML(reader); } if (reader.NodeType == XmlNodeType.Element && reader.Name == "FRACTALCOLOURS") { FractalGradient fractalColour = new FractalGradient(); fractalColour.LoadXML(reader); _FractalColours.Add(fractalColour); } if (reader.NodeType == XmlNodeType.Element && reader.Name == "KIFSFRACTAL") { KIFSIteration fractalIteration = new KIFSIteration(); fractalIteration.LoadXML(reader); _FractalIterations.Add(fractalIteration); } if (reader.NodeType == XmlNodeType.Element && reader.Name == "BULBFRACTAL") { MandelbulbIteration fractalIteration = new MandelbulbIteration(); fractalIteration.LoadXML(reader); _FractalIterations.Add(fractalIteration); } if (reader.NodeType == XmlNodeType.Element && reader.Name == "BOXFRACTAL") { MandelboxIteration fractalIteration = new MandelboxIteration(); fractalIteration.LoadXML(reader); _FractalIterations.Add(fractalIteration); } if (reader.NodeType == XmlNodeType.Element && reader.Name == "KLEINIANGROUP") { KleinianGroupIteration fractalIteration = new KleinianGroupIteration(); fractalIteration.LoadXML(reader); _FractalIterations.Add(fractalIteration); } if (reader.NodeType == XmlNodeType.Element && reader.Name == "BOXFOLD") { BoxfoldIteration fractalIteration = new BoxfoldIteration(); fractalIteration.LoadXML(reader); _FractalIterations.Add(fractalIteration); } } reader.Read(); }
public MaterialEditor(MaterialSelection materialSelection) { InitializeComponent(); _MaterialSelection = materialSelection; _Material = _MaterialSelection._Defaults[0]; _OK = false; ConfigureGUI(); RenderPreview(); }
private void button1_Click(object sender, RoutedEventArgs e) { ((MainWindow)System.Windows.Application.Current.MainWindow).StopPreview(); MaterialEditor ownedWindow = new MaterialEditor(_MaterialSelection); ownedWindow.Owner = Window.GetWindow(this); ownedWindow.ShowDialog(); if (ownedWindow._OK) { _MaterialSelection = ownedWindow._MaterialSelection; ValueUpdated(true); } ((MainWindow)System.Windows.Application.Current.MainWindow).StartPreview(); }
public void GUIUpdate() { _FractalColours.SetOrbitTypeIndex(comboBox2.SelectedIndex); _FractalColours._Multiplier = floatEditor1.GetSliderValue(); _FractalColours._Offset = floatEditor2.GetSliderValue(); _FractalColours._Power = floatEditor3.GetSliderValue(); _FractalColours._GradientSegments[_CurrentSegment]._StartColour = materialSelector1.GetSelectedMaterial(); _FractalColours._GradientSegments[_CurrentSegment]._EndColour = materialSelector2.GetSelectedMaterial(); _MaterialSelection = materialSelector1.GetMaterialSelection(); RenderGradient(); SetCameraDirty(); }
public void Set(MaterialSelection materialSelection, Material material, IGUIUpdateable guiTarget) { _MaterialSelection = materialSelection; _Selected = material; _GUIUpdateTarget = guiTarget; }
public FractalColourControl GetControl(MaterialSelection materialSelection) { return(new FractalColourControl(this, materialSelection)); }