Game::3D::Point - a point in 3D space



NAME

Game::3D::Point - a point in 3D space


SYNOPSIS

        use Game::3D::Point;
        my $origin = Game::3D::Point->new();
        my $point = Game::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 = Game::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

the SDL:App::FPS manpage, the SDL::App manpage and SDL.