source: proiecte/pmake3d/make3d_original/Make3dSingleImageStanford_version0.1/third_party/vrippack-0.31/src/march/mc.h @ 37

Last change on this file since 37 was 37, checked in by (none), 14 years ago

Added original make3d

File size: 2.4 KB
Line 
1/*
2
3Name:         mc.h
4
5Coded:        Paul Ning
6
7Modified by:  Brian Curless
8              Computer Graphics Laboratory
9              Stanford University
10
11Comment:      Include file for global definitions and typing
12
13Copyright (1997) The Board of Trustees of the Leland Stanford Junior
14University. Except for commercial resale, lease, license or other
15commercial transactions, permission is hereby given to use, copy,
16modify this software for academic purposes only.  No part of this
17software or any derivatives thereof may be used in the production of
18computer models for resale or for use in a commercial
19product. STANFORD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND
20CONCERNING THIS SOFTWARE.  No support is implied or provided.
21
22*/
23
24
25#ifndef _MC_H_
26#define _MC_H_
27
28#include "mcfile.h"
29#include "OccGridRLE.h"
30#include "limits.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36/*
37 * Global definitions
38 */
39
40typedef struct {
41    float density;
42    float nx;
43    float ny;
44    float nz;
45    float confidence;
46    unsigned char valid;
47    unsigned char realData;   
48} Point;
49
50typedef Point **Section;
51
52typedef Point Cube[8];
53
54typedef int Index;
55
56typedef struct {Index A;
57                Index B;
58                Index C;
59              } Triple;
60
61typedef struct {Boolean edge[12];
62                int Ntriangles;
63                Triple *TriangleList;
64              } EdgeTableEntry;
65
66#define Nrow Nz
67#define Ncol Ny
68#define Nslice Nx
69
70#define drow dz
71#define dcol dy
72#define dslice dx
73
74#define round(x) ((int) ((x) > 0 ? (x)+0.5 : (x)-0.5))
75
76
77/*
78 * Global variable typing
79 */
80
81extern char infile[PATH_MAX], outfile[PATH_MAX];
82extern int WriteNormals;
83extern int UseValueWeightProduct;
84extern int SaveGradientAsConfidence;
85extern FILE *InSlice,*OutMCFile;
86extern int FirstSliceFileNumber;
87
88extern int Nx,Ny,Nz;
89extern float dx,dy,dz;
90
91extern float FtoSScale;
92extern float NrmMagScale;
93
94extern int i0,j_0,k0;
95extern int i1,j_1,k1;
96extern float threshold;
97extern float xstart,ystart,zstart;
98extern int TotalTriangles;
99extern OccGridRLE *occGrid;
100extern int OCC_CONF_THRESHOLD;
101
102extern EdgeTableEntry TheEdgeTable[256];
103
104/*
105 * Global function types
106 */
107
108extern void GetInfo(),Init(),DoSlices(), DoSlicesOccRLE();
109extern void InitEdgeTable();
110extern void DoCube(Cube cube, int i, int j, int k);
111extern TriangleVertex *NewDoCube(Cube cube, int i, int j, int k, 
112                                 unsigned char *pEdgeTableIndex);
113extern void Quit();
114extern void Fatal(char *message);
115
116#ifndef CHUNK_SIZE
117#define CHUNK_SIZE 100000
118#endif
119
120#ifdef __cplusplus
121}
122#endif
123
124#endif
Note: See TracBrowser for help on using the repository browser.