|
Planeshift
|
This stores a vector of positions listing a set of points defining a common type of location, such as a list of burning fires or guard stations–whatever the NPCs need. More...
#include <location.h>
Public Member Functions | |
| void | AddLocation (Location *location) |
| Add a new location to this location type. More... | |
| bool | CheckWithinBounds (iEngine *engine, const csVector3 &pos, const iSector *sector) |
| Check if a point is within any of the locaitons of this location type. More... | |
| bool | CreateUpdate (iDataConnection *db) |
| Create or update an entry for this location type in the DB. More... | |
| int | GetID () const |
| retrive the ID of this location type. More... | |
| const char * | GetName () const |
| retrive the name of this location type. More... | |
| bool | GetRandomPosition (iEngine *engine, csVector3 &pos, iSector *§or, const iSector *inSector) |
| Get a random position in the location. More... | |
| bool | Import (iDocumentNode *node, iDataConnection *db) |
| bool | ImportLocations (iDocumentNode *node, iDataConnection *db) |
| bool | Load (iDocumentNode *node) |
| Load a location type from an XML file. More... | |
| bool | Load (iResultRow &row, iEngine *engine, iDataConnection *db) |
| Load a location type from DB. More... | |
| LocationType () | |
| Constructor. More... | |
| LocationType (int id, const csString &name) | |
| Constructor. More... | |
| void | RemoveLocation (Location *location) |
| Remove a location from this location type. More... | |
| ~LocationType () | |
| Destructor. More... | |
Public Attributes | |
| int | id |
| The DB ID of this location type. More... | |
| csArray< Location * > | locs |
| All the location of this location type. More... | |
| csString | name |
| The name of this location type. More... | |
This stores a vector of positions listing a set of points defining a common type of location, such as a list of burning fires or guard stations–whatever the NPCs need.
Definition at line 275 of file location.h.
| LocationType::LocationType | ( | ) |
Constructor.
| LocationType::LocationType | ( | int | id, |
| const csString & | name | ||
| ) |
Constructor.
| LocationType::~LocationType | ( | ) |
Destructor.
| void LocationType::AddLocation | ( | Location * | location | ) |
Add a new location to this location type.
| bool LocationType::CheckWithinBounds | ( | iEngine * | engine, |
| const csVector3 & | pos, | ||
| const iSector * | sector | ||
| ) |
Check if a point is within any of the locaitons of this location type.
| bool LocationType::CreateUpdate | ( | iDataConnection * | db | ) |
Create or update an entry for this location type in the DB.
|
inline |
retrive the ID of this location type.
Definition at line 337 of file location.h.
|
inline |
retrive the name of this location type.
Definition at line 344 of file location.h.
| bool LocationType::GetRandomPosition | ( | iEngine * | engine, |
| csVector3 & | pos, | ||
| iSector *& | sector, | ||
| const iSector * | inSector | ||
| ) |
Get a random position in the location.
Will return the position found. Do not relay on the state of the parameters if operation failes.
| engine | Used to find the sector |
| pos | The found position is returned here. |
| sector | The found sector is returned here. |
| inSector | If set, only search for random pos in this sector. |
| bool LocationType::Import | ( | iDocumentNode * | node, |
| iDataConnection * | db | ||
| ) |
| bool LocationType::ImportLocations | ( | iDocumentNode * | node, |
| iDataConnection * | db | ||
| ) |
| bool LocationType::Load | ( | iDocumentNode * | node | ) |
Load a location type from an XML file.
| bool LocationType::Load | ( | iResultRow & | row, |
| iEngine * | engine, | ||
| iDataConnection * | db | ||
| ) |
Load a location type from DB.
| void LocationType::RemoveLocation | ( | Location * | location | ) |
Remove a location from this location type.
| int LocationType::id |
The DB ID of this location type.
Definition at line 278 of file location.h.
| csArray<Location*> LocationType::locs |
All the location of this location type.
Definition at line 280 of file location.h.
| csString LocationType::name |
The name of this location type.
Definition at line 279 of file location.h.