ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/RcontribSimulManager.h
(Generate patch)

Comparing ray/src/rt/RcontribSimulManager.h (file contents):
Revision 2.6 by greg, Wed Nov 6 19:45:59 2024 UTC vs.
Revision 2.8 by greg, Tue Dec 3 17:39:42 2024 UTC

# Line 141 | Line 141 | extern lut_free_t      FreeRcMod;
141   * may be recalculated.  The previous output rows are not zeroed or deleted,
142   * but are overwritten as the calculation proceeds from the new starting point.
143   * However, the output file(s) will indicate in the NROWS= line in the header
144 < * that only the newly calculated rows are present.
144 > * that only the newly calculated rows are present.  If you wish to start over
145 > * with a different set of modifiers or outputs, call ClearModifiers() instead,
146 > * which keeps the current octree in memory.  This call also returns to single
147 > * process mode if any children were running.
148   *
149   * It is not possible to write to standard output, but the output
150   * model is quite flexible thanks to the RdataShare polymorphic class.
# Line 212 | Line 215 | class RcontribSimulManager : protected RtraceSimulMana
215                                          accum = 1;
216                                  }
217                                  ~RcontribSimulManager() {
218 <                                        Cleanup();
218 >                                        if (nkids >= 0) ClearModifiers();
219                                  }
220                                  /// Check modifiable ray-tracing computation flag(s)
221          bool                    HasFlag(int fl) const {
# Line 305 | Line 308 | class RcontribSimulManager : protected RtraceSimulMana
308                                                  return rowsDone.Length();
309                                          return nDone;
310                                  }
308                                /// Rewind calculation (previous results unchanged)
309        bool                    ResetRow(int r);
311                                  /// Add a ray/bundle to compute next record (n=accum)
312          int                     ComputeRecord(const FVECT orig_direc[]);
313                                  /// Finish pending rays if multi-processing
# Line 316 | Line 317 | class RcontribSimulManager : protected RtraceSimulMana
317                                                  ;
318                                          return true;
319                                  }
320 <                                /// Close octree, free data, return status
321 <        int                     Cleanup(bool everything = false) {
322 <                                        if (nkids < 0) return 0;        // skip 4 child
320 >                                /// Rewind calculation (previous results unchanged)
321 >        bool                    ResetRow(int r);
322 >                                /// Clear the modifiers and close all outputs
323 >        void                    ClearModifiers() {
324                                          if (rowsDone.Length()) {
325                                                  SetThreadCount(1);
326                                                  cow_doneshare();
# Line 327 | Line 329 | class RcontribSimulManager : protected RtraceSimulMana
329                                          lu_done(&modLUT);
330                                          delete outList; outList = NULL;
331                                          nChan = 0;
332 +                                }
333 +                                /// Close octree, free data, return status
334 +        int                     Cleanup(bool everything = false) {
335 +                                        ClearModifiers();
336                                          return RtraceSimulManager::Cleanup(everything);
337                                  }
338   };
339 +
340 + extern const char *     formstr(int f);         // string from format
341  
342   #endif /* RcontribSimulManager_h */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines