@@ -600,7 +600,7 @@ without using indices is an Object. That is, if you have a surface,
600600each vertex is not an object and neither is each segment of a long
601601curve. The whole curve (or a set of curves) is the lowest level Object.
602602
603- Transformations and groups of Objects are also Objects.
603+ Groups of Objects are also Objects.
604604
605605A Window is simply an Object that has subobjects.
606606
@@ -622,10 +622,10 @@ There are objects that are not mentioned here; they are either internal
622622to PDL3D or in rapidly changing states. If you use them, you do so at
623623your own risk.
624624
625- The syntax C<PDL::Graphics::TriD::Scale( x,y,z) > here means that you create
625+ The syntax C<PDL::Graphics::TriD::Quaternion(c, x,y,z) > here means that you create
626626an object like
627627
628- $c = PDL::Graphics::TriD::Scale ->new($x,$y,$z);
628+ $c = PDL::Graphics::TriD::QuaternionScale ->new($c, $x,$y,$z);
629629
630630=head2 PDL::Graphics::TriD::LineStrip
631631
@@ -657,14 +657,6 @@ The constructor takes as arguments 3 2-dimensional ndarrays.
657657This is simply a set of points in 3-space. Takes as arguments
658658the x, y and z coordinates of the points as ndarrays.
659659
660- =head2 PDL::Graphics::TriD::Scale(x,y,z)
661-
662- Self-explanatory
663-
664- =head2 PDL::Graphics::TriD::Translation(x,y,z)
665-
666- Ditto
667-
668660=head2 PDL::Graphics::TriD::Quaternion(c,x,y,z)
669661
670662One way of representing rotations is with quaternions. See the appropriate
@@ -1020,57 +1012,6 @@ sub new {
10201012 return $this ;
10211013}
10221014
1023- package PDL::Graphics::TriD::BoundingBox ;
1024- use base qw/ PDL::Graphics::TriD::Object/ ;
1025- use fields qw/ Box/ ;
1026-
1027- sub new {
1028- my ($type ,$x0 ,$y0 ,$z0 ,$x1 ,$y1 ,$z1 ) = @_ ;
1029- my $this = $type -> SUPER::new();
1030- $this -> {Box } = [$x0 ,$y0 ,$z0 ,$x1 ,$y1 ,$z1 ];
1031- }
1032-
1033- sub normalize {my ($this ,$x0 ,$y0 ,$z0 ,$x1 ,$y1 ,$z1 ) = @_ ;
1034- $this = $this -> {Box };
1035- my $trans = PDL::Graphics::TriD::Transformation-> new();
1036- my $sx = ($x1 -$x0 )/($this -> [3]-$this -> [0]);
1037- my $sy = ($y1 -$y0 )/($this -> [4]-$this -> [1]);
1038- my $sz = ($z1 -$z0 )/($this -> [5]-$this -> [2]);
1039- $trans -> add_transformation(
1040- PDL::Graphics::TriD::Translation-> new(
1041- ($x0 -$this -> [0]*$sx ),
1042- ($y0 -$this -> [1]*$sy ),
1043- ($z0 -$this -> [2]*$sz )
1044- ));
1045- $trans -> add_transformation(PDL::Graphics::TriD::Scale-> new($sx ,$sy ,$sz ));
1046- return $trans ;
1047- }
1048-
1049- package PDL::Graphics::TriD::OneTransformation ;
1050- use fields qw/ Args/ ;
1051-
1052- sub new {
1053- my ($type ,@args ) = @_ ;
1054- my $this = fields::new($type );
1055- $this -> {Args } = [@args ];
1056- $this ;
1057- }
1058-
1059- package PDL::Graphics::TriD::Scale ;
1060- use base qw/ PDL::Graphics::TriD::OneTransformation/ ;
1061-
1062- package PDL::Graphics::TriD::Translation ;
1063- use base qw/ PDL::Graphics::TriD::OneTransformation/ ;
1064-
1065-
1066- package PDL::Graphics::TriD::Transformation ;
1067- use base qw/ PDL::Graphics::TriD::Object/ ;
1068-
1069- sub add_transformation {
1070- my ($this ,$trans ) = @_ ;
1071- push @{$this -> {Transforms }},$trans ;
1072- }
1073-
10741015=head1 AUTHOR
10751016
10761017Copyright (C) 1997 Tuomas J. Lukka ([email protected] ). Documentation
0 commit comments