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

Comparing ray/src/rt/RtraceSimulManager.cpp (file contents):
Revision 2.22 by greg, Wed Nov 13 02:43:51 2024 UTC vs.
Revision 2.24 by greg, Wed Nov 20 17:46:25 2024 UTC

# Line 181 | Line 181 | RadSimulManager::GetNCores()
181   int
182   RadSimulManager::SetThreadCount(int nt)
183   {
184 <        if (!Ready())
185 <                return 0;
184 >        if (!Ready()) return 0;
185  
186          if (nt <= 0) nt = castonly ? 1 : GetNCores();
187  
# Line 200 | Line 199 | RadSimulManager::SetThreadCount(int nt)
199   int
200   RadSimulManager::ProcessRay(RAY *r)
201   {
202 <        if (!Ready()) return false;
202 >        if (!Ready()) return -1;
203  
204          if (!ray_pnprocs) {     // single-threaded mode?
205                  samplendx++;
# Line 316 | Line 315 | extern "C" int m_normal(OBJREC *m, RAY *r);
315   static void
316   rayirrad(RAY *r)
317   {
318 <                                        /* pretend we hit surface */
319 <        r->rxt = r->rot = 1e-5;
320 <        VSUM(r->rop, r->rorg, r->rdir, r->rot);
321 <        r->ron[0] = -r->rdir[0];
322 <        r->ron[1] = -r->rdir[1];
323 <        r->ron[2] = -r->rdir[2];
318 >                                        /* orientation -> normal */
319 >        VCOPY(r->ron, r->rdir);
320 >                                        /* pretend normal incidence */
321 >        r->rdir[0] = -r->ron[0];
322 >        r->rdir[1] = -r->ron[1];
323 >        r->rdir[2] = -r->ron[2];
324          r->rod = 1.0;
325 +                                        /* counterfeit other params */
326 +        r->rxt = r->rot = 1e-4;
327 +                                        /* move comfortably above sample pos. */
328 +        VSUM(r->rop, r->rorg, r->ron, r->rot);
329 +                                        /* leap-frog for pretend origin */
330 +        VSUM(r->rorg, r->rop, r->ron, r->rot);
331                                          /* compute result */
332          r->revf = raytrace;
333          m_normal(&Lamb, r);
# Line 349 | Line 354 | RtraceSimulManager::EnqueueBundle(const FVECT orig_dir
354          int     nqueued = 0;
355          RAY     res;
356  
357 <        if (!Ready())
353 <                return -1;
357 >        if (!Ready()) return -1;
358  
359          if (castonly && !cookedCall)
360                  error(INTERNAL, "EnqueueBundle() called in castonly mode without cookedCall");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines