Planeshift
Public Member Functions

LocationManager Class Reference

Manager that manage all locations and location types. More...

#include <location.h>

List of all members.

Public Member Functions

LocationCreateLocation (iDataConnection *db, LocationType *locationType, const char *locationName, const csVector3 &pos, iSector *sector, float radius, float rot_angle, const csString &flags)
 Create a new location.
LocationCreateLocation (const char *locationTypeName, const char *locationName, const csVector3 &pos, iSector *sector, float radius, float rot_angle, const csString &flags)
 Create a new location.
LocationCreateLocation (LocationType *locationType, const char *locationName, const csVector3 &pos, iSector *sector, float radius, float rot_angle, const csString &flags)
 Create a new location.
LocationTypeCreateLocationType (iDataConnection *db, const csString &locationName)
 Create a new location type.
LocationTypeCreateLocationType (const csString &locationName)
 Create a new location type.
LocationTypeCreateLocationType (int id, const csString &locationName)
 Create a new location type.
LocationFindLocation (const char *typeName, const char *name)
 Find a location of a specfic location type by nam.
LocationFindLocation (LocationType *type, const char *name)
 Find a location of a specfic location type by nam.
LocationTypeFindLocation (const char *typeName)
 Find a location type by name.
LocationFindLocation (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.
LocationFindNearestLocation (psWorld *world, csVector3 &pos, iSector *sector, float range, float *found_range)
 Find the neares location to a point.
LocationFindNearestLocation (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.
LocationFindRandomLocation (psWorld *world, const char *typeName, csVector3 &pos, iSector *sector, float range, float *found_range)
 Find a random location within a given max range.
LocationTypeFindRegion (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.
LocationGetLocation (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.

Detailed Description

Manager that manage all locations and location types.

Definition at line 353 of file location.h.


Constructor & Destructor Documentation

LocationManager::LocationManager ( )

Constructor.

virtual LocationManager::~LocationManager ( ) [virtual]

Destructor.


Member Function Documentation

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.

Location* LocationManager::FindLocation ( int  id)

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 ( )

Get a iterator to all Location Types stored in the Location Manager.

Location* LocationManager::GetLocation ( int  index)

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.


The documentation for this class was generated from the following file: