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 (5 days, 9 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

# User Rev Content
1 greg 2.12 /* RCSid $Id: otspecial.h,v 2.11 2024/12/09 00:44:29 greg Exp $ */
2 greg 1.1 /*
3     * Special type flags for objects used in rendering.
4     * Depends on definitions in otypes.h
5 greg 2.2 */
6 schorsch 2.4 #ifndef _RAD_OTSPECIAL_H_
7     #define _RAD_OTSPECIAL_H_
8 greg 2.11
9 schorsch 2.4 #ifdef __cplusplus
10     extern "C" {
11     #endif
12 greg 2.11 /* test for nominally transparent materials */
13 greg 2.8 #define T_TRANSP T_SP1
14 greg 2.11 #define istransp(m) (ofun[(m)->otype].flags & T_TRANSP || \
15     (((m)->otype==MAT_WGMDF) & ((m)->oargs.nsargs > 5) \
16 greg 2.12 && 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 greg 2.6
22 greg 2.12 /* test for opaque (SHADOW) materials */
23 greg 2.6 #define T_OPAQUE T_SP2
24 greg 2.11 #define isopaque(m) (ofun[(m)->otype].flags & T_OPAQUE || \
25     (((m)->otype==MAT_WGMDF) & ((m)->oargs.nsargs > 5) \
26 greg 2.12 && !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 greg 2.7
32 greg 2.8 /* test if we have a BSDF proxy surface */
33 greg 2.11 #define isBSDFproxy(m) (((m)->otype==MAT_BSDF) & ((m)->oargs.nsargs > 0) \
34     && strcmp((m)->oargs.sarg[0], "0"))
35 schorsch 2.4
36 greg 2.9 /* defined in initotypes.c */
37     extern OBJREC *findmaterial(OBJREC *o);
38    
39 schorsch 2.4 #ifdef __cplusplus
40     }
41     #endif
42 greg 2.11
43 schorsch 2.4 #endif /* _RAD_OTSPECIAL_H_ */