ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/objview.csh
(Generate patch)

Comparing ray/src/util/objview.csh (file contents):
Revision 2.4 by saba, Wed Jan 6 10:46:47 1993 UTC vs.
Revision 2.9 by greg, Fri Aug 20 23:45:59 2004 UTC

# Line 1 | Line 1
1   #!/bin/csh -f
2 < # SCCSid "$SunId$ LBL"
2 > # RCSid: $Id$
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 tmpfiles="$octree"
10 < if ( ! $?RVIEW ) set RVIEW="rview"
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 < oconv - $argv[*]:q > $octree <<_EOF_
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
# Line 19 | Line 85 | 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 < set vp=`getinfo -d <$octree|rcalc -e '$1=$1-3.5*$4;$2=$2-3.5*$4;$3=$3+2.5*$4'`
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 < $RVIEW -av .2 .2 .2 -vp $vp -vd 1 1 -.5 -vv 15 -vh 15 $octree
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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines