ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/source.h
Revision: 1.7
Committed: Thu Jun 20 09:03:21 1991 UTC (32 years, 10 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 1.6: +1 -1 lines
Log Message:
*** empty log message ***

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 greg 1.6 #define AIMREQT 100 /* required aim success/failure */
12    
13 greg 1.1 #define SDISTANT 01 /* source distant flag */
14     #define SSKIP 02 /* source skip flag */
15 greg 1.3 #define SPROX 04 /* source proximity flag */
16     #define SSPOT 010 /* source spotlight flag */
17 greg 1.6 #define SVIRTUAL 020 /* source virtual flag */
18     #define SFLAT 040 /* source flat flag */
19     #define SFOLLOW 0100 /* source follow path flag */
20 greg 1.1
21     typedef struct {
22 greg 1.6 FVECT aim; /* aim direction or center */
23     float siz; /* output solid angle or area */
24 greg 1.3 float flen; /* focal length */
25     } SPOT; /* spotlight */
26    
27     typedef struct {
28 greg 1.6 int sflags; /* source flags */
29 greg 1.1 FVECT sloc; /* direction or position of source */
30 greg 1.6 FVECT snorm; /* surface normal of flat source */
31 greg 1.1 float ss; /* tangent or disk radius */
32     float ss2; /* domega or projected area */
33 greg 1.6 struct {
34 greg 1.3 float prox; /* proximity */
35     SPOT *s; /* spot */
36     } sl; /* localized source information */
37 greg 1.6 union {
38     int success; /* successes - AIMREQT*failures */
39     int svnext; /* next source to aim for */
40     } sa; /* source aiming information */
41 greg 1.2 long ntests, nhits; /* shadow tests and hits */
42 greg 1.6 OBJREC *so; /* source destination object */
43 greg 1.2 } SRCREC; /* light source */
44 greg 1.1
45 greg 1.2 typedef struct {
46     FVECT dir; /* source direction */
47 greg 1.7 COLOR coef; /* material coefficient */
48 greg 1.2 COLOR val; /* contribution */
49     } CONTRIB; /* direct contribution */
50 greg 1.4
51     typedef struct {
52     int sno; /* source number */
53     float brt; /* brightness (for comparison) */
54     } CNTPTR; /* contribution pointer */
55 greg 1.1
56 greg 1.2 extern SRCREC *source; /* our source list */
57 greg 1.1 extern int nsources; /* the number of sources */
58    
59 greg 1.2 extern double srcray(); /* ray to source */
60 greg 1.3
61     extern SPOT *makespot(); /* make spotlight */
62 greg 1.6
63     extern SRCREC *newsource(); /* allocate new source */