ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/oocbuild.h
Revision: 2.2
Committed: Tue Sep 17 16:36:04 2024 UTC (7 months, 1 week ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 2.1: +10 -2 lines
Log Message:
chore: Added extern "C" to headers to avoid C++ name mangling

File Contents

# User Rev Content
1 rschregle 2.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 greg 2.2 $Id: oocbuild.h,v 2.1 2016/05/17 17:39:47 rschregle Exp $
11 rschregle 2.1 */
12    
13    
14     #ifndef OOC_BUILD_H
15     #define OOC_BUILD_H
16    
17 greg 2.2 #ifdef __cplusplus
18     extern "C" {
19     #endif
20    
21 rschregle 2.1 /* Bottom-up construction of out-of-core octree in postorder traversal.
22     * The octree oct is assumed to be initialised with its origin (oct ->
23     * org), size (oct -> size), key callback (oct -> key), and its
24     * associated leaf file (oct -> leafFile).
25    
26     * Records are read from the leafFile and assumed to be sorted in
27     * Z-order, which defines an octree leaf ordering. Leaves (terminal
28     * nodes) are constructed such that they contain <= leafMax records and
29     * have a maximum depth of maxDepth.
30    
31     * Note that the following limits apply:
32     * leafMax <= OOC_OCTCNT_MAX (see oococt.h)
33     * maxDepth <= OOC_MORTON_BITS (see oocsort.h)
34    
35     * The maxDepth limit arises from the fact that the Z-ordering has a
36     * limited resolution and will map node coordinates beyond a depth of
37     * OOC_MORTON_BITS to the same Z-index, causing nodes to be potentially
38     * read out of sequence and winding up in the wrong octree nodes.
39    
40     * On success, the octree pointer oct is returned, with the constructed
41     * nodes in oct -> nodes, and the node count in oct -> numNodes. On
42     * failure, NULL is returned. */
43     OOC_Octree *OOC_Build (OOC_Octree *oct, unsigned leafMax,
44     unsigned maxDepth);
45 greg 2.2
46     #ifdef __cplusplus
47     }
48     #endif
49    
50 rschregle 2.1 #endif