#include <world.h>
Collaboration diagram for World:

Public Member Functions | |
| World (void) | |
| ~World (void) | |
| worldent_iterator | getWorldEntitiesBegin () |
| Gets the start of the list of objects. | |
| worldent_iterator | getWorldEntitiesEnd () |
| Gets the end of the list of objects. | |
| WorldEntity * | getWorldEntity (int id) |
| Finds ant returns entity with given ID. | |
| WorldEntity * | getWorldEntity (worldent_iterator iterator) const |
| Finds ant returns entity with given iterator. | |
| Landscape & | getLandscape () |
| Provides access to Landscape. | |
| BonusBox * | createBonusBox (GLVector3d position, GLQuaterniond orientation, int bonus_function_id) |
| Creates new bonus box on the map. | |
| Projectile * | createProjectile (GLVector3d position, GLQuaterniond orientation, int type_id, int shooter) |
| Creates new pojectile in the world. | |
| Tank * | createTank (GLVector3d position, GLQuaterniond orientation, int type_id, int player_id) |
| Creates new tank in the world. | |
| bool | deleteBonusBox (int id, bool delete_bonus) |
| Deletes a bonus box from the world. | |
| bool | deleteProjectile (int id) |
| Deletes a projectile from the world. | |
| bool | deleteTank (int id) |
| Deletes a tank from the world. | |
Private Member Functions | |
| int | getNextID () |
| void | addWorldEntity (WorldEntity *we) |
| void | delWorldEntity (WorldEntity *we) |
| World (const World &) | |
| Copy constructor is private, because we don't want anybody to copy that. | |
Private Attributes | |
| Landscape | mLandscape |
| worldent_list | mWorldList |
| List of all moveable objects. | |
| worldent_hash | mWorldHash |
| Hash table of all moveable objects. | |
| int | mMaxID |
| Maximal unique ID raeched so far. | |
Friends | |
| class | TaskSimulationServer |
Class that is owner of Landscape (with its Terrain, Skybox and LandscapeEntities) and WorldEntities. It also manages WorldEntities and provides access to Landscape.
Definition at line 43 of file world.h.
|
|
Definition at line 13 of file world.cpp. References mMaxID. |
|
|
|
|
|
Copy constructor is private, because we don't want anybody to copy that.
Definition at line 279 of file world.cpp. References DIE(). Here is the call graph for this function: ![]() |
|
|
Definition at line 224 of file world.cpp. References DIE(), CommonEntity::getID(), LOGE, and mWorldHash. Referenced by createBonusBox(), createProjectile(), and createTank(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
Creates new bonus box on the map.
Definition at line 22 of file world.cpp. References addWorldEntity(), assertL, CommonEntity::basicInit(), getNextID(), CommonEntity::init(), Bonus::initByID(), BonusBox::initSpecific(), and LOGW. Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
Creates new pojectile in the world.
Definition at line 47 of file world.cpp. References addWorldEntity(), assertL, gApp, Application::getGameCommon(), getNextID(), Game::isPlayerIDValid(), and LOGW. Here is the call graph for this function: ![]() |
|
||||||||||||||||||||
|
Creates new tank in the world.
Definition at line 70 of file world.cpp. References addWorldEntity(), assertL, gApp, Application::getGameCommon(), getNextID(), Game::isPlayerIDValid(), and LOGW. Referenced by TaskSimulationServer::tick(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Deletes a bonus box from the world.
Definition at line 93 of file world.cpp. References cBonusBox, CommonEntity::getClassType(), getWorldEntity(), and LOGW. Here is the call graph for this function: ![]() |
|
|
Deletes a projectile from the world.
Definition at line 128 of file world.cpp. References cProjectile, delWorldEntity(), CommonEntity::getClassType(), getWorldEntity(), and LOGW. Here is the call graph for this function: ![]() |
|
|
Deletes a tank from the world.
Definition at line 153 of file world.cpp. References cTank, delWorldEntity(), CommonEntity::getClassType(), getWorldEntity(), and LOGW. Here is the call graph for this function: ![]() |
|
|
Definition at line 250 of file world.cpp. References DIE(), CommonEntity::getID(), LOGE, and mWorldHash. Referenced by deleteProjectile(), and deleteTank(). Here is the call graph for this function: ![]() |
|
|
Provides access to Landscape.
Definition at line 219 of file world.cpp. References mLandscape. Referenced by TaskSimulationServer::checkTerrainHeights(), TaskRender::init(), LayerGame::initRefs(), GameServer::run(), and GameClient::run(). |
|
|
Return next unique ID in world. Allways return positive number Definition at line 274 of file world.cpp. Referenced by createBonusBox(), createProjectile(), and createTank(). |
|
|
Gets the start of the list of objects.
Definition at line 178 of file world.cpp. References mWorldList. Referenced by TaskSimulationServer::checkTerrainHeights(), LayerGame::renderWorldEntities(), TaskSimulationServer::setCollModelTransformations(), and TaskSimulationServer::updateHistory(). |
|
|
Gets the end of the list of objects.
Definition at line 183 of file world.cpp. References mWorldList. Referenced by TaskSimulationServer::checkTerrainHeights(), LayerGame::renderWorldEntities(), TaskSimulationServer::setCollModelTransformations(), and TaskSimulationServer::updateHistory(). |
|
|
Finds ant returns entity with given iterator.
Definition at line 206 of file world.cpp. References DIE(), LOGE, and mWorldList. Here is the call graph for this function: ![]() |
|
|
Finds ant returns entity with given ID.
Definition at line 188 of file world.cpp. References DIE(), LOGD, LOGE, and mWorldHash. Referenced by deleteBonusBox(), deleteProjectile(), deleteTank(), and LayerGame::renderWorldEntities(). Here is the call graph for this function: ![]() |
|
|
|
|
|
Definition at line 150 of file world.h. Referenced by getLandscape(). |
|
|
Maximal unique ID raeched so far.
Definition at line 156 of file world.h. Referenced by World(). |
|
|
Hash table of all moveable objects.
Definition at line 154 of file world.h. Referenced by addWorldEntity(), delWorldEntity(), and getWorldEntity(). |
|
|
List of all moveable objects.
Definition at line 153 of file world.h. Referenced by getWorldEntitiesBegin(), getWorldEntitiesEnd(), and getWorldEntity(). |
1.4.5