1 |
< |
/* RCSid: $Id$ */ |
1 |
> |
/* RCSid $Id$ */ |
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 |
< |
/* ==================================================================== |
10 |
< |
* The Radiance Software License, Version 1.0 |
11 |
< |
* |
12 |
< |
* Copyright (c) 1990 - 2002 The Regents of the University of California, |
13 |
< |
* through Lawrence Berkeley National Laboratory. All rights reserved. |
14 |
< |
* |
15 |
< |
* Redistribution and use in source and binary forms, with or without |
16 |
< |
* modification, are permitted provided that the following conditions |
15 |
< |
* are met: |
16 |
< |
* |
17 |
< |
* 1. Redistributions of source code must retain the above copyright |
18 |
< |
* notice, this list of conditions and the following disclaimer. |
19 |
< |
* |
20 |
< |
* 2. Redistributions in binary form must reproduce the above copyright |
21 |
< |
* notice, this list of conditions and the following disclaimer in |
22 |
< |
* the documentation and/or other materials provided with the |
23 |
< |
* distribution. |
24 |
< |
* |
25 |
< |
* 3. The end-user documentation included with the redistribution, |
26 |
< |
* if any, must include the following acknowledgment: |
27 |
< |
* "This product includes Radiance software |
28 |
< |
* (http://radsite.lbl.gov/) |
29 |
< |
* developed by the Lawrence Berkeley National Laboratory |
30 |
< |
* (http://www.lbl.gov/)." |
31 |
< |
* Alternately, this acknowledgment may appear in the software itself, |
32 |
< |
* if and wherever such third-party acknowledgments normally appear. |
33 |
< |
* |
34 |
< |
* 4. The names "Radiance," "Lawrence Berkeley National Laboratory" |
35 |
< |
* and "The Regents of the University of California" must |
36 |
< |
* not be used to endorse or promote products derived from this |
37 |
< |
* software without prior written permission. For written |
38 |
< |
* permission, please contact [email protected]. |
39 |
< |
* |
40 |
< |
* 5. Products derived from this software may not be called "Radiance", |
41 |
< |
* nor may "Radiance" appear in their name, without prior written |
42 |
< |
* permission of Lawrence Berkeley National Laboratory. |
43 |
< |
* |
44 |
< |
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
45 |
< |
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
46 |
< |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
47 |
< |
* DISCLAIMED. IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR |
48 |
< |
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
49 |
< |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
50 |
< |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
51 |
< |
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
52 |
< |
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
53 |
< |
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
54 |
< |
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
55 |
< |
* SUCH DAMAGE. |
56 |
< |
* ==================================================================== |
57 |
< |
* |
58 |
< |
* This software consists of voluntary contributions made by many |
59 |
< |
* individuals on behalf of Lawrence Berkeley National Laboratory. For more |
60 |
< |
* information on Lawrence Berkeley National Laboratory, please see |
61 |
< |
* <http://www.lbl.gov/>. |
62 |
< |
*/ |
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 |
|
|
18 |
< |
/* flag for materials to ignore during irradiance comp. */ |
19 |
< |
#define T_IRR_IGN T_SP1 |
18 |
> |
/* test for completely opaque materials */ |
19 |
> |
#define T_OPAQUE T_SP2 |
20 |
> |
#define isopaque(m) (ofun[(m)->otype].flags & T_OPAQUE || \ |
21 |
> |
(((m)->otype==MAT_WGMDF) & ((m)->oargs.nsargs > 5) \ |
22 |
> |
&& !strcmp((m)->oargs.sarg[5], "0"))) |
23 |
|
|
24 |
< |
#define irr_ignore(t) (ofun[t].flags & T_IRR_IGN) |
24 |
> |
/* test if we have a BSDF proxy surface */ |
25 |
> |
#define isBSDFproxy(m) (((m)->otype==MAT_BSDF) & ((m)->oargs.nsargs > 0) \ |
26 |
> |
&& strcmp((m)->oargs.sarg[0], "0")) |
27 |
> |
|
28 |
> |
/* defined in initotypes.c */ |
29 |
> |
extern OBJREC *findmaterial(OBJREC *o); |
30 |
> |
|
31 |
> |
#ifdef __cplusplus |
32 |
> |
} |
33 |
> |
#endif |
34 |
> |
|
35 |
> |
#endif /* _RAD_OTSPECIAL_H_ */ |