--- ray/src/util/objview.csh 1991/04/24 18:27:10 1.1 +++ ray/src/util/objview.csh 1996/02/09 12:56:59 2.5 @@ -2,18 +2,28 @@ # SCCSid "$SunId$ LBL" # # Make a nice view of an object -# Standard input is description made to fit in unit cube in positive quadrant +# Arguments are scene input files # -set objdir=/usr/local/lib/ray/lib set tmpdir=/usr/tmp -set vw="-vp 3 3 3 -vd -1 -1 -1 -vh 20 -vv 20" -set rview="rview -av .2 .2 .2 $vw $*" set octree=$tmpdir/ov$$.oct set tmpfiles="$octree" +if ( ! $?RVIEW ) set RVIEW="rview" onintr quit -oconv $objdir/testroom - > $octree -$rview $octree +oconv - $argv[*]:q > $octree <<_EOF_ +void glow dim 0 0 4 .1 .1 .15 0 +dim source background 0 0 4 0 0 1 360 +void light bright 0 0 3 1000 1000 1000 +bright source sun1 0 0 4 1 .2 1 5 +bright source sun2 0 0 4 .3 1 1 5 +bright source sun3 0 0 4 -1 -.7 1 5 +_EOF_ + +if ( $status ) goto quit + +set vp=`getinfo -d <$octree|rcalc -e '$1=$1-3.5*$4;$2=$2-3.5*$4;$3=$3+2.5*$4'` + +$RVIEW -av .2 .2 .2 -vp $vp -vd 1 1 -.5 -vv 15 -vh 15 $octree quit: rm -f $tmpfiles