Game::3D::Area - an area in 3D space



NAME

Game::3D::Area - an area (or space) in 3D space


SYNOPSIS

        use Game::3D::Area;
        my $origin = Game::3D::Area->new();
        my $shape = Game::3D::Area->new ( 
                x => 1, y => 0, z => -1,
                w => 123, l => 9, height => 46 );


EXPORTS

Exports nothing on default. Can export on request:

        GAME_3D_CUBE
        GAME_3D_SPHERE


DESCRIPTION

This package provides a base class for shapes/areas in 3D space.


METHODS

It features all the methods of Game::3D::Point (namely: new(), _init(), x(), y(), z() and pos()) plus:

width()
        print $area->width();
        $area->width(123);
        
        Set and return or just return the area's width (size along the X axis).
length()
        print $area->length();
        $area->length(123);
        
        Set and return or just return the area's length (size along the Y axis).
height()
        print $area->height();
        $area->height(123);
        
        Set and return or just return the area's height (size along the Z axis).
size()
        print join (" ", $area->size());
        $area->size(123,456,-1);                # set X,Y and Z
        $area->size(undef,undef,1);             # set only Z
        
        Set and return or just return the area's size along the three axes.
rotation()
        print join (" ", $area->rotation());
        $area->rotation(0.5,1,-1);              # set X,Y and Z
        $area->rotation(undef,undef,1);         # set only Z
        
        Set and return or just return the area's rotation around the X, Y and
        Z axis, respectively.


AUTHORS

(c) 2003, Tels <http://bloodgate.com/>


SEE ALSO

the Game::3D::Point manpage as well as the SDL:App::FPS manpage, the SDL::App manpage and SDL.