ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rpaint.h
Revision: 2.4
Committed: Sat Jun 7 00:54:58 2003 UTC (20 years, 11 months ago) by schorsch
Content type: text/plain
Branch: MAIN
Changes since 2.3: +12 -44 lines
Log Message:
Instrumented headers against multiple inclusion and for use from C++.
Removed NOPROTO sections.

File Contents

# Content
1 /* RCSid $Id: rpaint.h,v 2.3 2003/02/25 02:47:23 greg Exp $ */
2 /*
3 * rpaint.h - header file for image painting.
4 */
5 #ifndef _RAD_RPAINT_H_
6 #define _RAD_RPAINT_H_
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11
12 #include "copyright.h"
13
14 #include "driver.h"
15
16 #include "view.h"
17
18 typedef short COORD; /* an image coordinate */
19
20 typedef struct pnode {
21 struct pnode *kid; /* children */
22 COORD x, y; /* position */
23 COLOR v; /* value */
24 } PNODE; /* a paint node */
25
26 /* child ordering */
27 #define DL 0 /* down left */
28 #define DR 1 /* down right */
29 #define UL 2 /* up left */
30 #define UR 3 /* up right */
31
32 #define newptree() (PNODE *)calloc(4, sizeof(PNODE))
33
34 typedef struct {
35 COORD l, d, r, u; /* left, down, right, up */
36 } RECT; /* a rectangle */
37
38 extern PNODE ptrunk; /* the base of the image tree */
39
40 extern VIEW ourview; /* current view parameters */
41 extern VIEW oldview; /* previous view parameters */
42 extern int hresolu, vresolu; /* image resolution */
43
44 extern int greyscale; /* map colors to brightness? */
45
46 extern int pdepth; /* image depth in current frame */
47 extern RECT pframe; /* current frame rectangle */
48
49 extern double exposure; /* exposure for scene */
50
51 extern struct driver *dev; /* driver functions */
52
53 /* defined in rview.c */
54 extern void devopen(char *dname);
55 extern void devclose(void);
56 extern void printdevices(void);
57 extern void fillreserves(void);
58 extern void freereserves(void);
59 extern void command(char *prompt);
60 extern void rsample(void);
61 extern int refine(PNODE *p, int xmin, int ymin,
62 int xmax, int ymax, int pd);
63 /* defined in rv2.c */
64 extern void getframe(char *s);
65 extern void getrepaint(char *s);
66 extern void getview(char *s);
67 extern void lastview(char *s);
68 extern void saveview(char *s);
69 extern void loadview(char *s);
70 extern void getaim(char *s);
71 extern void getmove(char *s);
72 extern void getrotate(char *s);
73 extern void getpivot(char *s);
74 extern void getexposure(char *s);
75 extern int getparam(char *str, char *dsc, int typ, void *p);
76 extern void setparam(char *s);
77 extern void traceray(char *s);
78 extern void writepict(char *s);
79 /* defined in rv3.c */
80 extern int getrect(char *s, RECT *r);
81 extern int getinterest(char *s, int direc, FVECT vec, double *mp);
82 extern float *greyof(COLOR col);
83 extern void paint(PNODE *p, int xmin, int ymin, int xmax, int ymax);
84 extern void newimage(void);
85 extern void redraw(void);
86 extern void repaint(int xmin, int ymin, int xmax, int ymax);
87 extern void paintrect(PNODE *p, int xmin, int ymin,
88 int xmax, int ymax, RECT *r);
89 extern PNODE *findrect(int x, int y, PNODE *p, RECT *r, int pd);
90 extern void scalepict(PNODE *p, double sf);
91 extern void getpictcolrs(int yoff, COLR *scan, PNODE *p,
92 int xsiz, int ysiz);
93 extern void freepkids(PNODE *p);
94 extern void newview(VIEW *vp);
95 extern void moveview(double angle, double elev, double mag, FVECT vc);
96 extern void pcopy(PNODE *p1, PNODE *p2);
97 extern void zoomview(VIEW *vp, double zf);
98
99
100 #ifdef __cplusplus
101 }
102 #endif
103 #endif /* _RAD_RPAINT_H_ */
104