"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Graphics/TriD/TriD/Object.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).

Object.pm  (PDL-2.077):Object.pm  (PDL-2.078)
###################################
#
#
package PDL::Graphics::TriD::Object; package PDL::Graphics::TriD::Object;
use strict; use strict;
use warnings; use warnings;
use fields qw(Objects ValidList ChangedSub List VRML); use fields qw(Objects ValidList ChangedSub List VRML);
$PDL::Graphics::TriD::verbose //= 0; $PDL::Graphics::TriD::verbose //= 0;
sub new{ sub new{
skipping to change at line 45 skipping to change at line 42
} }
# XXXXXXXXX sub {} makes all these objects and this window immortal! # XXXXXXXXX sub {} makes all these objects and this window immortal!
sub add_object { sub add_object {
my($this,$object) = @_; my($this,$object) = @_;
push @{$this->{Objects}},$object; push @{$this->{Objects}},$object;
$this->{ValidList} = 0; $this->{ValidList} = 0;
for(@{$this->{ChangedSub}}) { for(@{$this->{ChangedSub}}) {
$object->add_changedsub($_); $object->add_changedsub($_);
} }
if($this->i_keep_list) { $object->add_changedsub(sub {$this->changed_from_above()});
$object->add_changedsub(sub {$this->changed_from_above()});
}
} }
sub changed_from_above { sub changed_from_above {
my($this) = @_; my($this) = @_;
print "CHANGED_FROM_ABOVE\n" if $PDL::Graphics::TriD::verbose; print "CHANGED_FROM_ABOVE\n" if $PDL::Graphics::TriD::verbose;
$this->changed(); $this->changed;
} }
sub add_changedsub { sub add_changedsub {
my($this,$chsub) = @_; my($this,$chsub) = @_;
push @{$this->{ChangedSub}}, $chsub; push @{$this->{ChangedSub}}, $chsub;
for (@{$this->{Objects}}) { for (@{$this->{Objects}}) {
$_->add_changedsub($chsub); $_->add_changedsub($chsub);
} }
} }
skipping to change at line 79 skipping to change at line 74
} }
$this->delete_displist(); $this->delete_displist();
delete $this->{ChangedSub}; delete $this->{ChangedSub};
delete $this->{Objects}; delete $this->{Objects};
} }
sub changed { sub changed {
my($this) = @_; my($this) = @_;
print "VALID0 $this\n" if $PDL::Graphics::TriD::verbose; print "VALID0 $this\n" if $PDL::Graphics::TriD::verbose;
$this->{ValidList} = 0; $this->{ValidList} = 0;
for(@{$this->{ChangedSub}}) { $_->($this) for @{$this->{ChangedSub}};
&$_($this);
}
}
sub i_keep_list {
return 0;
} }
sub vrml_update { sub vrml_update {
my ($this) = @_; my ($this) = @_;
use PDL::Graphics::VRML; use PDL::Graphics::VRML;
$this->{VRML} = new PDL::Graphics::VRMLNode('Transform', $this->{VRML} = new PDL::Graphics::VRMLNode('Transform',
'translation' => "-1 -1 -1", 'translation' => "-1 -1 -1",
'scale' => "2 2 2"); 'scale' => "2 2 2");
$this->{ValidList} = 1; $this->{ValidList} = 1;
 End of changes. 4 change blocks. 
14 lines changed or deleted 3 lines changed or added

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