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. | |
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. | |
Location * | CreateLocation (LocationType *locationType, const char *locationName, const csVector3 &pos, iSector *sector, float radius, float rot_angle, const csString &flags) |
Create a new location. | |
LocationType * | CreateLocationType (iDataConnection *db, const csString &locationName) |
Create a new location type. | |
LocationType * | CreateLocationType (const csString &locationName) |
Create a new location type. | |
LocationType * | CreateLocationType (int id, const csString &locationName) |
Create a new location type. | |
Location * | FindLocation (const char *typeName, const char *name) |
Find a location of a specfic location type by nam. | |
Location * | FindLocation (LocationType *type, const char *name) |
Find a location of a specfic location type by nam. | |
LocationType * | FindLocation (const char *typeName) |
Find a location type by name. | |
Location * | FindLocation (int id) |
Find a location of a specfic location type by nam. | |
size_t | FindLocationsInSector (iEngine *engine, iSector *sector, csList< Location * > &list) |
Find all location in given sector. | |
Location * | FindNearestLocation (psWorld *world, csVector3 &pos, iSector *sector, float range, float *found_range) |
Find the neares location to a point. | |
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. | |
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. | |
LocationType * | FindRegion (const char *regname) |
Find a region by name. | |
csHash< LocationType *, csString >::GlobalIterator | GetIterator () |
Get a iterator to all Location Types stored in the Location Manager. | |
Location * | GetLocation (int index) |
Retrive one location from this manager by index. | |
int | GetNumberOfLocations () const |
Retrive the number of locations in this manager. | |
bool | Load (iEngine *engine, iDataConnection *db) |
Load all locations from DB. | |
LocationManager () | |
Constructor. | |
bool | RemoveLocationType (const csString &locationName) |
Remove a location type. | |
bool | RemoveLocationType (iDataConnection *db, const csString &locationName) |
Remove a location type. | |
virtual | ~LocationManager () |
Destructor. |
Manager that manage all locations and location types.
Definition at line 353 of file location.h.
LocationManager::LocationManager | ( | ) |
Constructor.
virtual LocationManager::~LocationManager | ( | ) | [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 | ( | LocationType * | locationType, |
const char * | locationName, | ||
const csVector3 & | pos, | ||
iSector * | sector, | ||
float | radius, | ||
float | rot_angle, | ||
const csString & | flags | ||
) |
Create a new location.
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.
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.
Find a location of a specfic location type by nam.
Location* LocationManager::FindLocation | ( | const char * | typeName, |
const char * | name | ||
) |
Find a location of a specfic location type by nam.
LocationType* LocationManager::FindLocation | ( | const char * | typeName | ) |
Find a location type by name.
Location* LocationManager::FindLocation | ( | LocationType * | type, |
const char * | name | ||
) |
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 by name.
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.