9 |
|
#include "copyright.h" |
10 |
|
|
11 |
|
#include "ray.h" |
12 |
– |
|
12 |
|
#include "otypes.h" |
13 |
< |
|
13 |
> |
#include "rtotypes.h" |
14 |
|
#include "source.h" |
16 |
– |
|
15 |
|
#include "func.h" |
16 |
|
|
17 |
|
/* |
28 |
|
* n A1 A2 .. An |
29 |
|
*/ |
30 |
|
|
31 |
+ |
static int redirect(OBJREC *m, RAY *r, int n); |
32 |
+ |
static int dir_proj(MAT4 pm, OBJREC *o, SRCREC *s, int n); |
33 |
|
|
34 |
– |
static int dir_proj(); |
35 |
– |
|
34 |
|
VSMATERIAL direct1_vs = {dir_proj, 1}; |
35 |
|
VSMATERIAL direct2_vs = {dir_proj, 2}; |
36 |
|
|
39 |
|
getfunc(m, 8, 0xff, 1) ) |
40 |
|
|
41 |
|
|
42 |
< |
int |
43 |
< |
m_direct(m, r) /* shade redirected ray */ |
44 |
< |
register OBJREC *m; |
45 |
< |
register RAY *r; |
42 |
> |
extern int |
43 |
> |
m_direct( /* shade redirected ray */ |
44 |
> |
register OBJREC *m, |
45 |
> |
register RAY *r |
46 |
> |
) |
47 |
|
{ |
48 |
|
/* check if source ray */ |
49 |
|
if (r->rsrc >= 0 && source[r->rsrc].so != r->ro) |
60 |
|
} |
61 |
|
|
62 |
|
|
63 |
< |
int |
64 |
< |
redirect(m, r, n) /* compute n'th ray redirection */ |
65 |
< |
OBJREC *m; |
66 |
< |
RAY *r; |
67 |
< |
int n; |
63 |
> |
static int |
64 |
> |
redirect( /* compute n'th ray redirection */ |
65 |
> |
OBJREC *m, |
66 |
> |
RAY *r, |
67 |
> |
int n |
68 |
> |
) |
69 |
|
{ |
70 |
|
MFUNC *mf; |
71 |
|
register EPNODE **va; |
132 |
|
|
133 |
|
|
134 |
|
static int |
135 |
< |
dir_proj(pm, o, s, n) /* compute a director's projection */ |
136 |
< |
MAT4 pm; |
137 |
< |
OBJREC *o; |
138 |
< |
SRCREC *s; |
139 |
< |
int n; |
135 |
> |
dir_proj( /* compute a director's projection */ |
136 |
> |
MAT4 pm, |
137 |
> |
OBJREC *o, |
138 |
> |
SRCREC *s, |
139 |
> |
int n |
140 |
> |
) |
141 |
|
{ |
142 |
|
RAY tr; |
143 |
|
OBJREC *m; |