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

Comparing ray/src/rt/rv2.c (file contents):
Revision 2.45 by greg, Fri Jan 21 00:52:59 2005 UTC vs.
Revision 2.47 by greg, Thu Apr 14 17:34:49 2005 UTC

# Line 14 | Line 14 | static const char      RCSid[] = "$Id$";
14  
15   #include  "platform.h"
16   #include  "ray.h"
17 + #include  "source.h"
18   #include  "ambient.h"
19   #include  "otypes.h"
20   #include  "rpaint.h"
# Line 725 | Line 726 | char  *s;
726          if (thisray.ro == NULL)
727                  (*dev->comout)("ray hit nothing");
728          else {
729 <                sprintf(buf, "ray hit %s%s %s \"%s\"",
730 <                                thisray.rod < 0.0 ? "back of " : "",
731 <                                thisray.ro->omod == OVOID ? VOIDID :
732 <                                        objptr(thisray.ro->omod)->oname,
729 >                OBJREC  *mat = NULL;
730 >                OBJREC  *mod = NULL;;
731 >                char    matspec[256];
732 >                matspec[0] = '\0';
733 >                if (thisray.ro->omod != OVOID) {
734 >                        mod = objptr(thisray.ro->omod);
735 >                        mat = findmaterial(mod);
736 >                }
737 >                if (thisray.rod < 0.0)
738 >                        strcpy(matspec, "back of ");
739 >                if (mod != NULL) {
740 >                        strcat(matspec, mod->oname);
741 >                        if (mat != mod)
742 >                                sprintf(matspec+strlen(matspec), " (%s)",
743 >                                        mat!=NULL ? mat->oname : VOIDID);
744 >                } else
745 >                        strcat(matspec, VOIDID);
746 >                sprintf(buf, "ray hit %s %s \"%s\"", matspec,
747                                  ofun[thisray.ro->otype].funame,
748                                  thisray.ro->oname);
749                  if ((ino = objptr(thisray.robj)) != thisray.ro)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines