NAME

Games::3D::World - 3D level, camera etc, that can be rendered with OpenGL

SYNOPSIS

use Games::3D::World;

my $world = Games::3D::World->new( level => 'level01.txt' );

# set up camera
$world->camera( $x, $y, $z, $lookatx, $lookaty, $lookatz);
...

$world->render();

EXPORTS

Exports nothing.

DESCRIPTION

This package contains a complete 3D world, with a level (the geometry), brushes, lights, camera, etc.

It can render the scene with OpenGL.

For now, this package is empty, but it will later encompass all the classes contained in here.

METHODS

new()

my $world = Games::3D::World->new( level => 'levels/level00.txt' );

Create a new world, either from an empty level or from a savegame.

camera()

my ($x,$y,$z,$lx,$ly,$lz) =  $world->camera();
$world->camera( $x, $y, $z, $lookatx, $lookaty, $lookatz);

Set up the camera, and return position and look-at point of the camera.

render()

$world->render($current_time);

Update the physeng to catch up to $current_time, then render the world from the camera view.

add_objects()

$world->add_objects();

Add one ore more objects to the world, so that they can be rendered. They must support the render() method.

BUGS

None known yet.

AUTHORS

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

SEE ALSO

SDL:App::FPS, SDL::App and SDL.

GAME::3D::Vector, GAME::3D::Brush, GAME::3D::Level.