NAME
Games::3D::Point - a point in 3D space
SYNOPSIS
use Games::3D::Point;
my $origin = Games::3D::Point->new();
my $point = Games::3D::Point->new ( x => 1, y => 0, z => -1);
EXPORTS
Exports nothing on default.
DESCRIPTION
This package provides a base class for things in 3D space.
METHODS
These methods need not to be overwritten:
- new()
-
my $point = Games::3D::Point->new( $arguments );
Creates a new point. The arguments are x,y and z.
- id()
-
Return the point's unique id.
- x()
-
print $point->x(); $point->x(123);
Set and return or just return the point's X coordinate.
- y()
-
print $point->y(); $point->y(123);
Set and return or just return the point's Y coordinate.
- z()
-
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.
AUTHORS
(c) 2003, Tels <http://bloodgate.com/>
SEE ALSO
SDL:App::FPS, SDL::App and SDL.