SPVM::Point3D - Point 3D
use Point3D; my $point = Point3D->new; my $point = Point3D->new_xyz(1, 2, 3); $point->set_x(1); $point->set_y(2); $point->set_z(3); my $x = $point->x; my $y = $point->y; my $y = $point->z; my $point_string = $point->to_string;
Point3D is a class for a point 3D.
Point3D
Point is the super class of Point3D.
Point3D inherits the interfaces of Point.
method new : Point3D ()
Create a new Point3D object.
method new_xyz : Point3D ($x : int, $y : int, $z : int)
Create a new Point3D object with x, y, and z.
Point3D inherits the methods of Point, and implements the following methods.
method z : int ()
Get z field.
z
void set_z : int ($z : int)
Set x field.
x
method to_string : string ();
Convert the Point3D object to a string as the following.
(1,2,3)
method cloneable_clone : object ()
Clone a Point3D object by create a new Point3D object and x, y, z fields are copied to the new object.
y
To install SPVM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM
CPAN shell
perl -MCPAN -e shell install SPVM
For more information on module installation, please visit the detailed CPAN module installation guide.