diff options
author | epoch <epoch@hacking.allowed.org> | 2017-12-19 03:29:56 -0600 |
---|---|---|
committer | epoch <epoch@hacking.allowed.org> | 2017-12-19 03:29:56 -0600 |
commit | ed79435a1efc2f9c348e66dd2d9b6c80e5f8f888 (patch) | |
tree | ceb571f120440c89ed47a593bc3c4168b1f3efea /tools | |
parent | 74c364b28d3e77d89783828e151a6883a9e093a2 (diff) | |
download | hackvr-ed79435a1efc2f9c348e66dd2d9b6c80e5f8f888.tar.gz hackvr-ed79435a1efc2f9c348e66dd2d9b6c80e5f8f888.zip |
updated the tools to be color argument aware of addshape
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/dat2hackvr.pl | 2 | ||||
-rwxr-xr-x | tools/line2hackvr.sh | 2 | ||||
-rwxr-xr-x | tools/obj2hackvr.pl | 2 | ||||
-rwxr-xr-x | tools/obj2hackvr2.pl | 3 |
4 files changed, 5 insertions, 4 deletions
diff --git a/tools/dat2hackvr.pl b/tools/dat2hackvr.pl index 2a2fbe1..03c5315 100755 --- a/tools/dat2hackvr.pl +++ b/tools/dat2hackvr.pl @@ -20,7 +20,7 @@ while($line=<FILE>) { } else { if($prev ne "") { print $ARGV[0]; - print " addshape 2 "; + print " addshape 2 2 "; print $line . " 0 " . $prev . " 0"; print "\n"; } diff --git a/tools/line2hackvr.sh b/tools/line2hackvr.sh index f2ea143..0ff5290 100755 --- a/tools/line2hackvr.sh +++ b/tools/line2hackvr.sh @@ -4,4 +4,4 @@ if [ "_$1" = '_' ];then echo 'usage: line2hackvr.sh name' >&2 exit 1 fi -xargs -L 1 printf "%s addshape 2 0 %d %d 0 %d %d\n" "$1" $line +xargs -L 1 printf "%s addshape 2 2 0 %d %d 0 %d %d\n" "$1" $line diff --git a/tools/obj2hackvr.pl b/tools/obj2hackvr.pl index 8173eee..3639750 100755 --- a/tools/obj2hackvr.pl +++ b/tools/obj2hackvr.pl @@ -53,7 +53,7 @@ foreach $tmp (@faces) { # print @points; for($i=2;$i<(@points);$i++) { print $ARGV[0]; - print " addshape 3 "; + print " addshape 2 3 "; print $vertices[$points[0]-1]; print " "; print $vertices[$points[$i-1]-1]; diff --git a/tools/obj2hackvr2.pl b/tools/obj2hackvr2.pl index 92d16a7..0736c6d 100755 --- a/tools/obj2hackvr2.pl +++ b/tools/obj2hackvr2.pl @@ -14,6 +14,7 @@ my @parts; my @points; my @tmp; my $tmp; +my $color=2; open(FILE,$ARGV[1]) if $ARGV[1]; while(<FILE>) { chomp; @@ -39,7 +40,7 @@ foreach $tmp (@faces) { @points = map { $_ =~ s/\/.+$//g; $_; } @points; ## print @points; print $ARGV[0]; - print " addshape "; + print " addshape " . (rand()*8%8) . " "; print @points+0; for($i=0;$i<(@points);$i++) { print " "; |