Line | |
---|
1 | /* |
---|
2 | |
---|
3 | Brian Curless |
---|
4 | |
---|
5 | Computer Graphics Laboratory |
---|
6 | Stanford University |
---|
7 | |
---|
8 | --------------------------------------------------------------------- |
---|
9 | |
---|
10 | Copyright (1997) The Board of Trustees of the Leland Stanford Junior |
---|
11 | University. Except for commercial resale, lease, license or other |
---|
12 | commercial transactions, permission is hereby given to use, copy, |
---|
13 | modify this software for academic purposes only. No part of this |
---|
14 | software or any derivatives thereof may be used in the production of |
---|
15 | computer models for resale or for use in a commercial |
---|
16 | product. STANFORD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND |
---|
17 | CONCERNING THIS SOFTWARE. No support is implied or provided. |
---|
18 | |
---|
19 | */ |
---|
20 | |
---|
21 | |
---|
22 | #ifndef _VRIP_ |
---|
23 | #define _VRIP_ |
---|
24 | |
---|
25 | |
---|
26 | #include "defines.h" |
---|
27 | |
---|
28 | typedef float vec3f[3]; |
---|
29 | typedef float vec2f[2]; |
---|
30 | |
---|
31 | |
---|
32 | struct OrthoShear { |
---|
33 | int axis; |
---|
34 | int flip; |
---|
35 | float sx; |
---|
36 | float sy; |
---|
37 | }; |
---|
38 | |
---|
39 | |
---|
40 | struct OccElement { |
---|
41 | ushort value; |
---|
42 | ushort totalWeight; |
---|
43 | }; |
---|
44 | |
---|
45 | |
---|
46 | struct OccElementDbl { |
---|
47 | double value; |
---|
48 | double totalWeight; |
---|
49 | }; |
---|
50 | |
---|
51 | |
---|
52 | struct OccNormElement { |
---|
53 | ushort value; |
---|
54 | ushort totalWeight; |
---|
55 | signed char nx; |
---|
56 | signed char ny; |
---|
57 | signed char nz; |
---|
58 | uchar more; |
---|
59 | |
---|
60 | #if 0 |
---|
61 | |
---|
62 | ushort value2; |
---|
63 | ushort totalWeight2; |
---|
64 | char nx2; |
---|
65 | char ny2; |
---|
66 | char nz2; |
---|
67 | uchar more2; |
---|
68 | |
---|
69 | ushort value3; |
---|
70 | ushort totalWeight3; |
---|
71 | char nx3; |
---|
72 | char ny3; |
---|
73 | char nz3; |
---|
74 | uchar more3; |
---|
75 | |
---|
76 | ushort value4; |
---|
77 | ushort totalWeight4; |
---|
78 | char nx4; |
---|
79 | char ny4; |
---|
80 | char nz4; |
---|
81 | #endif |
---|
82 | |
---|
83 | }; |
---|
84 | |
---|
85 | |
---|
86 | struct OccNormElementDbl { |
---|
87 | double value; |
---|
88 | double totalWeight; |
---|
89 | double nx; |
---|
90 | double ny; |
---|
91 | double nz; |
---|
92 | |
---|
93 | double value2; |
---|
94 | double totalWeight2; |
---|
95 | double nx2; |
---|
96 | double ny2; |
---|
97 | double nz2; |
---|
98 | |
---|
99 | double value3; |
---|
100 | double totalWeight3; |
---|
101 | double nx3; |
---|
102 | double ny3; |
---|
103 | double nz3; |
---|
104 | |
---|
105 | double value4; |
---|
106 | double totalWeight4; |
---|
107 | double nx4; |
---|
108 | double ny4; |
---|
109 | double nz4; |
---|
110 | }; |
---|
111 | |
---|
112 | |
---|
113 | enum {X_AXIS, Y_AXIS, Z_AXIS}; |
---|
114 | |
---|
115 | #define FAR_AWAY_DEPTH -1e20 |
---|
116 | #define IS_VALID_DEPTH(z) (z > FAR_AWAY_DEPTH) |
---|
117 | #define CHUNK_SIZE 1000000 |
---|
118 | #define DEPTH_TREE_GRANULARITY 8 |
---|
119 | |
---|
120 | |
---|
121 | #endif |
---|
122 | |
---|
Note: See
TracBrowser
for help on using the repository browser.