--- ray/src/rt/rpaint.h 1990/01/08 13:37:52 1.2 +++ ray/src/rt/rpaint.h 2008/08/21 07:05:59 2.8 @@ -1,22 +1,23 @@ -/* Copyright (c) 1987 Regents of the University of California */ - -/* SCCSid "$SunId$ LBL" */ - +/* RCSid $Id: rpaint.h,v 2.8 2008/08/21 07:05:59 greg Exp $ */ /* * rpaint.h - header file for image painting. - * - * 1/30/87 */ +#ifndef _RAD_RPAINT_H_ +#define _RAD_RPAINT_H_ #include "driver.h" - #include "view.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef short COORD; /* an image coordinate */ typedef struct pnode { struct pnode *kid; /* children */ COORD x, y; /* position */ + COORD xmin, ymin, xmax, ymax; /* rectangle */ COLOR v; /* value */ } PNODE; /* a paint node */ @@ -38,6 +39,15 @@ extern VIEW ourview; /* current view parameters */ extern VIEW oldview; /* previous view parameters */ extern int hresolu, vresolu; /* image resolution */ +extern int newparam; /* parameter setting changed */ + +extern char *dvcname; /* output device name */ + +extern char rifname[]; /* rad input file name */ + +extern int psample; /* pixel sample size */ +extern double maxdiff; /* max. sample difference */ + extern int greyscale; /* map colors to brightness? */ extern int pdepth; /* image depth in current frame */ @@ -47,4 +57,55 @@ extern double exposure; /* exposure for scene */ extern struct driver *dev; /* driver functions */ -extern PNODE *findrect(); +extern int nproc; /* number of processes */ + + /* defined in rview.c */ +extern void devopen(char *dname); +extern void devclose(void); +extern void printdevices(void); +extern void command(char *prompt); +extern void rsample(void); +extern int refine(PNODE *p, int pd); + /* defined in rv2.c */ +extern void getframe(char *s); +extern void getrepaint(char *s); +extern void getview(char *s); +extern void lastview(char *s); +extern void saveview(char *s); +extern void loadview(char *s); +extern void getfocus(char *s); +extern void getaim(char *s); +extern void getmove(char *s); +extern void getrotate(char *s); +extern void getpivot(char *s); +extern void getexposure(char *s); +extern int getparam(char *str, char *dsc, int typ, void *p); +extern void setparam(char *s); +extern void traceray(char *s); +extern void writepict(char *s); + /* defined in rv3.c */ +extern int getrect(char *s, RECT *r); +extern int getinterest(char *s, int direc, FVECT vec, double *mp); +extern float *greyof(COLOR col); +extern int paint(PNODE *p); +extern int waitrays(void); +extern void newimage(char *s); +extern void redraw(void); +extern void repaint(int xmin, int ymin, int xmax, int ymax); +extern void paintrect(PNODE *p, RECT *r); +extern PNODE *findrect(int x, int y, PNODE *p, int pd); +extern void scalepict(PNODE *p, double sf); +extern void getpictcolrs(int yoff, COLR *scan, PNODE *p, + int xsiz, int ysiz); +extern void freepkids(PNODE *p); +extern void newview(VIEW *vp); +extern void moveview(double angle, double elev, double mag, FVECT vc); +extern void pcopy(PNODE *p1, PNODE *p2); +extern void zoomview(VIEW *vp, double zf); + + +#ifdef __cplusplus +} +#endif +#endif /* _RAD_RPAINT_H_ */ +