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

# Content
1 #!/bin/csh -f
2 # RCSid: $Id: objview.csh,v 2.8 2003/02/22 02:07:30 greg Exp $
3 #
4 # Make a nice view of an object
5 # Arguments are scene input files
6 #
7 set tmpdir=/usr/tmp
8 set octree=$tmpdir/ov$$.oct
9 set lights=$tmpdir/lt$$.rad
10 set rif=$tmpdir/ov$$.rif
11 set tmpfiles="$octree $lights $rif"
12 set raddev="x11"
13 set up="Z"
14 set vw="XYZ"
15 set rendopts=""
16 set opts=""
17 while ($#argv > 0)
18 switch ($argv[1])
19 case -g*:
20 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 case -b*:
31 set rendopts=($rendopts -bv)
32 breaksw
33 case -v:
34 shift argv
35 set vw=$argv[1]
36 breaksw
37 case -o:
38 shift argv
39 set raddev="$argv[1]"
40 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 onintr quit
78
79 cat > $lights <<_EOF_
80 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 cat > $rif <<_EOF_
89 scene= $argv[*]:q $lights
90 EXPOSURE= .5
91 UP= $up
92 view= $vw
93 OCTREE= $octree
94 oconv= -f
95 render= $rendopts
96 _EOF_
97
98 if ( $?usegl ) then
99 glrad $opts $rif
100 else
101 rad -o $raddev $opts $rif
102 endif
103
104 quit:
105 rm -f $tmpfiles
106 exit 0