Game::3D::Point - a point in 3D space
use Game::3D::Point;
my $origin = Game::3D::Point->new();
my $point = Game::3D::Point->new ( x => 1, y => 0, z => -1);
Exports nothing on default.
This package provides a base class for things in 3D space.
These methods need not to be overwritten:
new()
my $point = Game::3D::Point->new( $arguments );
Creates a new point. The arguments are x,y and z.
id()
Return the point's unique id.
print $point->x();
$point->x(123);
Set and return or just return the point's X coordinate.
print $point->y();
$point->y(123);
Set and return or just return the point's Y coordinate.
print $point->z();
$point->z(123);
Set and return or just return the point's Z coordinate.
pos()
print join (" ", $point->center());
$point->pos(123,456,-1); # set X,Y and Z
$point->pos(undef,undef,1); # set only Z
Set and return or just return the point's coordinates.
(c) 2003, Tels <http://bloodgate.com/>
the SDL:App::FPS manpage, the SDL::App manpage and SDL.