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.12 by greg, Tue Jan 13 22:19:25 2009 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 ambf=$tmpdir/af$$.amb
12 > set tmpfiles="$octree $lights $rif $ambf"
13 > set raddev="x11"
14 > set up="Z"
15 > set vw="XYZ"
16 > set rendopts=""
17 > set opts=""
18 > while ($#argv > 0)
19 >        switch ($argv[1])
20 >        case -g*:
21 >                set usegl
22 >                breaksw
23 >        case -u:
24 >                shift argv
25 >                set up=$argv[1]
26 >                breaksw
27 >        case -s:
28 >        case -w:
29 >                set opts=($opts $argv[1])
30 >                breaksw
31 >        case -b*:
32 >                set rendopts=($rendopts -bv)
33 >                breaksw
34 >        case -v:
35 >                shift argv
36 >                set vw="$argv[1]"
37 >                breaksw
38 >        case -N:
39 >                shift argv
40 >                set opts=($opts -N $argv[1])
41 >                set radopt
42 >                breaksw
43 >        case -o:
44 >                shift argv
45 >                set raddev="$argv[1]"
46 >                set radopt
47 >                breaksw
48 >        case -V:
49 >        case -e:
50 >                set opts=($opts $argv[1])
51 >                set radopt
52 >                breaksw
53 >        case -S:
54 >                set opts=($opts $argv[1])
55 >                set glradopt
56 >                breaksw
57 >        case -*:
58 >                echo "Bad option: $argv[1]"
59 >                exit 1
60 >        default:
61 >                break
62 >        endsw
63 >        shift argv
64 > end
65 > if ( $#argv == 0 ) then
66 >        echo "No input files specified"
67 >        exit 1
68 > endif
69 > if ( $?usegl ) then
70 >        if ( $?radopt ) then
71 >                echo "bad option for glrad"
72 >                glrad
73 >                exit 1
74 >        endif
75 > else
76 >        if ( $?glradopt ) then
77 >                echo "bad option for rad"
78 >                rad
79 >                exit 1
80 >        endif
81 > endif
82 >
83   onintr quit
84  
85 < oconv - $argv[*]:q > $octree <<_EOF_
85 > cat > $lights <<_EOF_
86   void glow dim 0 0 4 .1 .1 .15 0
87   dim source background 0 0 4 0 0 1 360
88   void light bright 0 0 3 1000 1000 1000
# Line 19 | Line 91 | bright source sun2 0 0 4 .3 1 1 5
91   bright source sun3 0 0 4 -1 -.7 1 5
92   _EOF_
93  
94 < set vp=`getinfo -d <$octree|rcalc -e '$1=$1-3.5*$4;$2=$2-3.5*$4;$3=$3+2.5*$4'`
94 > cat > $rif <<_EOF_
95 > scene= $argv[*]:q $lights
96 > EXPOSURE= .5
97 > UP= $up
98 > view= $vw
99 > OCTREE= $octree
100 > oconv= -f
101 > AMBF= $ambf
102 > render= $rendopts
103 > _EOF_
104  
105 < $RVIEW -av .2 .2 .2 -vp $vp -vd 1 1 -.5 -vv 15 -vh 15 $octree
105 > if ( $?usegl ) then
106 >        glrad $opts $rif
107 > else
108 >        rad -o $raddev $opts $rif
109 > endif
110  
111   quit:
112   rm -f $tmpfiles

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines