1 |
greg |
2.18 |
/* RCSid: $Id: mkillum.h,v 2.17 2009/06/12 17:37:37 greg Exp $ */ |
2 |
greg |
1.1 |
/* |
3 |
|
|
* Common definitions for mkillum |
4 |
|
|
*/ |
5 |
schorsch |
2.3 |
#ifndef _RAD_MKILLUM_H_ |
6 |
|
|
#define _RAD_MKILLUM_H_ |
7 |
greg |
1.2 |
|
8 |
greg |
2.8 |
#include "ray.h" |
9 |
|
|
#include "otypes.h" |
10 |
greg |
2.17 |
#include "bsdf.h" |
11 |
greg |
2.14 |
#include "random.h" |
12 |
schorsch |
2.4 |
|
13 |
|
|
#ifdef __cplusplus |
14 |
|
|
extern "C" { |
15 |
|
|
#endif |
16 |
greg |
1.1 |
/* illum flags */ |
17 |
greg |
1.3 |
#define IL_LIGHT 0x1 /* light rather than illum */ |
18 |
|
|
#define IL_COLDST 0x2 /* use color distribution */ |
19 |
|
|
#define IL_COLAVG 0x4 /* use average color */ |
20 |
|
|
#define IL_DATCLB 0x8 /* OK to clobber data file */ |
21 |
greg |
1.1 |
|
22 |
|
|
struct illum_args { |
23 |
|
|
int flags; /* flags from list above */ |
24 |
greg |
2.10 |
UpDir udir; /* up direction */ |
25 |
greg |
2.11 |
double thick; /* object thickness */ |
26 |
greg |
1.1 |
char matname[MAXSTR]; /* illum material name */ |
27 |
|
|
char datafile[MAXSTR]; /* distribution data file name */ |
28 |
|
|
int dfnum; /* data file number */ |
29 |
greg |
1.2 |
char altmat[MAXSTR]; /* alternate material name */ |
30 |
greg |
1.3 |
int sampdens; /* point sample density */ |
31 |
greg |
1.1 |
int nsamps; /* # of samples in each direction */ |
32 |
greg |
2.10 |
struct BSDF_data |
33 |
|
|
*sd; /* scattering data (if set) */ |
34 |
greg |
1.5 |
float minbrt; /* minimum average brightness */ |
35 |
greg |
2.9 |
COLOR col; /* computed average color */ |
36 |
greg |
1.1 |
}; /* illum options */ |
37 |
|
|
|
38 |
greg |
2.11 |
extern void redistribute(struct BSDF_data *b, int nalt, int nazi, |
39 |
|
|
FVECT u, FVECT v, FVECT w, MAT4 xm); |
40 |
greg |
2.10 |
|
41 |
|
|
extern void printobj(char *mod, OBJREC *obj); |
42 |
|
|
extern int average(struct illum_args *il, COLORV *da, int n); |
43 |
greg |
2.9 |
extern void flatout(struct illum_args *il, COLORV *da, int n, int m, |
44 |
|
|
FVECT u, FVECT v, FVECT w); |
45 |
greg |
2.10 |
extern void illumout(struct illum_args *il, OBJREC *ob); |
46 |
greg |
2.9 |
extern void roundout(struct illum_args *il, COLORV *da, int n, int m); |
47 |
schorsch |
2.3 |
|
48 |
greg |
2.11 |
extern void newdist(int siz); |
49 |
|
|
extern int process_ray(RAY *r, int rv); |
50 |
|
|
extern void raysamp(int ndx, FVECT org, FVECT dir); |
51 |
|
|
extern void rayclean(void); |
52 |
|
|
|
53 |
greg |
2.13 |
extern void flatdir(FVECT dv, double alt, double azi); |
54 |
greg |
2.16 |
extern int flatindex(FVECT dv, int nalt, int nazi); |
55 |
greg |
2.13 |
|
56 |
greg |
2.18 |
extern int printgeom(struct BSDF_data *sd, char *xfrot, |
57 |
|
|
FVECT ctr, double s1, double s2); |
58 |
|
|
|
59 |
greg |
2.8 |
extern int my_default(OBJREC *, struct illum_args *, char *); |
60 |
|
|
extern int my_face(OBJREC *, struct illum_args *, char *); |
61 |
|
|
extern int my_sphere(OBJREC *, struct illum_args *, char *); |
62 |
|
|
extern int my_ring(OBJREC *, struct illum_args *, char *); |
63 |
greg |
2.7 |
|
64 |
greg |
2.11 |
extern COLORV * distarr; /* distribution array */ |
65 |
|
|
extern int distsiz; |
66 |
greg |
2.16 |
extern COLORV * direct_discount; /* amount to take off direct */ |
67 |
greg |
2.11 |
|
68 |
greg |
2.8 |
extern char *progname; |
69 |
greg |
2.7 |
|
70 |
|
|
#ifdef __cplusplus |
71 |
|
|
} |
72 |
|
|
#endif |
73 |
greg |
2.6 |
|
74 |
schorsch |
2.3 |
#endif /* _RAD_MKILLUM_H_ */ |
75 |
|
|
|