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

Comparing ray/src/common/view.h (file contents):
Revision 1.2 by greg, Sun Dec 10 13:41:08 1989 UTC vs.
Revision 2.4 by greg, Tue Dec 20 20:15:06 1994 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1988 Regents of the University of California */
1 > /* Copyright (c) 1994 Regents of the University of California */
2  
3   /* SCCSid "$SunId$ LBL" */
4  
# Line 11 | Line 11
11                                  /* view types */
12   #define  VT_PER         'v'             /* perspective */
13   #define  VT_PAR         'l'             /* parallel */
14 + #define  VT_ANG         'a'             /* angular fisheye */
15 + #define  VT_HEM         'h'             /* hemispherical fisheye */
16  
17   typedef struct {
18          int  type;              /* view type */
# Line 19 | Line 21 | typedef struct {
21          FVECT  vup;             /* view up */
22          double  horiz;          /* horizontal view size */
23          double  vert;           /* vertical view size */
24 <        int  hresolu;           /* horizontal resolution */
25 <        int  vresolu;           /* vertical resolution */
26 <        FVECT  vhinc;           /* computed horizontal increment */
27 <        FVECT  vvinc;           /* computed vertical increment */
28 <        double  vhs2;           /* 1.0/DOT(vhinc,vhinc) */
29 <        double  vvs2;           /* 1.0/DOT(vvinc,vvinc) */
24 >        double  hoff;           /* horizontal image offset */
25 >        double  voff;           /* vertical image offset */
26 >        double  vfore;          /* fore clipping plane */
27 >        double  vaft;           /* aft clipping plane (<=0 for inf) */
28 >        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   } VIEW;                 /* view parameters */
33  
34   extern VIEW  stdview;
35  
36   extern char  *setview();
37  
38 < #define  STDVIEW(h)     {VT_PER,0.,0.,0.,0.,1.,0.,0.,0.,1.,45.,45.,h,h}
38 > extern double  viewray();
39  
40 + #define  viewaspect(v)  sqrt((v)->vn2/(v)->hn2)
41 +
42 + #define  STDVIEW        {VT_PER,{0.,0.,0.},{0.,1.,0.},{0.,0.,1.}, \
43 +                                45.,45.,0.,0.,0.,0., \
44 +                                {0.,0.,0.},{0.,0.,0.},0.,0.}
45 +
46   #define  VIEWSTR        "VIEW="
47 + #define  VIEWSTRL       5

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines