ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/view.h
Revision: 1.4
Committed: Mon Jan 8 14:45:51 1990 UTC (34 years, 3 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.3: +13 -7 lines
Log Message:
got rid of resolution and added shift and lift options

File Contents

# User Rev Content
1 greg 1.1 /* Copyright (c) 1988 Regents of the University of California */
2    
3     /* SCCSid "$SunId$ LBL" */
4    
5     /*
6     * view.h - header file for image generation.
7     *
8     * 9/19/88
9     */
10    
11     /* view types */
12     #define VT_PER 'v' /* perspective */
13     #define VT_PAR 'l' /* parallel */
14    
15     typedef struct {
16     int type; /* view type */
17     FVECT vp; /* view origin */
18     FVECT vdir; /* view direction */
19     FVECT vup; /* view up */
20     double horiz; /* horizontal view size */
21     double vert; /* vertical view size */
22 greg 1.4 double hoff; /* horizontal image offset */
23     double voff; /* vertical image offset */
24     FVECT hvec; /* computed horizontal image vector */
25     FVECT vvec; /* computed vertical image vector */
26     double hn2; /* DOT(hvec,hvec) */
27     double vn2; /* DOT(vvec,vvec) */
28 greg 1.1 } VIEW; /* view parameters */
29    
30     extern VIEW stdview;
31    
32     extern char *setview();
33    
34 greg 1.4 extern double sqrt();
35    
36     #define viewaspect(v) sqrt((v)->vn2/(v)->hn2)
37    
38     #define copyview(d,s) bcopy((char *)(s),(char *)(d),sizeof(VIEW))
39    
40     #define STDVIEW {VT_PER,0.,0.,0.,0.,1.,0.,0.,0.,1.,45.,45.,0.,0.}
41 greg 1.1
42     #define VIEWSTR "VIEW="