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.7 by greg, Fri Apr 12 14:20:40 1991 UTC vs.
Revision 2.16 by greg, Tue Jun 8 19:48:29 2004 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1988 Regents of the University of California */
2 <
3 < /* SCCSid "$SunId$ LBL" */
4 <
1 > /* RCSid $Id$ */
2   /*
3   *  view.h - header file for image generation.
4   *
5 < *     9/19/88
5 > *  Include after stdio.h and rtmath.h
6 > *  Includes resolu.h
7   */
8 + #ifndef _RAD_VIEW_H_
9 + #define _RAD_VIEW_H_
10  
11 + #include  "resolu.h"
12 +
13 + #ifdef __cplusplus
14 + extern "C" {
15 + #endif
16 +
17                                  /* view types */
18   #define  VT_PER         'v'             /* perspective */
19   #define  VT_PAR         'l'             /* parallel */
20   #define  VT_ANG         'a'             /* angular fisheye */
21   #define  VT_HEM         'h'             /* hemispherical fisheye */
22 + #define  VT_CYL         'c'             /* cylindrical panorama */
23  
24   typedef struct {
25          int  type;              /* view type */
# Line 23 | Line 30 | typedef struct {
30          double  vert;           /* vertical view size */
31          double  hoff;           /* horizontal image offset */
32          double  voff;           /* vertical image offset */
33 +        double  vfore;          /* fore clipping plane */
34 +        double  vaft;           /* aft clipping plane (<=0 for inf) */
35          FVECT  hvec;            /* computed horizontal image vector */
36          FVECT  vvec;            /* computed vertical image vector */
37          double  hn2;            /* DOT(hvec,hvec) */
# Line 31 | Line 40 | typedef struct {
40  
41   extern VIEW  stdview;
42  
34 extern char  *setview();
35
36 extern double  sqrt();
37
43   #define  viewaspect(v)  sqrt((v)->vn2/(v)->hn2)
44  
45 < #define  STDVIEW        {VT_PER,0.,0.,0.,0.,1.,0.,0.,0.,1.,45.,45.,0.,0.}
45 > #define  STDVIEW        {VT_PER,{0.,0.,0.},{0.,1.,0.},{0.,0.,1.}, \
46 >                                45.,45.,0.,0.,0.,0., \
47 >                                {0.,0.,0.},{0.,0.,0.},0.,0.}
48  
49   #define  VIEWSTR        "VIEW="
50   #define  VIEWSTRL       5
51 +
52 +
53 + extern char     *setview(VIEW *v);
54 + extern void     normaspect(double va, double *ap, int *xp, int *yp);
55 + extern double   viewray(FVECT orig, FVECT direc, VIEW *v, double x, double y);
56 + extern void     viewloc(FVECT ip, VIEW *v, FVECT p);
57 + extern void     pix2loc(RREAL loc[2], RESOLU *rp, int px, int py);
58 + extern void     loc2pix(int pp[2], RESOLU *rp, double lx, double ly);
59 + extern int      getviewopt(VIEW *v, int ac, char *av[]);
60 + extern int      sscanview(VIEW *vp, char *s);
61 + extern void     fprintview(VIEW *vp, FILE *fp);
62 + extern char     *viewopt(VIEW *vp);
63 + extern int      isview(char *s);
64 + extern int      viewfile(char *fname, VIEW *vp, RESOLU *rp);
65 +
66 +
67 + #ifdef __cplusplus
68 + }
69 + #endif
70 + #endif /* _RAD_VIEW_H_ */
71 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines