ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/view.h
Revision: 2.4
Committed: Tue Dec 20 20:15:06 1994 UTC (29 years, 4 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 2.3: +7 -2 lines
Log Message:
added -vo and -va (fore and aft clipping plane) parameters

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