| 1 |
gregl |
3.1 |
/* Copyright (c) 1997 Silicon Graphics, Inc. */ |
| 2 |
|
|
|
| 3 |
|
|
/* SCCSid "$SunId$ SGI" */ |
| 4 |
|
|
|
| 5 |
|
|
/* |
| 6 |
|
|
* Header file for rholo program |
| 7 |
|
|
*/ |
| 8 |
|
|
|
| 9 |
|
|
#include "holo.h" |
| 10 |
|
|
#include "vars.h" |
| 11 |
|
|
|
| 12 |
|
|
#ifndef RPACKSIZ |
| 13 |
|
|
#define RPACKSIZ 21 /* good packet size */ |
| 14 |
|
|
#endif |
| 15 |
|
|
|
| 16 |
|
|
typedef struct packet { |
| 17 |
|
|
int2 hd; /* holodeck section (first) */ |
| 18 |
|
|
int4 bi; /* beam index (second) */ |
| 19 |
|
|
int4 nr; /* number of rays (third) */ |
| 20 |
gregl |
3.5 |
int4 nc; /* number calculated (fourth) */ |
| 21 |
gregl |
3.1 |
RAYVAL ra[RPACKSIZ]; /* ray values (fourth) */ |
| 22 |
|
|
float *offset; /* offset array if !vbool(OBSTRUCTIONS) */ |
| 23 |
|
|
struct packet *next; /* next in packet list */ |
| 24 |
|
|
} PACKET; /* a beam packet */ |
| 25 |
|
|
|
| 26 |
|
|
typedef struct { |
| 27 |
|
|
int2 hd; /* holodeck section (first) */ |
| 28 |
|
|
int4 bi; /* beam index (second) */ |
| 29 |
|
|
int4 nr; /* number of rays (third) */ |
| 30 |
gregl |
3.5 |
int4 nc; /* number calculated (fourth) */ |
| 31 |
gregl |
3.1 |
} PACKHEAD; /* followed by ray values */ |
| 32 |
|
|
|
| 33 |
|
|
#define packsiz(nr) (sizeof(PACKHEAD)+(nr)*sizeof(RAYVAL)) |
| 34 |
gregl |
3.3 |
#define packra(p) ((RAYVAL *)((p)+1)) |
| 35 |
gregl |
3.1 |
|
| 36 |
|
|
/* input variables */ |
| 37 |
|
|
#define RENDER 0 /* rendering options */ |
| 38 |
gregl |
3.3 |
#define SECTION 1 /* holodeck section boundaries */ |
| 39 |
|
|
#define OCTREE 2 /* octree file name */ |
| 40 |
|
|
#define RIF 3 /* rad input file */ |
| 41 |
gregl |
3.7 |
#define TIME 4 /* maximum rendering time */ |
| 42 |
|
|
#define DISKSPACE 5 /* how much disk space to use */ |
| 43 |
|
|
#define CACHE 6 /* amount of memory to use as cache */ |
| 44 |
|
|
#define GRID 7 /* target grid size */ |
| 45 |
|
|
#define OBSTRUCTIONS 8 /* shall we track obstructions? */ |
| 46 |
|
|
#define VDIST 9 /* virtual distance calculation */ |
| 47 |
|
|
#define OCCUPANCY 10 /* expected occupancy probability */ |
| 48 |
|
|
#define REPORT 11 /* report interval and error file */ |
| 49 |
gregl |
3.1 |
|
| 50 |
gregl |
3.7 |
#define NRHVARS 12 /* number of variables */ |
| 51 |
gregl |
3.1 |
|
| 52 |
|
|
#define RHVINIT { \ |
| 53 |
|
|
{"render", 3, 0, NULL, catvalues}, \ |
| 54 |
|
|
{"section", 3, 0, NULL, NULL}, \ |
| 55 |
|
|
{"OCTREE", 3, 0, NULL, onevalue}, \ |
| 56 |
|
|
{"RIF", 3, 0, NULL, onevalue}, \ |
| 57 |
|
|
{"TIME", 2, 0, NULL, fltvalue}, \ |
| 58 |
|
|
{"DISKSPACE", 3, 0, NULL, fltvalue}, \ |
| 59 |
|
|
{"CACHE", 2, 0, NULL, fltvalue}, \ |
| 60 |
|
|
{"GRID", 2, 0, NULL, fltvalue}, \ |
| 61 |
|
|
{"OBSTRUCTIONS",3, 0, NULL, boolvalue}, \ |
| 62 |
gregl |
3.6 |
{"VDISTANCE", 2, 0, NULL, boolvalue}, \ |
| 63 |
gregl |
3.1 |
{"OCCUPANCY", 3, 0, NULL, onevalue}, \ |
| 64 |
|
|
{"REPORT", 3, 0, NULL, onevalue}, \ |
| 65 |
|
|
} |
| 66 |
|
|
|
| 67 |
gregl |
3.2 |
/* bundle set requests */ |
| 68 |
gregl |
3.4 |
#define BS_NEW 1 /* replace current set with new one */ |
| 69 |
|
|
#define BS_ADD 2 /* add to current set */ |
| 70 |
gregl |
3.5 |
#define BS_ADJ 3 /* adjust current set quantities */ |
| 71 |
|
|
#define BS_DEL 4 /* delete from current set */ |
| 72 |
gregl |
3.2 |
|
| 73 |
gregl |
3.1 |
extern char *progname; /* our program name */ |
| 74 |
|
|
extern char *hdkfile; /* holodeck file name */ |
| 75 |
|
|
extern char froot[]; /* root file name */ |
| 76 |
|
|
|
| 77 |
gregl |
3.4 |
extern char *outdev; /* output device name */ |
| 78 |
|
|
|
| 79 |
gregl |
3.1 |
extern int nowarn; /* turn warnings off? */ |
| 80 |
|
|
|
| 81 |
gregl |
3.4 |
extern int ncprocs; /* number of compute processes */ |
| 82 |
|
|
|
| 83 |
gregl |
3.1 |
extern double expval; /* global exposure value */ |
| 84 |
|
|
|
| 85 |
|
|
extern time_t starttime; /* time we got started */ |
| 86 |
|
|
extern time_t endtime; /* time we should end by */ |
| 87 |
|
|
extern time_t reporttime; /* time for next report */ |
| 88 |
|
|
|
| 89 |
|
|
extern int rtargc; /* rtrace command */ |
| 90 |
|
|
extern char *rtargv[]; |
| 91 |
|
|
|
| 92 |
|
|
extern PACKET *do_packets(), *get_packets(), *flush_queue(); |