1 |
|
#ifndef lint |
2 |
< |
static const char RCSid[] = "$Id$"; |
2 |
> |
static const char RCSid[] = "$Id"; |
3 |
|
#endif |
4 |
|
/* |
5 |
|
* Radiance object animation program |
9 |
|
* See ranimove.h and the ranimove(1) man page for details. |
10 |
|
*/ |
11 |
|
|
12 |
< |
/* ==================================================================== |
13 |
< |
* The Radiance Software License, Version 1.0 |
14 |
< |
* |
15 |
< |
* Copyright (c) 1990 - 2002 The Regents of the University of California, |
16 |
< |
* through Lawrence Berkeley National Laboratory. All rights reserved. |
17 |
< |
* |
18 |
< |
* Redistribution and use in source and binary forms, with or without |
19 |
< |
* modification, are permitted provided that the following conditions |
20 |
< |
* are met: |
21 |
< |
* |
22 |
< |
* 1. Redistributions of source code must retain the above copyright |
23 |
< |
* notice, this list of conditions and the following disclaimer. |
24 |
< |
* |
25 |
< |
* 2. Redistributions in binary form must reproduce the above copyright |
26 |
< |
* notice, this list of conditions and the following disclaimer in |
27 |
< |
* the documentation and/or other materials provided with the |
28 |
< |
* distribution. |
29 |
< |
* |
30 |
< |
* 3. The end-user documentation included with the redistribution, |
31 |
< |
* if any, must include the following acknowledgment: |
32 |
< |
* "This product includes Radiance software |
33 |
< |
* (http://radsite.lbl.gov/) |
34 |
< |
* developed by the Lawrence Berkeley National Laboratory |
35 |
< |
* (http://www.lbl.gov/)." |
36 |
< |
* Alternately, this acknowledgment may appear in the software itself, |
37 |
< |
* if and wherever such third-party acknowledgments normally appear. |
38 |
< |
* |
39 |
< |
* 4. The names "Radiance," "Lawrence Berkeley National Laboratory" |
40 |
< |
* and "The Regents of the University of California" must |
41 |
< |
* not be used to endorse or promote products derived from this |
42 |
< |
* software without prior written permission. For written |
43 |
< |
* permission, please contact [email protected]. |
44 |
< |
* |
45 |
< |
* 5. Products derived from this software may not be called "Radiance", |
46 |
< |
* nor may "Radiance" appear in their name, without prior written |
47 |
< |
* permission of Lawrence Berkeley National Laboratory. |
48 |
< |
* |
49 |
< |
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
50 |
< |
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
51 |
< |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
52 |
< |
* DISCLAIMED. IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR |
53 |
< |
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
54 |
< |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
55 |
< |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
56 |
< |
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
57 |
< |
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
58 |
< |
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
59 |
< |
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
60 |
< |
* SUCH DAMAGE. |
61 |
< |
* ==================================================================== |
62 |
< |
* |
63 |
< |
* This software consists of voluntary contributions made by many |
64 |
< |
* individuals on behalf of Lawrence Berkeley National Laboratory. For more |
65 |
< |
* information on Lawrence Berkeley National Laboratory, please see |
66 |
< |
* <http://www.lbl.gov/>. |
67 |
< |
*/ |
12 |
> |
#include "copyright.h" |
13 |
|
|
14 |
< |
#include "ranimove.h" |
15 |
< |
#include <sys/time.h> |
14 |
> |
#include <time.h> |
15 |
> |
#ifndef _WIN32 |
16 |
> |
#include <sys/time.h> |
17 |
> |
#endif |
18 |
|
#include <ctype.h> |
19 |
+ |
#include <string.h> |
20 |
|
|
21 |
+ |
#include "paths.h" |
22 |
+ |
#include "ranimove.h" |
23 |
+ |
|
24 |
|
int NVARS = NV_INIT; /* total number of variables */ |
25 |
|
|
26 |
|
VARIABLE vv[] = VV_INIT; /* variable-value pairs */ |
247 |
|
setrendparams(lorendoptf, vval(LOWQ)); |
248 |
|
ray_save(&lorendparams); |
249 |
|
curparams = &lorendparams; |
250 |
< |
twolevels = bcmp(&lorendparams, &hirendparams, sizeof(RAYPARAMS)); |
250 |
> |
twolevels = memcmp(&lorendparams, &hirendparams, sizeof(RAYPARAMS)); |
251 |
|
} |
252 |
|
|
253 |
|
|
388 |
|
pippt = NULL; |
389 |
|
} |
390 |
|
if (pippt != NULL) |
391 |
< |
strcpy(pippt, "> /dev/null"); /* nothing to match */ |
391 |
> |
strcpy(pippt, "> " NULL_DEVICE); /* nothing to match */ |
392 |
|
else { |
393 |
|
strcpy(cp, ")[ \t]*=' > ranimove.var"); |
394 |
|
cp += 11; /* point to file name */ |
456 |
|
fclose(viewfp); |
457 |
|
viewfp = NULL; |
458 |
|
viewnum = 0; |
459 |
< |
copystruct(&curview, &stdview); |
459 |
> |
curview = stdview; |
460 |
|
} |
461 |
|
return(NULL); |
462 |
|
} |
472 |
|
perror(vval(VIEWFILE)); |
473 |
|
quit(1); |
474 |
|
} |
475 |
< |
copystruct(&curview, &stdview); |
475 |
> |
curview = stdview; |
476 |
|
viewnum = 0; |
477 |
|
} |
478 |
|
if (n < 0) { /* get next view */ |
761 |
|
om->cprio = om->prio; |
762 |
|
} |
763 |
|
/* XXX bxfm relies on call order */ |
764 |
< |
if (framestep) |
764 |
> |
if (framestep) { |
765 |
|
if (invmat4(om->bxfm, om->cxfm)) |
766 |
|
multmat4(om->bxfm, om->bxfm, oxf.xfm); |
767 |
|
else |
768 |
|
setident4(om->bxfm); |
769 |
+ |
} |
770 |
|
/* all done */ |
771 |
|
return(xfp); |
772 |
|
} |