ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/otspecial.h
(Generate patch)

Comparing ray/src/rt/otspecial.h (file contents):
Revision 2.10 by greg, Thu Apr 18 22:37:36 2019 UTC vs.
Revision 2.12 by greg, Thu May 29 16:42:28 2025 UTC

# Line 5 | Line 5
5   */
6   #ifndef _RAD_OTSPECIAL_H_
7   #define _RAD_OTSPECIAL_H_
8 +
9   #ifdef __cplusplus
10   extern "C" {
11   #endif
12 <
12 <                /* flag for nominally transparent materials */
12 >                /* test for nominally transparent materials */
13   #define  T_TRANSP       T_SP1
14 + #define  istransp(m)    (ofun[(m)->otype].flags & T_TRANSP || \
15 +                          (((m)->otype==MAT_WGMDF) & ((m)->oargs.nsargs > 5) \
16 +                                && strcmp((m)->oargs.sarg[5], "0")) || \
17 +                          (((m)->otype==MAT_BRTDF) & ((m)->oargs.nsargs > 5) \
18 +                                && strcmp((m)->oargs.sarg[3], "0") | \
19 +                                   strcmp((m)->oargs.sarg[4], "0") | \
20 +                                   strcmp((m)->oargs.sarg[5], "0")))
21  
22 <                /* flag for completely opaque materials */
22 >                /* test for opaque (SHADOW) materials */
23   #define  T_OPAQUE       T_SP2
24 + #define  isopaque(m)    (ofun[(m)->otype].flags & T_OPAQUE || \
25 +                          (((m)->otype==MAT_WGMDF) & ((m)->oargs.nsargs > 5) \
26 +                                && !strcmp((m)->oargs.sarg[5], "0")) || \
27 +                          (((m)->otype==MAT_BRTDF) & ((m)->oargs.nsargs > 5) \
28 +                                && !strcmp((m)->oargs.sarg[3], "0") & \
29 +                                   !strcmp((m)->oargs.sarg[4], "0") & \
30 +                                   !strcmp((m)->oargs.sarg[5], "0")))
31  
18 #define  istransp(t)    (ofun[t].flags & T_TRANSP)
19
20 #define  isopaque(t)    (ofun[t].flags & T_OPAQUE)
21
32                  /* test if we have a BSDF proxy surface */
33 < #define isBSDFproxy(m)  (((m)->otype == MAT_BSDF) & ((m)->oargs.nsargs > 0) &&\
34 <                                strcmp((m)->oargs.sarg[0], "0"))
33 > #define isBSDFproxy(m)  (((m)->otype==MAT_BSDF) & ((m)->oargs.nsargs > 0) \
34 >                                && strcmp((m)->oargs.sarg[0], "0"))
35  
36                  /* defined in initotypes.c */
37   extern OBJREC   *findmaterial(OBJREC *o);
# Line 29 | Line 39 | extern OBJREC   *findmaterial(OBJREC *o);
39   #ifdef __cplusplus
40   }
41   #endif
42 +
43   #endif /* _RAD_OTSPECIAL_H_ */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines