SDL::Tutorial::3DWorld::Actor::Teapot - A moving teapot within the game world
# Create a vertical stack of teapots my @stack = (); foreach my $height ( 1 .. 10 ) { push @stack, SDL::Tutorial::3DWorld::Actor::Teapot->new( X => 0, Y => $height * 0.30, # Each teapot is 30cm high Z => 0, ); }
SDL::Tutorial::3DWorld::Actor::Teapot is a little teapot, short and stout.
It is drawn with the GLUT glutCreateTeapot function.
glutCreateTeapot
This class does not contain any additional methods beyond those in the base class SDL::Tutorial::3DWorld::Actor.
# I want to be a little teapot, short and stout (and the default colour) my $teapot = SDL::Tutorial::3DWorld::Actor::Teapot->new( size => 0.15, # 15cm );
In additional to the regular material properties provided by the parent SDL::Tutorial::3DWorld::Actor class teapots take an additional size parameter to control how big the teapot is.
size
Teapots are 20cm high by default (because tea is best with friends and so we'll need to brew several cups).
Bugs should be reported via the CPAN bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SDL-Tutorial-3DWorld
Adam Kennedy <adamk@cpan.org>
SDL, OpenGL
Copyright 2010 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install SDL::Tutorial::3DWorld, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SDL::Tutorial::3DWorld
CPAN shell
perl -MCPAN -e shell install SDL::Tutorial::3DWorld
For more information on module installation, please visit the detailed CPAN module installation guide.