--- ray/src/rt/ambient.h 2003/02/25 02:47:22 2.8 +++ ray/src/rt/ambient.h 2005/02/23 18:18:21 2.11 @@ -1,12 +1,15 @@ -/* RCSid $Id: ambient.h,v 2.8 2003/02/25 02:47:22 greg Exp $ */ +/* RCSid $Id: ambient.h,v 2.11 2005/02/23 18:18:21 greg Exp $ */ /* * Common definitions for interreflection routines. * * Include after ray.h */ +#ifndef _RAD_AMBIENT_H_ +#define _RAD_AMBIENT_H_ +#ifdef __cplusplus +extern "C" { +#endif -#include "copyright.h" - /* * Since we've defined our vectors as float below to save space, * watch out for changes in the definitions of VCOPY() and DOT() @@ -46,39 +49,14 @@ typedef struct { extern double maxarad; /* maximum ambient radius */ extern double minarad; /* minimum ambient radius */ +#ifndef AVGREFL #define AVGREFL 0.5 /* assumed average reflectance */ +#endif #define AMBVALSIZ 75 /* number of bytes in portable AMBVAL struct */ #define AMBMAGIC 557 /* magic number for ambient value files */ #define AMBFMT "Radiance_ambval" /* format id string */ -#ifdef NOPROTO - -extern int divsample(); -extern double doambient(); -extern void inithemi(); -extern void comperrs(); -extern void posgradient(); -extern void dirgradient(); -extern void setambres(); -extern void setambacc(); -extern void setambient(); -extern void ambdone(); -extern void ambnotify(); -extern void ambient(); -extern double sumambient(); -extern double makeambient(); -extern void extambient(); -extern int ambsync(); -extern void putambmagic(); -extern int hasambmagic(); -extern int writambval(); -extern int ambvalOK(); -extern int readambval(); -extern void lookamb(); -extern void writamb(); - -#else /* defined in ambcomp.c */ extern int divsample(AMBSAMP *dp, AMBHEMI *h, RAY *r); extern double doambient(COLOR acol, RAY *r, double wt, FVECT pg, FVECT dg); @@ -108,4 +86,9 @@ extern int readambval(AMBVAL *av, FILE *fp); extern void lookamb(FILE *fp); extern void writamb(FILE *fp); + +#ifdef __cplusplus +} #endif +#endif /* _RAD_AMBIENT_H_ */ +