#include <tile_far_bank.h>
Nevrax France
Definition at line 55 of file tile_far_bank.h.
Public Types | |
enum | TFarOrder { order0 = 0, order1 = 1, order2 = 2, orderCount } |
enum | TFarType { diffuse = 0, additive = 1, alpha = 2, typeCount = 2 } |
Public Member Functions | |
CTileFarBank () | |
Constructor. | |
sint | getNumTile () const |
Get number of tile in this bank. | |
CTileFar * | getTile (sint tile) |
Get a far tile pointer. Return NULL if the tile doesn't exist. | |
const CTileFar * | getTile (sint tile) const |
Get a read only far tile pointer. Return NULL if the tile doesn't exist. | |
void | serial (class NLMISC::IStream &f) throw (NLMISC::EStream) |
Serial this bank. | |
void | setNumTile (sint numTile) |
Resize the tile bank. | |
Static Public Member Functions | |
uint | getFarTileEdgeSize (TFarOrder order) |
Get the tile size. | |
Data Fields | |
std::vector< CTileFar > | _TileVector |
The far tile vector. | |
Static Public Attributes | |
const sint | _Version = 0x0 |
The version of this class. |
|
Definition at line 59 of file tile_far_bank.h.
00059 { order0=0, order1=1, order2=2, orderCount }; |
|
Definition at line 60 of file tile_far_bank.h.
|
|
Constructor.
Definition at line 106 of file tile_far_bank.cpp.
00107 { 00108 } |
|
Get the tile size.
Definition at line 155 of file tile_far_bank.h. References uint.
00156 { 00157 return 4>>(uint)order; 00158 } |
|
Get number of tile in this bank.
Definition at line 117 of file tile_far_bank.h. References sint. Referenced by NL3D::CLandscape::initTileBanks().
00118 { 00119 return (sint)_TileVector.size(); 00120 } |
|
Get a far tile pointer. Return NULL if the tile doesn't exist.
Definition at line 142 of file tile_far_bank.h. References sint.
00143 { 00144 #ifdef NL_DEBUG 00145 if (tile>=(sint)_TileVector.size()) 00146 return NULL; 00147 #else // NL_DEBUG 00148 if (_TileVector.begin()+tile>=_TileVector.end()) 00149 return NULL; 00150 #endif 00151 return &_TileVector[tile]; 00152 } |
|
Get a read only far tile pointer. Return NULL if the tile doesn't exist.
Definition at line 129 of file tile_far_bank.h. References sint. Referenced by NL3D::CPatchDLMContext::computeTextureFar(), NL3D::CLandscape::eraseTileFarIfNotGood(), and NL3D::CTextureFar::rebuildPatch().
00130 { 00131 #ifdef NL_DEBUG 00132 if (tile>=(sint)_TileVector.size()) 00133 return NULL; 00134 #else // NL_DEBUG 00135 if (_TileVector.begin()+tile>=_TileVector.end()) 00136 return NULL; 00137 #endif 00138 return &_TileVector[tile]; 00139 } |
|
Serial this bank.
Definition at line 113 of file tile_far_bank.cpp. References uint32. Referenced by NL3D::CLandscapeUser::loadBankFiles().
|
|
Resize the tile bank.
Definition at line 123 of file tile_far_bank.h. References sint.
00124 { 00125 _TileVector.resize(numTile); 00126 } |
|
The far tile vector.
Definition at line 164 of file tile_far_bank.h. |
|
The version of this class.
Definition at line 111 of file tile_far_bank.cpp. |