summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/dat2hackvr.pl34
-rwxr-xr-xtools/line2hackvr.sh7
-rwxr-xr-xtools/obj2hackvr.pl64
-rwxr-xr-xtools/obj2hackvr2.pl50
-rwxr-xr-xtools/offsetshape.sh5
5 files changed, 0 insertions, 160 deletions
diff --git a/tools/dat2hackvr.pl b/tools/dat2hackvr.pl
deleted file mode 100755
index 03c5315..0000000
--- a/tools/dat2hackvr.pl
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-die "usage: dat2hackvr.pl name file\n" unless $ARGV[0];
-
-my $line;
-my $prev;
-my $first;
-open(FILE,$ARGV[1]) if $ARGV[1];
-while($line=<FILE>) {
- chomp $line;
- if(!($line =~ m/^#/)) {
- if($line eq "") {
-# print $ARGV[0];
-# print " addtriangle ";
-# print $prev . " 0 " . $first . " 0 " . $first . " 0";
-# print "\n";
- $first="";
- } else {
- if($prev ne "") {
- print $ARGV[0];
- print " addshape 2 2 ";
- print $line . " 0 " . $prev . " 0";
- print "\n";
- }
- $prev="";
- }
- if($first eq "") {
- $first=$line;
- }
- $prev=$line;
- }
-}
diff --git a/tools/line2hackvr.sh b/tools/line2hackvr.sh
deleted file mode 100755
index 0ff5290..0000000
--- a/tools/line2hackvr.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-#this is used on turn2line output
-if [ "_$1" = '_' ];then
- echo 'usage: line2hackvr.sh name' >&2
- exit 1
-fi
-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
deleted file mode 100755
index 3639750..0000000
--- a/tools/obj2hackvr.pl
+++ /dev/null
@@ -1,64 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-die "usage: obj2hackvr.pl name file\n" unless $ARGV[0];
-
-my $i;
-my $j;
-my $com;
-my @vertices;
-my @faces;
-my @linepart;
-my @parts;
-my @points;
-my @tmp;
-my $tmp;
-open(FILE,$ARGV[1]) if $ARGV[1];
-while(<FILE>) {
- $_ =~ s/[\n\r]//g;
- @linepart=split(/ /,$_,2);
- $com=$linepart[0];
- if($com eq "v") {
- push(@vertices,$linepart[1]);
- }
- if($com eq "f") {
- push(@faces,$linepart[1]);
- }
-}
-#foreach $tmp (@vertices) {
-# foreach(@$tmp) {
-# print $tmp . "\n";
-# }
-#}
-
-#foreach $tmp (@faces) {
-# @points=split(/ /,$tmp);
-# @points = map { $_ =~ s/\/.+$//g; $_; } @points;
-## print @points;
-# print $ARGV[0];
-# print " addshape ";
-# print @points+0;
-# for($i=0;$i<(@points+0);$i++) {
-# print " ";
-# print $vertices[$points[$i]];
-# }
-# print "\n";
-#}
-
-#convert to triangles
-foreach $tmp (@faces) {
- @points=split(/ /,$tmp);
- @points = map { $_ =~ s/\/.+$//g; $_; } @points;
-# print @points;
- for($i=2;$i<(@points);$i++) {
- print $ARGV[0];
- print " addshape 2 3 ";
- print $vertices[$points[0]-1];
- print " ";
- print $vertices[$points[$i-1]-1];
- print " ";
- print $vertices[$points[$i]-1];
- print "\n";
- }
-}
diff --git a/tools/obj2hackvr2.pl b/tools/obj2hackvr2.pl
deleted file mode 100755
index 0736c6d..0000000
--- a/tools/obj2hackvr2.pl
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-
-die "usage: obj2hackvr.pl name file\n" unless $ARGV[0];
-
-my $i;
-my $j;
-my $com;
-my @vertices;
-my @faces;
-my @linepart;
-my @parts;
-my @points;
-my @tmp;
-my $tmp;
-my $color=2;
-open(FILE,$ARGV[1]) if $ARGV[1];
-while(<FILE>) {
- chomp;
- $_ =~ s/[\r\n]//g;
- @linepart=split(/ /,$_,2);
- $com=$linepart[0];
- if($com eq "v") {
- push(@vertices,$linepart[1]);
- }
- if($com eq "f") {
- push(@faces,$linepart[1]);
- }
-}
-
-#foreach $tmp (@vertices) {
-# foreach(@$tmp) {
-# print $tmp . "\n";
-# }
-#}
-
-foreach $tmp (@faces) {
- @points=split(/ /,$tmp);
- @points = map { $_ =~ s/\/.+$//g; $_; } @points;
-## print @points;
- print $ARGV[0];
- print " addshape " . (rand()*8%8) . " ";
- print @points+0;
- for($i=0;$i<(@points);$i++) {
- print " ";
- print $vertices[$points[$i]-1];
- }
- print "\n";
-}
diff --git a/tools/offsetshape.sh b/tools/offsetshape.sh
deleted file mode 100755
index f3ceabd..0000000
--- a/tools/offsetshape.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-#format of lines read from stdin:
-# $1 $2 $3 $4 <-- variables in awk
-#objectname addshape color points_in_shape
-awk '{ for(i=5;i<=(4+($4*3));i+=3){$i+='"$1"';$(i+1)+='"$2"';$(i+2)+='"$3"';} print $0;}'