From f479b438e6119e83c95b19aaeccd61a8e5eded27 Mon Sep 17 00:00:00 2001 From: epoch Date: Sun, 16 Dec 2018 19:28:39 -0600 Subject: fuck if I know. lots of shit. moved files. --- tools/obj2hackvr.pl | 64 ----------------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100755 tools/obj2hackvr.pl (limited to 'tools/obj2hackvr.pl') 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() { - $_ =~ 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"; - } -} -- cgit v1.2.3