ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/source.h
Revision: 1.5
Committed: Mon Feb 11 08:43:46 1991 UTC (33 years, 2 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.4: +3 -0 lines
Log Message:
changed complaint timing for source aiming failures.

File Contents

# User Rev Content
1 greg 1.1 /* Copyright (c) 1986 Regents of the University of California */
2    
3     /* SCCSid "$SunId$ LBL" */
4    
5     /*
6     * source.h - header file for ray tracing sources.
7     *
8     * 8/20/85
9     */
10    
11     #define SDISTANT 01 /* source distant flag */
12     #define SSKIP 02 /* source skip flag */
13 greg 1.3 #define SPROX 04 /* source proximity flag */
14     #define SSPOT 010 /* source spotlight flag */
15 greg 1.1
16 greg 1.5 #define AIMREQT 100 /* required aim success/failure */
17    
18 greg 1.1 typedef struct {
19 greg 1.3 float siz; /* output solid angle */
20     float flen; /* focal length */
21     FVECT aim; /* aim direction */
22     } SPOT; /* spotlight */
23    
24     typedef struct {
25 greg 1.1 short sflags; /* source flags */
26     FVECT sloc; /* direction or position of source */
27     float ss; /* tangent or disk radius */
28     float ss2; /* domega or projected area */
29 greg 1.3 union {
30     float prox; /* proximity */
31     SPOT *s; /* spot */
32     } sl; /* localized source information */
33 greg 1.5 int aimsuccess; /* aim successes - AIMREQT*failures */
34 greg 1.2 long ntests, nhits; /* shadow tests and hits */
35 greg 1.1 OBJREC *so; /* source object */
36 greg 1.2 } SRCREC; /* light source */
37 greg 1.1
38 greg 1.2 typedef struct {
39     FVECT dir; /* source direction */
40     float dom; /* domega for source */
41     COLOR val; /* contribution */
42     } CONTRIB; /* direct contribution */
43 greg 1.4
44     typedef struct {
45     int sno; /* source number */
46     float brt; /* brightness (for comparison) */
47     } CNTPTR; /* contribution pointer */
48 greg 1.1
49 greg 1.2 extern SRCREC *source; /* our source list */
50 greg 1.1 extern int nsources; /* the number of sources */
51    
52 greg 1.2 extern double srcray(); /* ray to source */
53 greg 1.3
54     extern SPOT *makespot(); /* make spotlight */