ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/rhdobj.c
(Generate patch)

Comparing ray/src/hd/rhdobj.c (file contents):
Revision 3.11 by greg, Sat Feb 22 02:07:24 2003 UTC vs.
Revision 3.13 by schorsch, Thu Jun 26 00:58:10 2003 UTC

# Line 10 | Line 10 | static const char      RCSid[] = "$Id$";
10   #include "rhdisp.h"
11   #include "rhdriver.h"
12   #include "rhdobj.h"
13 + #include "rtprocess.h"
14  
15   extern FILE     *sstdout;               /* user standard output */
16  
# Line 50 | Line 51 | typedef struct dobject {
51          struct dobject  *next;          /* next object in list */
52          char    name[64];               /* object name */
53          FVECT   center;                 /* orig. object center */
54 <        FLOAT   radius;                 /* orig. object radius */
54 >        RREAL   radius;                 /* orig. object radius */
55          int     listid;                 /* GL display list identifier */
56          int     nlists;                 /* number of lists allocated */
57 <        int     rtp[3];                 /* associated rtrace process */
57 >        SUBPROC rtp;                    /* associated rtrace process */
58          DLIGHTS *ol;                    /* object lights */
59          FULLXF  xfb;                    /* coordinate transform */
60          short   drawcode;               /* drawing code */
# Line 118 | Line 119 | register DOBJECT       *op;
119          dobjects = ohead.next;
120          if (!foundlink) {
121                  glDeleteLists(op->listid, op->nlists);
122 <                close_process(op->rtp);
122 >                close_process(&(op->rtp));
123          }
124          while (op->xfac)
125                  freestr(op->xfav[--op->xfac]);
# Line 337 | Line 338 | ssph_compute()                 /* compute source set from sphere sam
338          d = 1.0/ncells;
339          scalecolor(dlightsets->lamb, d);
340   done:                                   /* clear sphere sample array */
341 <        bzero((char *)ssamp, sizeof(ssamp));
341 >        bzero((void *)ssamp, sizeof(ssamp));
342          return(ncells);
343   }
344  
# Line 535 | Line 536 | toomany:
536   dobj_load(oct, nam)             /* create/load an octree object */
537   char    *oct, *nam;
538   {
538        extern char     *getlibpath(), *getpath();
539          char    *fpp, fpath[128];
540          register DOBJECT        *op;
541                                          /* check arguments */
# Line 556 | Line 556 | char   *oct, *nam;
556                  return(0);
557          }
558                                          /* get octree path */
559 <        if ((fpp = getpath(oct, getlibpath(), R_OK)) == NULL) {
559 >        if ((fpp = getpath(oct, getrlibpath(), R_OK)) == NULL) {
560                  sprintf(errmsg, "cannot find octree \"%s\"", oct);
561                  error(COMMAND, errmsg);
562                  return(0);
# Line 579 | Line 579 | char   *oct, *nam;
579                                          /* start rtrace */
580          rtargv[RTARGC-1] = fpath;
581          rtargv[RTARGC] = NULL;
582 <        open_process(op->rtp, rtargv);
582 >        open_process(&(op->rtp), rtargv);
583                                          /* insert into main list */
584          op->next = dobjects;
585          curobj = dobjects = op;
# Line 731 | Line 731 | dobj_unmove()                          /* undo last transform change */
731                  return(0);
732          }
733                                          /* hold last transform */
734 <        bcopy((char *)lastxfav, (char *)txfav,
734 >        bcopy((void *)lastxfav, (void *)txfav,
735                          (txfac=lastxfac)*sizeof(char *));
736                                          /* save this transform */
737 <        bcopy((char *)curobj->xfav, (char *)lastxfav,
737 >        bcopy((void *)curobj->xfav, (void *)lastxfav,
738                          (lastxfac=curobj->xfac)*sizeof(char *));
739                                          /* copy back last transform */
740 <        bcopy((char *)txfav, (char *)curobj->xfav,
740 >        bcopy((void *)txfav, (void *)curobj->xfav,
741                          (curobj->xfac=txfac)*sizeof(char *));
742                                          /* set matrices */
743          fullxf(&curobj->xfb, curobj->xfac, curobj->xfav);
# Line 860 | Line 860 | FVECT   rorg, rdir;
860                  VCOPY(darr, rorg); VCOPY(darr+3, rdir);
861          }
862                                  /* trace it */
863 <        if (process(op->rtp, (char *)darr, (char *)darr, sizeof(double),
863 >        if (process(&(op->rtp), (char *)darr, (char *)darr, sizeof(double),
864                          6*sizeof(double)) != sizeof(double))
865                  error(SYSTEM, "rtrace communication error");
866                                  /* return distance */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines