private void SaveContextInternal(string filename) { using (StreamWriter sw = new StreamWriter(filename)) { try { XElement context = new XElement("CONTEXT"); context.Add(_Scene.CreateElement()); context.Add(_RaytracerOptions.CreateElement()); sw.Write(context.ToString()); sw.Close(); } catch (Exception /*e*/) { // lets not get overexcited... } } }
private string BuildXML(bool preview) { bool pt = _Scene._PathTracer; _Scene._PathTracer = false; string XML = @" <VIEWPORT width=" + image1.Width + @" height=" + image1.Height + @"/>"; Camera previewCamera = new Camera(_Camera._Position, _Camera._Target, _Camera._FOV, _Camera._Spherical, _Camera._Stereographic); previewCamera._AAEnabled = true;// false; previewCamera._DOFEnabled = false; XML += previewCamera.CreateElement().ToString(); XML += _Scene.CreateElement(preview, false).ToString(); _Scene._PathTracer = pt; _CameraDirty = false; return(XML); }
private void BuildXML() { _XML = @"<VIEWPORT width=" + image1.Width + @" height=" + image1.Height + @"/>"; _XML += _Camera.CreateElement().ToString(); _XML += _Scene.CreateElement(false, false).ToString(); }