ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rhdriver.h
(Generate patch)

Comparing ray/src/hd/rhdriver.h (file contents):
Revision 3.14 by gwlarson, Wed Jun 17 15:44:07 1998 UTC vs.
Revision 3.21 by greg, Sat Feb 22 02:07:25 2003 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1998 Silicon Graphics, Inc. */
2 <
3 < /* SCCSid "$SunId$ SGI" */
4 <
1 > /* RCSid: $Id$ */
2   /*
3   * Header file for holodeck device driver routines.
4   */
# Line 13 | Line 10 | extern struct driver {
10          VIEW    v;              /* base view parameters */
11          int     hres, vres;     /* base view resolution */
12          int     ifd;            /* input file descriptor (for select) */
13 +        int     firstuse;       /* non-zero if driver can't recycle samples */
14 +        int     inpready;       /* number of unprocessed input events */
15   } odev;                 /* our open device */
16  
17 + extern char     odev_args[];    /* command arguments, if any */
18 +
19   extern int      imm_mode;       /* bundles are being delivered immediately */
20  
21   extern double   eyesepdist;     /* world eye separation distance */
# Line 23 | Line 24 | extern double  eyesepdist;     /* world eye separation dist
24   #define DC_SETVIEW      0               /* set the base view */
25   #define DC_GETVIEW      1               /* print the current base view */
26   #define DC_LASTVIEW     2               /* restore previous view */
27 < #define DC_PAUSE        3               /* pause the current calculation */
28 < #define DC_RESUME       4               /* resume the calculation */
29 < #define DC_REDRAW       5               /* redraw from server */
30 < #define DC_KILL         6               /* kill rtrace process(es) */
31 < #define DC_RESTART      7               /* restart rtrace process(es) */
32 < #define DC_CLOBBER      8               /* clobber holodeck file */
33 < #define DC_QUIT         9               /* quit the program */
27 > #define DC_FOCUS        3               /* view focus */
28 > #define DC_PAUSE        4               /* pause the current calculation */
29 > #define DC_RESUME       5               /* resume the calculation */
30 > #define DC_REDRAW       6               /* redraw from server */
31 > #define DC_KILL         7               /* kill rtrace process(es) */
32 > #define DC_RESTART      8               /* restart rtrace process(es) */
33 > #define DC_CLOBBER      9               /* clobber holodeck file */
34 > #define DC_QUIT         10              /* quit the program */
35  
36 < #define DC_NCMDS        10              /* number of commands */
36 > #define DC_NCMDS        11              /* number of commands */
37  
38                                  /* dev_input() returns flags from above */
39   #define DFL(dc)         (1<<(dc))
40  
41   #define CTRL(c)         ((c)-'@')
42                                  /* commands entered in display window */
43 < #define DV_INIT         {'\0','v','l','p','\r',CTRL('L'),'K','R','C','q'}
43 > #define DV_INIT         {'\0','v','l','f','p','\r',CTRL('L'),'K','R','C','q'}
44                                  /* commands entered on stdin */
45 < #define DC_INIT         {"VIEW=","where","last","pause","resume","redraw",\
46 <                                "kill","restart","clobber","quit"}
45 > #define DC_INIT         {"VIEW=","where","last","frame","pause","resume",\
46 >                                "redraw","kill","restart","clobber","quit"}
47  
48  
49   /************************************************************************
# Line 77 | Line 79 | the screen is optional.
79  
80  
81   void
82 < dev_value(c, p, v)      : register new point of light
82 > dev_value(c, d, p)      : register new point of light
83   COLR    c;              : pixel color (RGBE)
84 + FVECT   d;              : ray direction vector
85   FVECT   p;              : world intersection point
83 FVECT   v;              : ray direction vector
86  
87   Add the given color point to the display output queue.  If imm_mode is
88 < non-zero, then values are being sent in rapid succession.
88 > non-zero, then values are being sent in rapid succession.  If p is NULL,
89 > then the point is at infinity.
90  
91  
92   int
93   dev_flush()             : flush the output and prepare for select call
94  
95   Updates display, taking any pending action required before select(2) call.
96 < Returns non-zero if there is device input available.
96 > Returns non-zero if there is device input available, setting odev.inpready.
97  
98  
99   int
# Line 99 | Line 102 | dev_input()            : process pending display input
102   Called when odev struct file descriptor shows input is ready.
103   Returns flags indicating actions to take in the control process.
104   If the DC_VIEW or DC_RESIZE flag is returned, the odev
105 < structure must be updated beforehand.
105 > structure must be updated beforehand.  If the DC_FOCUS
106 > flag is set, then odev_args contains the frame dimensions.
107 > No events shall remain when this function returns,
108 > and odev.inpready will therefore be 0.
109  
110   void
111   dev_auxcom(cmd, args)   : process auxiliary command
# Line 124 | Line 130 | views.  The zeroeth auxiliary view is the base view it
130  
131  
132   void
133 + dev_section(gf, pf)     : add geometry and ports for rendering
134 + char    *gf;            : geometry file name
135 + char    *pf;            : portal file name(s)
136 +
137 + Add the given geometry file to the list of geometry to render for
138 + intermediate views if direct geometry rendering is available.  The
139 + second argument gives the name(s) of any portal geometry files
140 + associated with this section.  Multiple portal file names are separated
141 + by spaces.  A single octree file will be given for the geometry, ending
142 + in the ".oct" suffix.  Portal files will be given as zero or more
143 + Radiance scene description file names.  If no portals are given for
144 + this section, the string may be NULL.  The character strings are
145 + guaranteed to be static (or permanently allocated) such that they may
146 + be safely stored as a pointer.  The same pointers or file lists may be
147 + (and often are) given repeatedly.  If a given geometry file does not
148 + exist, the call should be silently ignored.  If gf is NULL, then the
149 + last section has been given, and the display can be updated with the
150 + new information.
151 +
152 +
153 + void
154   dev_close()             : close the display
155  
156   Close the display device and free up resources in preparation for exit.
# Line 134 | Line 161 | Set odev.v.type=0 and odev.hres=odev.vres=0 when done.
161  
162  
163   extern VIEW     *dev_auxview();
164 +
165 + extern int2     *beam_view();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines