#include <CorridorCell.h>
Public Member Functions | |
CorridorCell (unsigned int size_max) | |
Constructor of a new CorridorCell. | |
virtual | ~CorridorCell () |
Empty destructor of CorridorCell. | |
void | setSize_max (unsigned int new_size) |
unsigned int | getSize_max () |
virtual bool | reachable (Worshiper *w) |
Is the Cell reachable ? | |
Protected Member Functions | |
virtual GLuint | getTexName () |
Return the Cell texture id. | |
Protected Attributes | |
unsigned int | _size_max |
Static Protected Attributes | |
static GLuint | _tex_name = 0 |
Definition at line 33 of file CorridorCell.h.
CorridorCell::CorridorCell | ( | unsigned int | size_max | ) |
Constructor of a new CorridorCell.
size_max | the size max of the worshipers that can access that Cell |
Definition at line 41 of file CorridorCell.cpp.
00041 : 00042 ReachableCell(), _size_max(size_max) { 00043 00044 }
GLuint CorridorCell::getTexName | ( | ) | [protected, virtual] |
Return the Cell texture id.
Reimplemented from Cell.
Definition at line 32 of file CorridorCell.cpp.
References _tex_name, and Image::genTexture2D().
00032 { 00033 if(_tex_name == 0) { 00034 Image texture("./textures/CorridorCell.bmp"); 00035 _tex_name = texture.genTexture2D(); 00036 } 00037 00038 return _tex_name; 00039 }
void CorridorCell::setSize_max | ( | unsigned int | new_size | ) |
Set the value of _size_max
new_size | the new value of _size_max |
Definition at line 50 of file CorridorCell.cpp.
References _size_max.
00050 { 00051 _size_max = new_size; 00052 }
unsigned int CorridorCell::getSize_max | ( | ) |
Get the value of _size_max
Definition at line 54 of file CorridorCell.cpp.
References _size_max.
00054 { 00055 return _size_max; 00056 }
bool CorridorCell::reachable | ( | Worshiper * | w | ) | [virtual] |
Is the Cell reachable ?
Reimplemented from ReachableCell.
Definition at line 58 of file CorridorCell.cpp.
References _size_max, Worshiper::getSize(), and ReachableCell::reachable().
00058 { 00059 return ReachableCell::reachable(w) && (w->getSize() <= _size_max); 00060 }
GLuint CorridorCell::_tex_name = 0 [static, protected] |
the texture id for Cell rendering
Reimplemented from Cell.
Definition at line 38 of file CorridorCell.h.
Referenced by getTexName().
unsigned int CorridorCell::_size_max [protected] |
the size max of the worshipers that can access that Cell
Definition at line 41 of file CorridorCell.h.
Referenced by getSize_max(), reachable(), and setSize_max().