ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/view.h
Revision: 2.5
Committed: Fri Aug 18 10:20:11 1995 UTC (28 years, 8 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 2.4: +1 -0 lines
Log Message:
added cylindrical view type

File Contents

# User Rev Content
1 greg 2.4 /* Copyright (c) 1994 Regents of the University of California */
2 greg 1.1
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 greg 1.6 #define VT_ANG 'a' /* angular fisheye */
15     #define VT_HEM 'h' /* hemispherical fisheye */
16 greg 2.5 #define VT_CYL 'c' /* cylindrical panorama */
17 greg 1.1
18     typedef struct {
19     int type; /* view type */
20     FVECT vp; /* view origin */
21     FVECT vdir; /* view direction */
22     FVECT vup; /* view up */
23     double horiz; /* horizontal view size */
24     double vert; /* vertical view size */
25 greg 1.4 double hoff; /* horizontal image offset */
26     double voff; /* vertical image offset */
27 greg 2.4 double vfore; /* fore clipping plane */
28     double vaft; /* aft clipping plane (<=0 for inf) */
29 greg 1.4 FVECT hvec; /* computed horizontal image vector */
30     FVECT vvec; /* computed vertical image vector */
31     double hn2; /* DOT(hvec,hvec) */
32     double vn2; /* DOT(vvec,vvec) */
33 greg 1.1 } VIEW; /* view parameters */
34    
35     extern VIEW stdview;
36    
37     extern char *setview();
38    
39 greg 2.4 extern double viewray();
40    
41 greg 1.4 #define viewaspect(v) sqrt((v)->vn2/(v)->hn2)
42    
43 greg 2.3 #define STDVIEW {VT_PER,{0.,0.,0.},{0.,1.,0.},{0.,0.,1.}, \
44 greg 2.4 45.,45.,0.,0.,0.,0., \
45     {0.,0.,0.},{0.,0.,0.},0.,0.}
46 greg 1.1
47     #define VIEWSTR "VIEW="
48 greg 1.7 #define VIEWSTRL 5