--- ray/src/hd/rholo.h 1997/12/02 12:29:18 3.7 +++ ray/src/hd/rholo.h 2003/02/22 02:07:25 3.21 @@ -1,7 +1,4 @@ -/* Copyright (c) 1997 Silicon Graphics, Inc. */ - -/* SCCSid "$SunId$ SGI" */ - +/* RCSid: $Id: rholo.h,v 3.21 2003/02/22 02:07:25 greg Exp $ */ /* * Header file for rholo program */ @@ -18,7 +15,7 @@ typedef struct packet { int4 bi; /* beam index (second) */ int4 nr; /* number of rays (third) */ int4 nc; /* number calculated (fourth) */ - RAYVAL ra[RPACKSIZ]; /* ray values (fourth) */ + RAYVAL ra[RPACKSIZ]; /* ray values (fifth) */ float *offset; /* offset array if !vbool(OBSTRUCTIONS) */ struct packet *next; /* next in packet list */ } PACKET; /* a beam packet */ @@ -33,35 +30,49 @@ typedef struct { #define packsiz(nr) (sizeof(PACKHEAD)+(nr)*sizeof(RAYVAL)) #define packra(p) ((RAYVAL *)((p)+1)) +typedef struct { + int nb; /* number of beams in list */ + PACKHEAD *bl; /* allocated beam list */ +} BEAMLIST; /* a list of beam requests */ + +typedef struct { + FVECT vpt; /* view (eye point) position */ + double rng; /* desired mean radius for sample rays */ +} VIEWPOINT; /* target eye position */ + /* input variables */ -#define RENDER 0 /* rendering options */ -#define SECTION 1 /* holodeck section boundaries */ -#define OCTREE 2 /* octree file name */ -#define RIF 3 /* rad input file */ -#define TIME 4 /* maximum rendering time */ -#define DISKSPACE 5 /* how much disk space to use */ -#define CACHE 6 /* amount of memory to use as cache */ -#define GRID 7 /* target grid size */ -#define OBSTRUCTIONS 8 /* shall we track obstructions? */ -#define VDIST 9 /* virtual distance calculation */ -#define OCCUPANCY 10 /* expected occupancy probability */ -#define REPORT 11 /* report interval and error file */ +#define CACHE 0 /* amount of memory to use as cache */ +#define DISKSPACE 1 /* how much disk space to use */ +#define EYESEP 2 /* eye separation distance */ +#define GEOMETRY 3 /* section geometry */ +#define GRID 4 /* target grid size */ +#define OBSTRUCTIONS 5 /* shall we track obstructions? */ +#define OCTREE 6 /* octree file name */ +#define PORTS 7 /* section portals */ +#define RENDER 8 /* rendering options */ +#define REPORT 9 /* report interval and error file */ +#define RIF 10 /* rad input file */ +#define SECTION 11 /* holodeck section boundaries */ +#define TIME 12 /* maximum rendering time */ +#define VDIST 13 /* virtual distance calculation */ -#define NRHVARS 12 /* number of variables */ +#define NRHVARS 14 /* number of variables */ #define RHVINIT { \ - {"render", 3, 0, NULL, catvalues}, \ - {"section", 3, 0, NULL, NULL}, \ - {"OCTREE", 3, 0, NULL, onevalue}, \ - {"RIF", 3, 0, NULL, onevalue}, \ - {"TIME", 2, 0, NULL, fltvalue}, \ - {"DISKSPACE", 3, 0, NULL, fltvalue}, \ {"CACHE", 2, 0, NULL, fltvalue}, \ + {"DISKSPACE", 3, 0, NULL, fltvalue}, \ + {"EYESEP", 3, 0, NULL, fltvalue}, \ + {"geometry", 3, 0, NULL, NULL}, \ {"GRID", 2, 0, NULL, fltvalue}, \ {"OBSTRUCTIONS",3, 0, NULL, boolvalue}, \ - {"VDISTANCE", 2, 0, NULL, boolvalue}, \ - {"OCCUPANCY", 3, 0, NULL, onevalue}, \ + {"OCTREE", 3, 0, NULL, onevalue}, \ + {"portals", 3, 0, NULL, NULL}, \ + {"render", 3, 0, NULL, catvalues}, \ {"REPORT", 3, 0, NULL, onevalue}, \ + {"RIF", 3, 0, NULL, onevalue}, \ + {"section", 3, 0, NULL, NULL}, \ + {"TIME", 2, 0, NULL, fltvalue}, \ + {"VDISTANCE", 2, 0, NULL, boolvalue}, \ } /* bundle set requests */ @@ -69,6 +80,7 @@ typedef struct { #define BS_ADD 2 /* add to current set */ #define BS_ADJ 3 /* adjust current set quantities */ #define BS_DEL 4 /* delete from current set */ +#define BS_MAX 5 /* set to max of old and new */ extern char *progname; /* our program name */ extern char *hdkfile; /* holodeck file name */ @@ -76,17 +88,29 @@ extern char froot[]; /* root file name */ extern char *outdev; /* output device name */ +extern int readinp; /* read input from stdin */ + +extern int force; /* allow overwrite of holodeck */ + extern int nowarn; /* turn warnings off? */ -extern int ncprocs; /* number of compute processes */ +extern int ncprocs; /* number of requested compute processes */ +extern int nprocs; /* number of running compute processes */ -extern double expval; /* global exposure value */ +extern int chunkycmp; /* using "chunky" comparison mode */ +extern VIEWPOINT myeye; /* target view position */ + extern time_t starttime; /* time we got started */ extern time_t endtime; /* time we should end by */ extern time_t reporttime; /* time for next report */ +extern long nraysdone; /* number of rays done */ +extern long npacksdone; /* number of packets done */ + extern int rtargc; /* rtrace command */ extern char *rtargv[]; extern PACKET *do_packets(), *get_packets(), *flush_queue(); + +extern int2 *viewbeams();