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

Comparing ray/src/rt/oococt.c (file contents):
Revision 2.3 by rschregle, Tue May 17 17:39:47 2016 UTC vs.
Revision 2.4 by rschregle, Mon Aug 14 21:12:10 2017 UTC

# Line 1 | Line 1
1 + #ifndef lint
2 + static const char RCSid[] = "$Id$";
3 + #endif
4 +
5 +
6   /*
7     ======================================================================
8     Out-of-core octree data structure
# Line 11 | Line 16
16   */
17  
18  
19 + #if !defined(_WIN32) && !defined(_WIN64) || defined(PMAP_OOC)
20 + /* No Windoze support for now */
21  
22   #include "oococt.h"
23   #include "rtio.h"
# Line 340 | Line 347 | int OOC_SaveOctree (const OOC_Octree *oct, FILE *out)
347        putflt(oct -> org [i], out);
348        
349     putflt(oct -> size, out);
343
344 #if 0  
345   for (i = 0; i < 3; i++)
346      putflt(oct -> bound [i], out);
347      
348   putint(oct -> mortonScale, sizeof(oct -> mortonScale),   out);
349 #endif  
350     putint(oct -> recSize,     sizeof(oct -> recSize),       out);
351     putint(oct -> numData,     sizeof(oct -> numData),       out);
352     putint(oct -> numNodes,    sizeof(oct -> numNodes),      out);
# Line 403 | Line 403 | int OOC_LoadOctree (OOC_Octree *oct, FILE *nodeFile,
403        oct -> org [i] = getflt(nodeFile);
404  
405     oct -> size = getflt(nodeFile);
406  
407 #if 0  
408   for (i = 0; i < 3; i++)
409      oct -> bound [i] = getflt(nodeFile);
410      
411   oct -> mortonScale   = getint(sizeof(oct -> mortonScale),   nodeFile);
412 #else
406     oct -> bound [0] = oct -> bound [1] = oct -> bound [2] = oct -> size;
407     VADD(oct -> bound, oct -> bound, oct -> org);  
415  
408     oct -> mortonScale   = OOC_MORTON_MAX / oct -> size;
417 #endif
418  
419 #if 0
420   fprintf(stderr, "OOC_LoadOctree: mortonScale = %lf\n", oct -> mortonScale);
421 #endif      
422
409     oct -> recSize       = getint(sizeof(oct -> recSize),       nodeFile);
410     oct -> numData       = getint(sizeof(oct -> numData),       nodeFile);
411     oct -> numNodes      = getint(sizeof(oct -> numNodes),      nodeFile);
# Line 477 | Line 463 | void OOC_Delete (OOC_Octree *oct)
463     if (oct -> cache)
464        OOC_DeleteCache(oct -> cache);
465   }
466 +
467 + #endif /* NIX / PMAP_OOC */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines