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.14 by greg, Fri Oct 24 05:29:42 2003 UTC vs.
Revision 2.21 by greg, Fri Dec 3 18:10:48 2021 UTC

# Line 2 | Line 2
2   /*
3   *  view.h - header file for image generation.
4   *
5 < *  Include after stdio.h and fvect.h
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  <time.h>
11   #include  "resolu.h"
12  
13   #ifdef __cplusplus
# Line 20 | Line 19 | extern "C" {
19   #define  VT_PAR         'l'             /* parallel */
20   #define  VT_ANG         'a'             /* angular fisheye */
21   #define  VT_HEM         'h'             /* hemispherical fisheye */
22 + #define  VT_PLS         's'             /* planispheric fisheye */
23   #define  VT_CYL         'c'             /* cylindrical panorama */
24  
25   typedef struct {
# Line 27 | Line 27 | typedef struct {
27          FVECT  vp;              /* view origin */
28          FVECT  vdir;            /* view direction */
29          FVECT  vup;             /* view up */
30 +        double  vdist;          /* view distance */
31          double  horiz;          /* horizontal view size */
32          double  vert;           /* vertical view size */
33          double  hoff;           /* horizontal image offset */
# Line 44 | Line 45 | extern VIEW  stdview;
45   #define  viewaspect(v)  sqrt((v)->vn2/(v)->hn2)
46  
47   #define  STDVIEW        {VT_PER,{0.,0.,0.},{0.,1.,0.},{0.,0.,1.}, \
48 <                                45.,45.,0.,0.,0.,0., \
48 >                                1.,45.,45.,0.,0.,0.,0., \
49                                  {0.,0.,0.},{0.,0.,0.},0.,0.}
50  
51   #define  VIEWSTR        "VIEW="
52   #define  VIEWSTRL       5
53  
54 +                                /* return values/flags for viewloc() */
55 + #define VL_BAD          0               /* illegal position (i.e. origin) */
56 + #define VL_GOOD         0x1             /* result is valid */
57 + #define VL_BEHIND       0x2             /* world point is behind fore plane */
58 + #define VL_OUTSIDE      0x4             /* world point is outside frustum */
59 + #define VL_BEYOND       0x8             /* point is beyond aft clipping plane */
60  
61   extern char     *setview(VIEW *v);
62   extern void     normaspect(double va, double *ap, int *xp, int *yp);
63   extern double   viewray(FVECT orig, FVECT direc, VIEW *v, double x, double y);
64 < extern void     viewloc(FVECT ip, VIEW *v, FVECT p);
64 > extern int      jitteraperture(FVECT orig, FVECT direc, VIEW *v, double dia);
65 > extern int      viewloc(FVECT ip, VIEW *v, FVECT p);
66   extern void     pix2loc(RREAL loc[2], RESOLU *rp, int px, int py);
67   extern void     loc2pix(int pp[2], RESOLU *rp, double lx, double ly);
68   extern int      getviewopt(VIEW *v, int ac, char *av[]);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines