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

Comparing ray/src/common/bsdf_t.c (file contents):
Revision 3.32 by greg, Mon Mar 17 01:53:51 2014 UTC vs.
Revision 3.35 by greg, Mon Mar 24 04:00:45 2014 UTC

# Line 517 | Line 517 | build_scaffold(float val, const double *cmin, double c
517                  sp->wmax = wid;
518          if (sp->alen >= sp->nall) {     /* need more space? */
519                  struct outdir_s *ndarr;
520 <                sp->nall += 1024;
520 >                sp->nall = (int)(1.5*sp->nall) + 256;
521                  ndarr = (struct outdir_s *)realloc(sp->darr,
522                                          sizeof(struct outdir_s)*sp->nall);
523                  if (ndarr == NULL) {
# Line 804 | Line 804 | SDsampTreCDist(FVECT ioVec, double randX, const SDCDst
804                                          /* emit from back? */
805          if ((cd->sidef == SD_BREFL) | (cd->sidef == SD_FXMIT))
806                  gpos[2] = -gpos[2];
807 <        if (cd->isodist) {              /* rotate isotropic result */
807 >        if (cd->isodist) {              /* rotate isotropic sample */
808                  rotangle = atan2(-ioVec[1],-ioVec[0]);
809 <                VCOPY(ioVec, gpos);
810 <                spinvector(ioVec, ioVec, zvec, rotangle);
809 >                spinvector(ioVec, gpos, zvec, rotangle);
810          } else
811                  VCOPY(ioVec, gpos);
812          return SDEnone;
# Line 849 | Line 848 | load_values(char **spp, float *va, int n)
848          char    *svnext;
849  
850          while (n-- > 0 && (svnext = fskip(*spp)) != NULL) {
851 <                *v++ = atof(*spp);
851 >                if ((*v++ = atof(*spp)) < 0)
852 >                        v[-1] = 0;
853                  *spp = svnext;
854                  eat_token(spp, ',');
855          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines