--- ray/src/common/view.h 2003/10/27 10:19:31 2.15 +++ ray/src/common/view.h 2008/03/11 02:21:46 2.18 @@ -1,16 +1,13 @@ -/* RCSid $Id: view.h,v 2.15 2003/10/27 10:19:31 schorsch Exp $ */ +/* RCSid $Id: view.h,v 2.18 2008/03/11 02:21:46 greg Exp $ */ /* * view.h - header file for image generation. * - * Include after stdio.h and fvect.h + * Include after stdio.h and rtmath.h * Includes resolu.h */ #ifndef _RAD_VIEW_H_ #define _RAD_VIEW_H_ -#include - -#include "rtmath.h" #include "resolu.h" #ifdef __cplusplus @@ -22,6 +19,7 @@ extern "C" { #define VT_PAR 'l' /* parallel */ #define VT_ANG 'a' /* angular fisheye */ #define VT_HEM 'h' /* hemispherical fisheye */ +#define VT_PLS 's' /* planispheric fisheye */ #define VT_CYL 'c' /* cylindrical panorama */ typedef struct { @@ -29,6 +27,7 @@ typedef struct { FVECT vp; /* view origin */ FVECT vdir; /* view direction */ FVECT vup; /* view up */ + double vdist; /* view distance */ double horiz; /* horizontal view size */ double vert; /* vertical view size */ double hoff; /* horizontal image offset */ @@ -46,7 +45,7 @@ extern VIEW stdview; #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.,0.,0., \ + 1.,45.,45.,0.,0.,0.,0., \ {0.,0.,0.},{0.,0.,0.},0.,0.} #define VIEWSTR "VIEW="