ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/otspecial.h
Revision: 2.10
Committed: Thu Apr 18 22:37:36 2019 UTC (5 years ago) by greg
Content type: text/plain
Branch: MAIN
CVS Tags: rad5R4, rad5R3, HEAD
Changes since 2.9: +2 -3 lines
Log Message:
Minor optimization should not affect behavior

File Contents

# Content
1 /* RCSid $Id: otspecial.h,v 2.9 2018/11/08 00:54:07 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 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 /* flag for nominally transparent materials */
13 #define T_TRANSP T_SP1
14
15 /* flag for completely opaque materials */
16 #define T_OPAQUE T_SP2
17
18 #define istransp(t) (ofun[t].flags & T_TRANSP)
19
20 #define isopaque(t) (ofun[t].flags & T_OPAQUE)
21
22 /* test if we have a BSDF proxy surface */
23 #define isBSDFproxy(m) (((m)->otype == MAT_BSDF) & ((m)->oargs.nsargs > 0) &&\
24 strcmp((m)->oargs.sarg[0], "0"))
25
26 /* defined in initotypes.c */
27 extern OBJREC *findmaterial(OBJREC *o);
28
29 #ifdef __cplusplus
30 }
31 #endif
32 #endif /* _RAD_OTSPECIAL_H_ */