in reply to help with Z-buffer algorithm
This stuff arises from lines like this (this is the code at line 1064):Using an array as a reference is deprecated at /tmp/3dgraphics.perl li +ne 989. Using an array as a reference is deprecated at /tmp/3dgraphics.perl li +ne 990. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1004. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1004. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1004. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1064. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1064. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1076. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1077. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1081. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1082. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1087. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1091. Using an array as a reference is deprecated at /tmp/3dgraphics.perl li +ne 1092. Using an array as a reference is deprecated at /tmp/3dgraphics.perl li +ne 1094. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1101. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1107. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1108. Using a hash as a reference is deprecated at /tmp/3dgraphics.perl line + 1108. Using an array as a reference is deprecated at /tmp/3dgraphics.perl li +ne 1127.
Sure enough, you're using the "%" sigil on a value that is supposed to be treated as a scalar.@AET = sort{ %{$a}->{Xbot} <=> %{$b}->{Xbot} } @AET;
You should try to adjust the lines involved to see if you can avoid those warnings -- then see if the code behaves the same way. (There's a chance that the values you are manipulating are not what you're expecting them to be.)
update: forgot to mention: just because you're using Tk doesn't mean you can't use the perl debugger. Run the script with "perl -d" and put breakpoints at some of those lines that are setting and testing Z-buffer values; when the code gets to one of those lines, look at the values being tested or assigned. (And figure out if it's just something simple, like adding when you should be subtracting, or whatever.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: help with Z-buffer algorithm
by rbc (Curate) on Nov 07, 2002 at 04:37 UTC | |
by graff (Chancellor) on Nov 07, 2002 at 06:29 UTC |