1 |
+ |
#ifndef lint |
2 |
+ |
static const char RCSid[] = "$Id$"; |
3 |
+ |
#endif |
4 |
+ |
|
5 |
+ |
|
6 |
|
/* |
7 |
|
====================================================================== |
8 |
|
Out-of-core octree data structure |
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" |
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); |
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); |
463 |
|
if (oct -> cache) |
464 |
|
OOC_DeleteCache(oct -> cache); |
465 |
|
} |
466 |
+ |
|
467 |
+ |
#endif /* NIX / PMAP_OOC */ |