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

Comparing ray/src/rt/rv3.c (file contents):
Revision 2.9 by greg, Fri Aug 18 10:27:11 1995 UTC vs.
Revision 2.10 by greg, Sat Feb 22 02:07:29 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1994 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   *  rv3.c - miscellaneous routines for rview.
6   *
7 < *     5/11/87
7 > *  External symbols declared in rpaint.h
8   */
9  
10 + /* ====================================================================
11 + * The Radiance Software License, Version 1.0
12 + *
13 + * Copyright (c) 1990 - 2002 The Regents of the University of California,
14 + * through Lawrence Berkeley National Laboratory.   All rights reserved.
15 + *
16 + * Redistribution and use in source and binary forms, with or without
17 + * modification, are permitted provided that the following conditions
18 + * are met:
19 + *
20 + * 1. Redistributions of source code must retain the above copyright
21 + *         notice, this list of conditions and the following disclaimer.
22 + *
23 + * 2. Redistributions in binary form must reproduce the above copyright
24 + *       notice, this list of conditions and the following disclaimer in
25 + *       the documentation and/or other materials provided with the
26 + *       distribution.
27 + *
28 + * 3. The end-user documentation included with the redistribution,
29 + *           if any, must include the following acknowledgment:
30 + *             "This product includes Radiance software
31 + *                 (http://radsite.lbl.gov/)
32 + *                 developed by the Lawrence Berkeley National Laboratory
33 + *               (http://www.lbl.gov/)."
34 + *       Alternately, this acknowledgment may appear in the software itself,
35 + *       if and wherever such third-party acknowledgments normally appear.
36 + *
37 + * 4. The names "Radiance," "Lawrence Berkeley National Laboratory"
38 + *       and "The Regents of the University of California" must
39 + *       not be used to endorse or promote products derived from this
40 + *       software without prior written permission. For written
41 + *       permission, please contact [email protected].
42 + *
43 + * 5. Products derived from this software may not be called "Radiance",
44 + *       nor may "Radiance" appear in their name, without prior written
45 + *       permission of Lawrence Berkeley National Laboratory.
46 + *
47 + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
48 + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
49 + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
50 + * DISCLAIMED.   IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR
51 + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
52 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
53 + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
54 + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
55 + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
56 + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
57 + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 + * SUCH DAMAGE.
59 + * ====================================================================
60 + *
61 + * This software consists of voluntary contributions made by many
62 + * individuals on behalf of Lawrence Berkeley National Laboratory.   For more
63 + * information on Lawrence Berkeley National Laboratory, please see
64 + * <http://www.lbl.gov/>.
65 + */
66 +
67   #include  "ray.h"
68  
15 #include  "octree.h"
16
69   #include  "rpaint.h"
70  
71   #include  "random.h"
# Line 33 | Line 85 | static char SCCSid[] = "$SunId$ LBL";
85   #endif
86  
87  
88 + int
89   getrect(s, r)                           /* get a box */
90   char  *s;
91   register RECT  *r;
# Line 79 | Line 132 | register RECT  *r;
132   }
133  
134  
135 + int
136   getinterest(s, direc, vec, mp)          /* get area of interest */
137   char  *s;
138   int  direc;
# Line 143 | Line 197 | register COLOR  col;
197   }
198  
199  
200 + void
201   paint(p, xmin, ymin, xmax, ymax)        /* compute and paint a rectangle */
202   register PNODE  *p;
203   int  xmin, ymin, xmax, ymax;
204   {
150        extern unsigned long  nrays;
205          static unsigned long  lastflush = 0;
206          static RAY  thisray;
207          double  h, v;
# Line 185 | Line 239 | int  xmin, ymin, xmax, ymax;
239   }
240  
241  
242 + void
243   newimage()                              /* start a new image */
244   {
245                                                  /* free old image */
# Line 205 | Line 260 | newimage()                             /* start a new image */
260   }
261  
262  
263 + void
264   redraw()                                /* redraw the image */
265   {
266          (*dev->clear)(hresolu, vresolu);
# Line 214 | Line 270 | redraw()                               /* redraw the image */
270   }
271  
272  
273 + void
274   repaint(xmin, ymin, xmax, ymax)                 /* repaint a region */
275   int  xmin, ymin, xmax, ymax;
276   {
# Line 226 | Line 283 | int  xmin, ymin, xmax, ymax;
283   }
284  
285  
286 + void
287   paintrect(p, xmin, ymin, xmax, ymax, r)         /* paint picture rectangle */
288   register PNODE  *p;
289   int  xmin, ymin, xmax, ymax;
# Line 296 | Line 354 | int  pd;
354   }
355  
356  
357 + void
358   scalepict(p, sf)                        /* scale picture values */
359   register PNODE  *p;
360   double  sf;
# Line 312 | Line 371 | double  sf;
371   }
372  
373  
374 + void
375   getpictcolrs(yoff, scan, p, xsiz, ysiz) /* get scanline from picture */
376   int  yoff;
377   register COLR  *scan;
# Line 342 | Line 402 | int  xsiz, ysiz;
402   }
403  
404  
405 < pcopy(p1, p2)                           /* copy paint node p1 into p2 */
346 < register PNODE  *p1, *p2;
347 < {
348 <        copycolor(p2->v, p1->v);
349 <        p2->x = p1->x;
350 <        p2->y = p1->y;
351 < }
352 <
353 <
405 > void
406   freepkids(p)                            /* free pnode's children */
407   register PNODE  *p;
408   {
# Line 360 | Line 412 | register PNODE  *p;
412          freepkids(p->kid+DR);
413          freepkids(p->kid+UL);
414          freepkids(p->kid+UR);
415 <        free((char *)p->kid);
415 >        free((void *)p->kid);
416          p->kid = NULL;
417   }
418  
419  
420 + void
421   newview(vp)                             /* change viewing parameters */
422   register VIEW  *vp;
423   {
# Line 381 | Line 434 | register VIEW  *vp;
434   }
435  
436  
437 + void
438   moveview(angle, elev, mag, vc)                  /* move viewpoint */
439   double  angle, elev, mag;
440   FVECT  vc;
# Line 425 | Line 479 | FVECT  vc;
479   }
480  
481  
482 + void
483 + pcopy(p1, p2)                           /* copy paint node p1 into p2 */
484 + register PNODE  *p1, *p2;
485 + {
486 +        copycolor(p2->v, p1->v);
487 +        p2->x = p1->x;
488 +        p2->y = p1->y;
489 + }
490 +
491 +
492 + void
493   zoomview(vp, zf)                        /* zoom in or out */
494   register VIEW  *vp;
495   double  zf;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines