/// <summary> /// End the trace by setting it no longer alive (and make the next cycle void) ending the trace at a given location. /// The trace is stored at the tracejournal as: /// * trace /// * casualty (via the perishQuietly method) /// </summary> /// <param name="perishlocation">The location where the current trace is ended.</param> public void perish(Scientrace.Location perish_location) { this.endloc = perish_location; Scientrace.TraceJournal tj = TraceJournal.Instance; tj.recordTrace(this); this.perishQuietly(); }
public void addObjectRevenues() { Scientrace.TraceJournal tj = Scientrace.TraceJournal.Instance; foreach (PhysicalObject3d o3d in tj.registeredPerformanceObjects) { this.objectRevenues.Add(o3d, o3d.getRevenue()); o3d.flushRevenue(); } }
public string spotSVGForWavelength(Scientrace.Vector location, double radius, double wavelength, double opacity) { Scientrace.TraceJournal tj = TraceJournal.Instance; return(@"<g> <circle cx='" + location.x + "' cy='" + location.y + "' r='" + radius + "' style='" + "fill:" + tj.wavelengthToRGB(wavelength) + ";fill-opacity:" + opacity + @";stroke:none'> <title>" + wavelength + @"nm</title> </circle> </g>"); }
public void setTraceJournalProperties(XElement xconfig) { Scientrace.TraceJournal tj = Scientrace.TraceJournal.Instance; long ticks = (DateTime.UtcNow.Ticks - DateTime.Parse("01/01/1970 00:00:00").Ticks) / 10000000; string timestamp = ticks.ToString(); tj.config_id = this.X.getXString(xconfig.Attribute("ConfigID"), "g" + timestamp); Scientrace.Trace.support_polarisation = this.X.getXBool(xconfig, "PolarisationSupport", //default language UK English, but also check US English for def. val. this.X.getXBool(xconfig, "PolarizationSupport", true)); if (this.X.hasAttribute(xconfig, "ConfigDescription")) { //Console.WriteLine("Config_ID: "+this.X.getXString(xconfig.Attribute("ConfigID"))); tj.config_description = this.X.getXString(xconfig.Attribute("ConfigDescription")); } if (this.X.hasAttribute(xconfig, "TimeStamp")) { tj.timestamp = this.X.getXString(xconfig.Attribute("TimeStamp")); } }
/// <summary> /// End the trace by setting it no longer alive and thereby making the next cycle void. /// The trace is stored at the tracejournal as: /// * casualty /// To also store the trace as a recorded trace, use the "perish(perish_location)" method. /// </summary> public void perishQuietly() { this.alive = false; Scientrace.TraceJournal tj = TraceJournal.Instance; tj.recordCasualty(new Spot(this.endloc, this.currentObject, this.intensity, this.intensityFraction(), this)); }
public TraceJournalExportable(TraceJournal aTraceJournal) { this.tj = aTraceJournal; }