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.11 by greg, Fri Nov 21 01:30:17 2008 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
7 > set tmpdir=/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 -N:
38 >                shift argv
39 >                set opts=($opts -N $argv[1])
40 >                set radopt
41 >                breaksw
42 >        case -o:
43 >                shift argv
44 >                set raddev="$argv[1]"
45 >                set radopt
46 >                breaksw
47 >        case -V:
48 >        case -e:
49 >                set opts=($opts $argv[1])
50 >                set radopt
51 >                breaksw
52 >        case -S:
53 >                set opts=($opts $argv[1])
54 >                set glradopt
55 >                breaksw
56 >        case -*:
57 >                echo "Bad option: $argv[1]"
58 >                exit 1
59 >        default:
60 >                break
61 >        endsw
62 >        shift argv
63 > end
64 > if ( $#argv == 0 ) then
65 >        echo "No input files specified"
66 >        exit 1
67 > endif
68 > if ( $?usegl ) then
69 >        if ( $?radopt ) then
70 >                echo "bad option for glrad"
71 >                glrad
72 >                exit 1
73 >        endif
74 > else
75 >        if ( $?glradopt ) then
76 >                echo "bad option for rad"
77 >                rad
78 >                exit 1
79 >        endif
80 > endif
81 >
82   onintr quit
83  
84 < oconv - $argv[*]:q > $octree <<_EOF_
84 > cat > $lights <<_EOF_
85   void glow dim 0 0 4 .1 .1 .15 0
86   dim source background 0 0 4 0 0 1 360
87   void light bright 0 0 3 1000 1000 1000
# Line 19 | Line 90 | bright source sun2 0 0 4 .3 1 1 5
90   bright source sun3 0 0 4 -1 -.7 1 5
91   _EOF_
92  
93 < set vp=`getinfo -d <$octree|rcalc -e '$1=$1-3.5*$4;$2=$2-3.5*$4;$3=$3+2.5*$4'`
93 > cat > $rif <<_EOF_
94 > scene= $argv[*]:q $lights
95 > EXPOSURE= .5
96 > UP= $up
97 > view= $vw
98 > OCTREE= $octree
99 > oconv= -f
100 > render= $rendopts
101 > _EOF_
102  
103 < $RVIEW -av .2 .2 .2 -vp $vp -vd 1 1 -.5 -vv 15 -vh 15 $octree
103 > if ( $?usegl ) then
104 >        glrad $opts $rif
105 > else
106 >        rad -o $raddev $opts $rif
107 > endif
108  
109   quit:
110   rm -f $tmpfiles

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines