"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Graphics/TriD/TriD/Window.pm" between
PDL-2.077.tar.gz and PDL-2.078.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

Window.pm  (PDL-2.077):Window.pm  (PDL-2.078)
skipping to change at line 59 skipping to change at line 59
sub new_viewport { sub new_viewport {
my($this,$x0,$y0,$x1,$y1, $options) = @_; my($this,$x0,$y0,$x1,$y1, $options) = @_;
my $vp = PDL::Graphics::TriD::ViewPort->new($x0,$y0,$x1,$y1); my $vp = PDL::Graphics::TriD::ViewPort->new($x0,$y0,$x1,$y1);
print "Adding viewport $x0,$y0,$x1,$y1\n" if($PDL::Graphics::TriD::verbose); print "Adding viewport $x0,$y0,$x1,$y1\n" if($PDL::Graphics::TriD::verbose);
push @{$this->{_ViewPorts}}, $vp; push @{$this->{_ViewPorts}}, $vp;
if($this->{Interactive} ){ if($this->{Interactive} ){
# set a default controller # set a default controller
use PDL::Graphics::TriD::ArcBall; use PDL::Graphics::TriD::ArcBall;
use PDL::Graphics::TriD::SimpleScaler; use PDL::Graphics::TriD::SimpleScaler;
use PDL::Graphics::TriD::ScrollButtonScaler;
use PDL::Graphics::TriD::Control3D; use PDL::Graphics::TriD::Control3D;
if (defined($PDL::Graphics::TriD::offline) and $PDL::Graphics::TriD::of fline==1 ) { if (defined($PDL::Graphics::TriD::offline) and $PDL::Graphics::TriD::of fline==1 ) {
eval "use PDL::Graphics::TriD::VRML"; eval "use PDL::Graphics::TriD::VRML";
} else { } else {
eval "use PDL::Graphics::TriD::GL"; eval "use PDL::Graphics::TriD::GL";
} }
my $ev = $options->{EHandler}; my $ev = $options->{EHandler};
$ev = PDL::Graphics::TriD::EventHandler->new($vp) unless defined($ev); $ev = PDL::Graphics::TriD::EventHandler->new($vp) unless defined($ev);
my $cont = $options->{Transformer}; my $cont = $options->{Transformer};
$cont = PDL::Graphics::TriD::SimpleController->new unless defined($cont) ; $cont = PDL::Graphics::TriD::SimpleController->new unless defined($cont) ;
$vp->transformer($cont); $vp->transformer($cont);
if(ref($ev)){ if(ref($ev)){
$ev->set_button(0,PDL::Graphics::TriD::ArcCone->new( $vp, 0, $con t->{WRotation})); $ev->set_button(0,PDL::Graphics::TriD::ArcCone->new( $vp, 0, $con t->{WRotation}));
$ev->set_button(2,PDL::Graphics::TriD::SimpleScaler->new( $vp, \$ cont->{CDistance})); $ev->set_button(2,PDL::Graphics::TriD::SimpleScaler->new( $vp, \$ cont->{CDistance}));
$ev->set_button(3,PDL::Graphics::TriD::ScrollButtonScaler->new( $
vp, \$cont->{CDistance}, 0.9));
$ev->set_button(4,PDL::Graphics::TriD::ScrollButtonScaler->new( $
vp, \$cont->{CDistance}, 1.1));
$vp->eventhandler($ev); $vp->eventhandler($ev);
} }
} }
print "new_viewport: ",ref($vp)," ",$#{$this->{_ViewPorts}},"\n" if($PDL::Grap hics::TriD::verbose); print "new_viewport: ",ref($vp)," ",$#{$this->{_ViewPorts}},"\n" if($PDL::Grap hics::TriD::verbose);
return $vp; return $vp;
} }
sub resize_viewport { sub resize_viewport {
my($this,$x0,$y0,$x1,$y1,$vpnum) = @_; my($this,$x0,$y0,$x1,$y1,$vpnum) = @_;
$vpnum = $this->{_CurrentViewPort} unless(defined $vpnum); $vpnum = $this->{_CurrentViewPort} unless(defined $vpnum);
 End of changes. 3 change blocks. 
1 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)