ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/otspecial.h
Revision: 2.12
Committed: Thu May 29 16:42:28 2025 UTC (2 days, 5 hours ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 2.11: +12 -4 lines
Log Message:
fix: Updated behavior of "mirror" type to handle indirect transmission, thanks to Jon Sargent

File Contents

# Content
1 /* RCSid $Id: otspecial.h,v 2.11 2024/12/09 00:44:29 greg Exp $ */
2 /*
3 * Special type flags for objects used in rendering.
4 * Depends on definitions in otypes.h
5 */
6 #ifndef _RAD_OTSPECIAL_H_
7 #define _RAD_OTSPECIAL_H_
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
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 /* 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
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"))
35
36 /* defined in initotypes.c */
37 extern OBJREC *findmaterial(OBJREC *o);
38
39 #ifdef __cplusplus
40 }
41 #endif
42
43 #endif /* _RAD_OTSPECIAL_H_ */