--- ray/src/common/view.h 1990/10/13 20:56:04 1.6 +++ ray/src/common/view.h 1996/01/09 12:21:13 2.6 @@ -1,4 +1,4 @@ -/* Copyright (c) 1988 Regents of the University of California */ +/* Copyright (c) 1994 Regents of the University of California */ /* SCCSid "$SunId$ LBL" */ @@ -13,6 +13,7 @@ #define VT_PAR 'l' /* parallel */ #define VT_ANG 'a' /* angular fisheye */ #define VT_HEM 'h' /* hemispherical fisheye */ +#define VT_CYL 'c' /* cylindrical panorama */ typedef struct { int type; /* view type */ @@ -23,6 +24,8 @@ typedef struct { double vert; /* vertical view size */ double hoff; /* horizontal image offset */ double voff; /* vertical image offset */ + double vfore; /* fore clipping plane */ + double vaft; /* aft clipping plane (<=0 for inf) */ FVECT hvec; /* computed horizontal image vector */ FVECT vvec; /* computed vertical image vector */ double hn2; /* DOT(hvec,hvec) */ @@ -33,10 +36,15 @@ extern VIEW stdview; extern char *setview(); -extern double sqrt(); +extern double viewray(); +extern char *viewopt(); + #define viewaspect(v) sqrt((v)->vn2/(v)->hn2) -#define STDVIEW {VT_PER,0.,0.,0.,0.,1.,0.,0.,0.,1.,45.,45.,0.,0.} +#define STDVIEW {VT_PER,{0.,0.,0.},{0.,1.,0.},{0.,0.,1.}, \ + 45.,45.,0.,0.,0.,0., \ + {0.,0.,0.},{0.,0.,0.},0.,0.} #define VIEWSTR "VIEW=" +#define VIEWSTRL 5