RenewableFood Class Reference

#include <RenewableFood.h>

Inheritance diagram for RenewableFood:

Inheritance graph
[legend]
Collaboration diagram for RenewableFood:

Collaboration graph
[legend]

Public Member Functions

 RenewableFood (unsigned int max, unsigned int inc)
 Constructor.
virtual ~RenewableFood ()
 Empty Destructor.

Protected Member Functions

virtual GLuint getTexName ()
 Return the Cell texture id.

Static Protected Attributes

static GLuint _tex_name = 0

Detailed Description

< Food is renewable energy !

Definition at line 33 of file RenewableFood.h.


Constructor & Destructor Documentation

RenewableFood::RenewableFood ( unsigned int  max,
unsigned int  inc 
)

Constructor.

Parameters:
max the max amount of food the Cell can contain
inc the food regeneration rate of the Cell

Definition at line 40 of file RenewableFood.cpp.

00040                                                                :
00041     FoodCell(max, inc, max) {
00042 
00043 }


Member Function Documentation

GLuint RenewableFood::getTexName (  )  [protected, virtual]

Return the Cell texture id.

Returns:
the value of _tex_name

Reimplemented from Cell.

Definition at line 31 of file RenewableFood.cpp.

References _tex_name, and Image::genTexture2D().

00031                                  {
00032   if(_tex_name == 0) {
00033     Image texture("./textures/RenewableFood.bmp");
00034     _tex_name = texture.genTexture2D();
00035   }
00036 
00037   return _tex_name;
00038 }

Here is the call graph for this function:


Field Documentation

GLuint RenewableFood::_tex_name = 0 [static, protected]

the texture id for Cell rendering

Reimplemented from Cell.

Definition at line 38 of file RenewableFood.h.

Referenced by getTexName().


The documentation for this class was generated from the following files:
Generated on Sat Feb 2 22:23:18 2008 for Teapot Colony Wars by  doxygen 1.5.4