NAME
SDL::Tutorial::3DWorld::Actor::Teapot - A moving teapot within the game world
SYNOPSIS
# 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,
);
}
DESCRIPTION
SDL::Tutorial::3DWorld::Actor::Teapot is a little teapot, short and stout.
It is drawn with the GLUT glutCreateTeapot
function.
METHODS
This class does not contain any additional methods beyond those in the base class SDL::Tutorial::3DWorld::Actor.
new
# 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.
Teapots are 20cm high by default (because tea is best with friends and so we'll need to brew several cups).
SUPPORT
Bugs should be reported via the CPAN bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SDL-Tutorial-3DWorld
AUTHOR
Adam Kennedy <adamk@cpan.org>
SEE ALSO
COPYRIGHT
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.