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 _OCC_GRID_ |
---|
23 | #define _OCC_GRID_ |
---|
24 | |
---|
25 | #include "vrip.h" |
---|
26 | |
---|
27 | class OccGrid { |
---|
28 | |
---|
29 | public: |
---|
30 | int xdim, ydim, zdim; |
---|
31 | float resolution; |
---|
32 | vec3f origin; |
---|
33 | vec3f *sliceOrigins; |
---|
34 | int axis; |
---|
35 | int flip; |
---|
36 | OccElement *elems; |
---|
37 | OccElement *slice; |
---|
38 | |
---|
39 | OccGrid(); |
---|
40 | OccGrid(int,int,int); |
---|
41 | |
---|
42 | int transposeXZ(); |
---|
43 | int transposeYZ(); |
---|
44 | int copy(OccGrid *src); |
---|
45 | |
---|
46 | void clear(); |
---|
47 | |
---|
48 | OccElement *address(int x, int y, int z) |
---|
49 | { return(this->elems + x + y*this->xdim+ z*this->xdim*this->ydim); }; |
---|
50 | |
---|
51 | OccElement *getSlice(const char *axis, int sliceNum, int *pxdim, int *pydim); |
---|
52 | |
---|
53 | int writeDen(const char *); |
---|
54 | int write(const char *); |
---|
55 | int read(const char *); |
---|
56 | |
---|
57 | ~OccGrid(); |
---|
58 | }; |
---|
59 | |
---|
60 | |
---|
61 | #endif |
---|
62 | |
---|
Note: See
TracBrowser
for help on using the repository browser.