NAME

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

SYNOPSIS

use Games::3D::Area;

my $origin = Games::3D::Area->new();

my $shape = Games::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 Games::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

Games::3D::Point as well as SDL:App::FPS, SDL::App and SDL.