ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/oocbuild.h
Revision: 2.1
Committed: Tue May 17 17:39:47 2016 UTC (7 years, 11 months ago) by rschregle
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R4, rad5R2, rad5R3, rad5R1, HEAD
Log Message:
Initial import of ooC photon map

File Contents

# Content
1 /*
2 =======================================================================
3 Header for building out-of-core octree data structure
4
5 Roland Schregle (roland.schregle@{hslu.ch, gmail.com})
6 (c) Lucerne University of Applied Sciences and Arts,
7 supported by the Swiss National Science Foundation (SNSF, #147053)
8 =======================================================================
9
10 $Id: oocbuild.h,v 1.5 2015/08/05 17:29:01 taschreg Exp $
11 */
12
13
14 #ifndef OOC_BUILD_H
15 #define OOC_BUILD_H
16
17 /* Bottom-up construction of out-of-core octree in postorder traversal.
18 * The octree oct is assumed to be initialised with its origin (oct ->
19 * org), size (oct -> size), key callback (oct -> key), and its
20 * associated leaf file (oct -> leafFile).
21
22 * Records are read from the leafFile and assumed to be sorted in
23 * Z-order, which defines an octree leaf ordering. Leaves (terminal
24 * nodes) are constructed such that they contain <= leafMax records and
25 * have a maximum depth of maxDepth.
26
27 * Note that the following limits apply:
28 * leafMax <= OOC_OCTCNT_MAX (see oococt.h)
29 * maxDepth <= OOC_MORTON_BITS (see oocsort.h)
30
31 * The maxDepth limit arises from the fact that the Z-ordering has a
32 * limited resolution and will map node coordinates beyond a depth of
33 * OOC_MORTON_BITS to the same Z-index, causing nodes to be potentially
34 * read out of sequence and winding up in the wrong octree nodes.
35
36 * On success, the octree pointer oct is returned, with the constructed
37 * nodes in oct -> nodes, and the node count in oct -> numNodes. On
38 * failure, NULL is returned. */
39 OOC_Octree *OOC_Build (OOC_Octree *oct, unsigned leafMax,
40 unsigned maxDepth);
41 #endif
42