|
Planeshift
|
Manager that manage all locations and location types. More...
#include <location.h>
Public Member Functions | |
| Location * | CreateLocation (iDataConnection *db, LocationType *locationType, const char *locationName, const csVector3 &pos, iSector *sector, float radius, float rot_angle, const csString &flags) |
| Create a new location. More... | |
| Location * | CreateLocation (const char *locationTypeName, const char *locationName, const csVector3 &pos, iSector *sector, float radius, float rot_angle, const csString &flags) |
| Create a new location. More... | |
| Location * | CreateLocation (LocationType *locationType, const char *locationName, const csVector3 &pos, iSector *sector, float radius, float rot_angle, const csString &flags) |
| Create a new location. More... | |
| LocationType * | CreateLocationType (iDataConnection *db, const csString &locationName) |
| Create a new location type. More... | |
| LocationType * | CreateLocationType (const csString &locationName) |
| Create a new location type. More... | |
| LocationType * | CreateLocationType (int id, const csString &locationName) |
| Create a new location type. More... | |
| LocationType * | FindLocation (const char *typeName) |
| Find a location with a given name. More... | |
| Location * | FindLocation (const char *typeName, const char *name) |
| This function handles the searching for the specified object type and basically does the work for the <locate> script command. More... | |
| Location * | FindLocation (LocationType *type, const char *name) |
| Find a location of a specfic location type by nam. More... | |
| Location * | FindLocation (int id) |
| Find a location of a specfic location type by nam. More... | |
| size_t | FindLocationsInSector (iEngine *engine, iSector *sector, csList< Location * > &list) |
| Find all location in given sector. More... | |
| Location * | FindNearestLocation (psWorld *world, csVector3 &pos, iSector *sector, float range, float *found_range) |
| Find the neares location to a point. More... | |
| Location * | FindNearestLocation (psWorld *world, const char *typeName, csVector3 &pos, iSector *sector, float range, float *found_range) |
| Find the neares location to a point of a given location type. More... | |
| Location * | FindRandomLocation (psWorld *world, const char *typeName, csVector3 &pos, iSector *sector, float range, float *found_range) |
| Find a random location within a given max range. More... | |
| LocationType * | FindRegion (const char *regname) |
| Find a region with a given name. More... | |
| csHash< LocationType *, csString >::GlobalIterator | GetIterator () |
| Get a iterator to all Location Types stored in the Location Manager. More... | |
| Location * | GetLocation (int index) |
| Retrive one location from this manager by index. More... | |
| int | GetNumberOfLocations () const |
| Retrive the number of locations in this manager. More... | |
| bool | Load (iEngine *engine, iDataConnection *db) |
| Load all locations from DB. More... | |
| LocationManager () | |
| Constructor. More... | |
| bool | RemoveLocationType (iDataConnection *db, const csString &locationName) |
| Remove a location type. More... | |
| bool | RemoveLocationType (const csString &locationName) |
| Remove a location type. More... | |
| virtual | ~LocationManager () |
| Destructor. More... | |
Manager that manage all locations and location types.
Definition at line 353 of file location.h.
| LocationManager::LocationManager | ( | ) |
Constructor.
|
virtual |
Destructor.
| Location* LocationManager::CreateLocation | ( | iDataConnection * | db, |
| LocationType * | locationType, | ||
| const char * | locationName, | ||
| const csVector3 & | pos, | ||
| iSector * | sector, | ||
| float | radius, | ||
| float | rot_angle, | ||
| const csString & | flags | ||
| ) |
Create a new location.
And add it to the DB.
| Location* LocationManager::CreateLocation | ( | const char * | locationTypeName, |
| const char * | locationName, | ||
| const csVector3 & | pos, | ||
| iSector * | sector, | ||
| float | radius, | ||
| float | rot_angle, | ||
| const csString & | flags | ||
| ) |
Create a new location.
| Location* LocationManager::CreateLocation | ( | LocationType * | locationType, |
| const char * | locationName, | ||
| const csVector3 & | pos, | ||
| iSector * | sector, | ||
| float | radius, | ||
| float | rot_angle, | ||
| const csString & | flags | ||
| ) |
Create a new location.
| LocationType* LocationManager::CreateLocationType | ( | iDataConnection * | db, |
| const csString & | locationName | ||
| ) |
Create a new location type.
| LocationType* LocationManager::CreateLocationType | ( | const csString & | locationName | ) |
Create a new location type.
| LocationType* LocationManager::CreateLocationType | ( | int | id, |
| const csString & | locationName | ||
| ) |
Create a new location type.
| LocationType* LocationManager::FindLocation | ( | const char * | typeName | ) |
Find a location with a given name.
This function handles the searching for the specified location type so that other functions can refer to the location type directly.
| Location* LocationManager::FindLocation | ( | const char * | typeName, |
| const char * | name | ||
| ) |
This function handles the searching for the specified object type and basically does the work for the <locate> script command.
| Location* LocationManager::FindLocation | ( | LocationType * | type, |
| const char * | name | ||
| ) |
Find a location of a specfic location type by nam.
Find a location of a specfic location type by nam.
| size_t LocationManager::FindLocationsInSector | ( | iEngine * | engine, |
| iSector * | sector, | ||
| csList< Location * > & | list | ||
| ) |
Find all location in given sector.
| Location* LocationManager::FindNearestLocation | ( | psWorld * | world, |
| csVector3 & | pos, | ||
| iSector * | sector, | ||
| float | range, | ||
| float * | found_range | ||
| ) |
Find the neares location to a point.
| Location* LocationManager::FindNearestLocation | ( | psWorld * | world, |
| const char * | typeName, | ||
| csVector3 & | pos, | ||
| iSector * | sector, | ||
| float | range, | ||
| float * | found_range | ||
| ) |
Find the neares location to a point of a given location type.
| Location* LocationManager::FindRandomLocation | ( | psWorld * | world, |
| const char * | typeName, | ||
| csVector3 & | pos, | ||
| iSector * | sector, | ||
| float | range, | ||
| float * | found_range | ||
| ) |
Find a random location within a given max range.
| LocationType* LocationManager::FindRegion | ( | const char * | regname | ) |
Find a region with a given name.
This function handles the searching for the specified region name so that other functions can refer to the region directly.
| csHash<LocationType*, csString>::GlobalIterator LocationManager::GetIterator | ( | ) |
Retrive one location from this manager by index.
| int LocationManager::GetNumberOfLocations | ( | ) | const |
Retrive the number of locations in this manager.
| bool LocationManager::Load | ( | iEngine * | engine, |
| iDataConnection * | db | ||
| ) |
Load all locations from DB.
| bool LocationManager::RemoveLocationType | ( | iDataConnection * | db, |
| const csString & | locationName | ||
| ) |
Remove a location type.
| bool LocationManager::RemoveLocationType | ( | const csString & | locationName | ) |
Remove a location type.