Back to index

radiance  4R0+20100331
Functions | Variables
p_func.c File Reference
#include "copyright.h"
#include "ray.h"
#include "func.h"
#include "rtotypes.h"

Go to the source code of this file.

Functions

int p_bfunc (OBJREC *m, RAY *r)
int p_cfunc (OBJREC *m, RAY *r)

Variables

static const char RCSid [] = "$Id: p_func.c,v 2.7 2004/03/30 16:13:01 schorsch Exp $"

Function Documentation

int p_bfunc ( OBJREC m,
RAY r 
)

Definition at line 38 of file p_func.c.

{
       double  bval;
       register MFUNC  *mf;

       if (m->oargs.nsargs < 2)
              objerror(m, USER, "bad # arguments");
       mf = getfunc(m, 1, 0x1, 0);
       setfunc(m, r);
       errno = 0;
       bval = evalue(mf->ep[0]);
       if (errno == EDOM || errno == ERANGE) {
              objerror(m, WARNING, "compute error");
              return(0);
       }
       scalecolor(r->pcol, bval);
       return(0);
}

Here is the call graph for this function:

int p_cfunc ( OBJREC m,
RAY r 
)

Definition at line 62 of file p_func.c.

{
       COLOR  cval;
       register MFUNC  *mf;

       if (m->oargs.nsargs < 4)
              objerror(m, USER, "bad # arguments");
       mf = getfunc(m, 3, 0x7, 0);
       setfunc(m, r);
       errno = 0;
       setcolor(cval, evalue(mf->ep[0]),
                     evalue(mf->ep[1]),
                     evalue(mf->ep[2]));
       if (errno == EDOM || errno == ERANGE) {
              objerror(m, WARNING, "compute error");
              return(0);
       }
       multcolor(r->pcol, cval);
       return(0);
}

Here is the call graph for this function:


Variable Documentation

const char RCSid[] = "$Id: p_func.c,v 2.7 2004/03/30 16:13:01 schorsch Exp $" [static]

Definition at line 2 of file p_func.c.