ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/objview.csh
Revision: 2.9
Committed: Fri Aug 20 23:45:59 2004 UTC (19 years, 7 months ago) by greg
Content type: application/x-csh
Branch: MAIN
CVS Tags: rad3R6, rad3R6P1
Changes since 2.8: +2 -2 lines
Log Message:
Removed redundant -r option to oconv

File Contents

# User Rev Content
1 greg 1.1 #!/bin/csh -f
2 greg 2.9 # RCSid: $Id: objview.csh,v 2.8 2003/02/22 02:07:30 greg Exp $
3 greg 1.1 #
4     # Make a nice view of an object
5 greg 2.2 # Arguments are scene input files
6 greg 1.1 #
7     set tmpdir=/usr/tmp
8     set octree=$tmpdir/ov$$.oct
9 gwlarson 2.6 set lights=$tmpdir/lt$$.rad
10     set rif=$tmpdir/ov$$.rif
11     set tmpfiles="$octree $lights $rif"
12 gwlarson 2.7 set raddev="x11"
13 gwlarson 2.6 set up="Z"
14     set vw="XYZ"
15 gwlarson 2.7 set rendopts=""
16 gwlarson 2.6 set opts=""
17     while ($#argv > 0)
18     switch ($argv[1])
19 gwlarson 2.7 case -g*:
20 gwlarson 2.6 set usegl
21     breaksw
22     case -u:
23     shift argv
24     set up=$argv[1]
25     breaksw
26     case -s:
27     case -w:
28     set opts=($opts $argv[1])
29     breaksw
30 gwlarson 2.7 case -b*:
31     set rendopts=($rendopts -bv)
32     breaksw
33 gwlarson 2.6 case -v:
34     shift argv
35     set vw=$argv[1]
36     breaksw
37     case -o:
38     shift argv
39 gwlarson 2.7 set raddev="$argv[1]"
40 gwlarson 2.6 set radopt
41     breaksw
42     case -V:
43     case -e:
44     set opts=($opts $argv[1])
45     set radopt
46     breaksw
47     case -S:
48     set opts=($opts $argv[1])
49     set glradopt
50     breaksw
51     case -*:
52     echo "Bad option: $argv[1]"
53     exit 1
54     default:
55     break
56     endsw
57     shift argv
58     end
59     if ( $#argv == 0 ) then
60     echo "No input files specified"
61     exit 1
62     endif
63     if ( $?usegl ) then
64     if ( $?radopt ) then
65     echo "bad option for glrad"
66     glrad
67     exit 1
68     endif
69     else
70     if ( $?glradopt ) then
71     echo "bad option for rad"
72     rad
73     exit 1
74     endif
75     endif
76    
77 greg 1.1 onintr quit
78    
79 gwlarson 2.6 cat > $lights <<_EOF_
80 greg 2.2 void glow dim 0 0 4 .1 .1 .15 0
81     dim source background 0 0 4 0 0 1 360
82     void light bright 0 0 3 1000 1000 1000
83     bright source sun1 0 0 4 1 .2 1 5
84     bright source sun2 0 0 4 .3 1 1 5
85     bright source sun3 0 0 4 -1 -.7 1 5
86     _EOF_
87    
88 gwlarson 2.6 cat > $rif <<_EOF_
89     scene= $argv[*]:q $lights
90     EXPOSURE= .5
91     UP= $up
92     view= $vw
93     OCTREE= $octree
94 greg 2.9 oconv= -f
95 gwlarson 2.7 render= $rendopts
96 gwlarson 2.6 _EOF_
97 greg 2.5
98 gwlarson 2.6 if ( $?usegl ) then
99     glrad $opts $rif
100     else
101 gwlarson 2.7 rad -o $raddev $opts $rif
102 gwlarson 2.6 endif
103 greg 1.1
104     quit:
105     rm -f $tmpfiles
106     exit 0