File tree Expand file tree Collapse file tree 2 files changed +18
-26
lines changed
Expand file tree Collapse file tree 2 files changed +18
-26
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,13 @@ package PDL::Graphics::TriD::Object;
33use strict;
44use warnings;
55
6- use fields qw( Objects ValidList ChangedSub List VRML ) ;
6+ use fields qw( Objects ValidList ChangedSub List) ;
77
88$PDL::Graphics::TriD::verbose //= 0;
99
1010sub new{
1111 my $class = shift ;
1212 my $self = fields::new($class );
13-
1413 $self ;
1514}
1615
@@ -76,27 +75,4 @@ sub changed {
7675 $_ -> ($this ) for @{$this -> {ChangedSub }};
7776}
7877
79- sub vrml_update {
80- my ($this ) = @_ ;
81- use PDL::Graphics::VRML;
82-
83- $this -> {VRML } = PDL::Graphics::VRMLNode-> new(' Transform' ,
84- ' translation' => " -1 -1 -1" ,
85- ' scale' => " 2 2 2" );
86- $this -> {ValidList } = 1;
87- }
88-
89- sub tovrml {
90- my ($this ) = @_ ;
91-
92- print ref ($this )," valid=" ,$this -> {ValidList }," tovrml\n " ;
93-
94- if (!$this -> {ValidList }) {
95- $this -> vrml_update();
96- }
97- $this -> {VRML }-> add(' children' ,
98- [map {$_ -> tovrml()} @{$this -> {Objects }}]);
99- }
100-
101-
102781;
Original file line number Diff line number Diff line change @@ -699,8 +699,24 @@ use base qw/PDL::Graphics::TriD::Object/;
699699use fields qw/ X0 Y0 W H Transformer EHandler Active ResizeCommands
700700 DefMaterial AspectRatio Graphs/ ;
701701
702+ sub PDL ::Graphics::TriD::Object::vrml_update {
703+ my ($this ) = @_ ;
704+ require PDL::Graphics::VRML;
705+ $this -> {VRML } = PDL::Graphics::VRMLNode-> new(' Transform' ,
706+ ' translation' => " -1 -1 -1" ,
707+ ' scale' => " 2 2 2" );
708+ $this -> {ValidList } = 1;
709+ }
702710
703-
711+ sub PDL ::Graphics::TriD::Object::tovrml {
712+ my ($this ) = @_ ;
713+ print ref ($this )," valid=" ,$this -> {ValidList }," tovrml\n " ;
714+ if (!$this -> {ValidList }) {
715+ $this -> vrml_update();
716+ }
717+ $this -> {VRML }-> add(' children' ,
718+ [map {$_ -> tovrml()} @{$this -> {Objects }}]);
719+ }
704720
7057211;
706722
You can’t perform that action at this time.
0 commit comments