BRL-CAD
tieprivate.h
Go to the documentation of this file.
1 /* T I E P R I V A T E . H
2  * BRL-CAD
3  *
4  * Copyright (c) 2008-2014 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 /** @file tieprivate.h
21  *
22  * private stuff for libtie/librender
23  *
24  */
25 
26 #ifndef LIBRT_PRIMITIVES_BOT_TIEPRIVATE_H
27 #define LIBRT_PRIMITIVES_BOT_TIEPRIVATE_H
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 /* The last three bits of the 'b' field in the kdtree are used to
34  * store data about the object. 0x4L marks if the node has children
35  * (is set to 0 for a leaf), the last two are the encoding for the
36  * splitting plane.
37  */
38 #define TIE_HAS_CHILDREN(bits) (bits & (uint32_t)0x4L)
39 #define TIE_SET_HAS_CHILDREN(bits) (bits | (uint32_t)0x4L)
40 
41 struct tie_geom_s {
42  struct tie_tri_s **tri_list; /* 4-bytes or 8-bytes */
43  uint32_t tri_num; /* 4-bytes */
44 };
45 
46 #ifdef _WIN32
47 # undef near
48 # undef far
49 #endif
50 
51 struct tie_stack_s {
52  struct tie_kdtree_s *node; /* 4-bytes or 8-bytes */
53  tfloat near; /* 4-bytes or 8-bytes */
54  tfloat far; /* 4-bytes or 8-bytes */
55 };
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /* LIBRT_PRIMITIVES_BOT_TIEPRIVATE_H */
62 
63 /*
64  * Local Variables:
65  * tab-width: 8
66  * mode: C
67  * indent-tabs-mode: t
68  * c-file-style: "stroustrup"
69  * End:
70  * ex: shiftwidth=4 tabstop=8
71  */
struct tie_tri_s ** tri_list
Definition: tieprivate.h:42
tfloat far
Definition: tieprivate.h:54
struct tie_kdtree_s * node
Definition: tieprivate.h:52
uint32_t tri_num
Definition: tieprivate.h:43
tfloat near
Definition: tieprivate.h:53