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

Comparing ray/src/rt/RtraceSimulManager.h (file contents):
Revision 2.17 by greg, Wed Nov 13 02:43:51 2024 UTC vs.
Revision 2.20 by greg, Mon Dec 16 20:18:36 2024 UTC

# Line 138 | Line 138 | class RtraceSimulManager : public RadSimulManager { (p
138                                          cookedCall = cb;
139                                          ccData = cb ? cd : NULL;
140                                  }
141 <                                /// Set/change trace callback (before threading)
141 >                                /// Set/change trace callback
142          void                    SetTraceCall(RayReportCall *cb, void *cd = NULL) {
143 +                                        if ((cb == traceCall) & (cd == tcData)) return;
144 +                                        int     nt = NThreads();
145 +                                        if (nt > 1) SetThreadCount(1);
146                                          traceCall = cb;
147                                          tcData = cb ? cd : NULL;
148 <                                }
149 <                                /// Are we ready?
147 <        bool                    Ready() const {
148 <                                        return (cookedCall != NULL) | (traceCall != NULL) &&
149 <                                                RadSimulManager::Ready();
148 >                                        UpdateMode();
149 >                                        if (nt > 1) SetThreadCount(nt);
150                                  }
151                                  /// Finish pending rays and complete callbacks (return #sent)
152          int                     FlushQueue();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines