1 #ifndef VOXELGRID_H
2 # define VOXELGRID_H
3 
4 #define VOXEL_GRID_SUPPORT 1
5 
6 typedef float t_voxel;
7 
8 typedef struct vgrid {
9     int size;		/* size x size x size array */
10     double vxmin;
11     double vxmax;
12     double vxdelta;
13     double vymin;
14     double vymax;
15     double vydelta;
16     double vzmin;
17     double vzmax;
18     double vzdelta;
19     double min_value;
20     double max_value;
21     double mean_value;
22     double stddev;
23     int nzero;
24     t_voxel *vdata;	/* points to 3D array of voxels */
25 } vgrid;
26 
27 typedef struct isosurface_opt{
28     int tessellation;	/* 0 = mixed  1 = triangles only */
29     int inside_offset;	/* difference between front/back linetypes */
30 } isosurface_opt;
31 
32 /* function prototypes */
33 void voxel_command(void);
34 void vclear_command(void);
35 void vfill_command(void);
36 void f_voxel(union argument *x);
37 void init_voxelsupport(void);
38 void set_vgrid(void);
39 void set_vgrid_range(void);
40 void show_vgrid(void);
41 void gpfree_vgrid(struct udvt_entry *grid);
42 void unset_vgrid(void);
43 udvt_entry *get_vgrid_by_name(char *name);
44 void check_grid_ranges(void);
45 t_voxel voxel(double vx, double vy, double vz);
46 void set_isosurface(void);
47 void show_isosurface(void);
48 
49 /* variables */
50 extern isosurface_opt isosurface_options;
51 
52 #endif /* VOXELGRID_H */
53