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 2.1 by greg, Tue Nov 12 16:55:36 1991 UTC vs.
Revision 2.15 by schorsch, Mon Oct 27 10:19:31 2003 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 fvect.h
6 > *  Includes resolu.h
7   */
8 + #ifndef _RAD_VIEW_H_
9 + #define _RAD_VIEW_H_
10  
11 + #include  <time.h>
12 +
13 + #include  "rtmath.h"
14 + #include  "resolu.h"
15 +
16 + #ifdef __cplusplus
17 + extern "C" {
18 + #endif
19 +
20                                  /* view types */
21   #define  VT_PER         'v'             /* perspective */
22   #define  VT_PAR         'l'             /* parallel */
23   #define  VT_ANG         'a'             /* angular fisheye */
24   #define  VT_HEM         'h'             /* hemispherical fisheye */
25 + #define  VT_CYL         'c'             /* cylindrical panorama */
26  
27   typedef struct {
28          int  type;              /* view type */
# Line 23 | Line 33 | typedef struct {
33          double  vert;           /* vertical view size */
34          double  hoff;           /* horizontal image offset */
35          double  voff;           /* vertical image offset */
36 +        double  vfore;          /* fore clipping plane */
37 +        double  vaft;           /* aft clipping plane (<=0 for inf) */
38          FVECT  hvec;            /* computed horizontal image vector */
39          FVECT  vvec;            /* computed vertical image vector */
40          double  hn2;            /* DOT(hvec,hvec) */
# Line 31 | Line 43 | typedef struct {
43  
44   extern VIEW  stdview;
45  
34 extern char  *setview();
35
36 extern double  sqrt();
37
46   #define  viewaspect(v)  sqrt((v)->vn2/(v)->hn2)
47  
48 < #define  STDVIEW        {VT_PER,0.,0.,0.,0.,1.,0.,0.,0.,1.,45.,45.,0.,0.}
48 > #define  STDVIEW        {VT_PER,{0.,0.,0.},{0.,1.,0.},{0.,0.,1.}, \
49 >                                45.,45.,0.,0.,0.,0., \
50 >                                {0.,0.,0.},{0.,0.,0.},0.,0.}
51  
52   #define  VIEWSTR        "VIEW="
53   #define  VIEWSTRL       5
54 +
55 +
56 + extern char     *setview(VIEW *v);
57 + extern void     normaspect(double va, double *ap, int *xp, int *yp);
58 + extern double   viewray(FVECT orig, FVECT direc, VIEW *v, double x, double y);
59 + extern void     viewloc(FVECT ip, VIEW *v, FVECT p);
60 + extern void     pix2loc(RREAL loc[2], RESOLU *rp, int px, int py);
61 + extern void     loc2pix(int pp[2], RESOLU *rp, double lx, double ly);
62 + extern int      getviewopt(VIEW *v, int ac, char *av[]);
63 + extern int      sscanview(VIEW *vp, char *s);
64 + extern void     fprintview(VIEW *vp, FILE *fp);
65 + extern char     *viewopt(VIEW *vp);
66 + extern int      isview(char *s);
67 + extern int      viewfile(char *fname, VIEW *vp, RESOLU *rp);
68 +
69 +
70 + #ifdef __cplusplus
71 + }
72 + #endif
73 + #endif /* _RAD_VIEW_H_ */
74 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines