Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: help with Z-buffer algorithm

by rbc (Curate)
on Nov 07, 2002 at 04:37 UTC ( [id://210999]=note: print w/replies, xml ) Need Help??


in reply to Re: help with Z-buffer algorithm
in thread help with Z-buffer algorithm

Replies are listed 'Best First'.
Re: Re: Re: help with Z-buffer algorithm
by graff (Chancellor) on Nov 07, 2002 at 06:29 UTC
    Well, I still get the following set of warnings (maybe not the same ones, but at least fewer of them) -- and two of the lines you just quoted are among them:
    Using an array as a reference is deprecated at /tmp/3dgraphics2.perl l +ine 989. Using an array as a reference is deprecated at /tmp/3dgraphics2.perl l +ine 990. Using an array as a reference is deprecated at /tmp/3dgraphics2.perl l +ine 1094. Using an array as a reference is deprecated at /tmp/3dgraphics2.perl l +ine 1096. Using an array as a reference is deprecated at /tmp/3dgraphics2.perl l +ine 1129.
    where this is offending expression at lines 1094 and 1096:
    @{$zbuffer}->[$x]->[$y]
    I tried changing these two to be:
    $$zbuffer[$x][$y]
    the code still ran and still did the wrong things, same as before. As for what you may be doing wrong in one or the other spot of code, I couldn't guess, but consider doing "perl -d yourscript" to run it with the debugger.

    When you see the "DB<1>" prompt, type "b 251" -- that sets a breakpoint at the start of this expression:

    my $rec = { edge => [$A, $B], dx => abs($X1 - $X2), dz => $Z1 - $Z2, z => ( $X1 < $X2 ) ? ($Z1) : ($Z2) };
    then type "c" to run the script till it reaches that break point. The GUI comes up, you can set parameters (I chose to set "rotX" of "40" instead of "0"), and hit the "Draw" button. Eventually the program will stop when it hits the chosen line, and you get the "DB" prompt back; see "perldebug" and "perldebtut" for fun things to try.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://210999]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-16 05:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found