19 #ifndef __PSPATHNETWORK_H__ 20 #define __PSPATHNETWORK_H__ 22 #include <csutil/array.h> 23 #include <csutil/list.h> 66 csWeakRef<iDataConnection>
db;
73 bool Load(iEngine *engine, iDataConnection *db,
psWorld * world);
190 psPath *
FindNearestPath(
const csVector3& v, iSector *sector,
float range,
float * found_range = NULL,
int * index = NULL,
float * fraction = NULL);
202 psPath *
FindNearestPoint(
const csVector3& v, iSector *sector,
float range,
float * found_range = NULL,
int * index = NULL);
254 Waypoint*
CreateWaypoint( iDataConnection *db, csString& name, csVector3& pos, csString& sectorName,
float radius, csString& flags);
259 Waypoint*
CreateWaypoint( csString& name, csVector3& pos, csString& sectorName,
float radius, csString& flags);
psWorld is in charge of managing all regions (zone map files) and loading/unloading them as needed...
int FindWaypointGroup(const char *groupName)
Find the index for the given group name, return -1 if no group is found.
Waypoint * FindNearestWaypoint(const csVector3 &v, iSector *sector, float range, float *found_range=NULL)
Find waypoint nearest to a point in the world.
bool Load(iEngine *engine, iDataConnection *db, psWorld *world)
Load all waypoins and paths from db.
Class to hold information regarding aliases for waypoints.
size_t FindPointsInSector(iSector *sector, csList< psPathPoint * > &list)
Get a list of points in a sector.
void ListWaypoints(const char *pattern)
List all waypoints matching pattern to console.
size_t FindWaypointsInSector(iSector *sector, csList< Waypoint * > &list)
Get a list of waypoints in a sector.
Waypoint * FindWaypoint(int id)
Find waypoint by id.
csPDelArray< Waypoint > waypoints
csWeakRef< iDataConnection > db
Represents the Edge in a PathNetwork.
psPath * FindNearestPath(const csVector3 &v, iSector *sector, float range, float *found_range=NULL, int *index=NULL, float *fraction=NULL)
Find the path nearest to a point in the world.
A waypoint is a specified circle on the map with a name, location, and a list of waypoints it is conn...
csArray< csList< Waypoint * > > waypointGroups
csPDelArray< psPath > paths
csList< Waypoint * > FindWaypointRoute(Waypoint *start, Waypoint *end, const RouteFilter *routeFilter)
Find the shortest route between waypoint start and stop.
psPath * CreatePath(iDataConnection *db, const csString &name, Waypoint *wp1, Waypoint *wp2, const csString &flags)
Create a new path/connection/link between two waypoints.
csArray< csString > waypointGroupNames
csWeakRef< iEngine > engine
psPathPoint * FindNearestPoint(const psPath *path, const csVector3 &v, const iSector *sector, float range)
Find the path nearest to a point in the world.
void ListPaths(const char *pattern)
List all paths matching pattern to console.
Edge * FindEdge(const Waypoint *wp1, const Waypoint *wp2)
Find a given edge from starting waypoint wp1 to end waypoint wp2.
Waypoint * FindRandomWaypoint(const csVector3 &v, iSector *sector, float range, float *found_range=NULL)
Find random waypoint within a given range to a point in the world.
psPathPoint * FindPoint(const psPath *path, const csVector3 &pos, iSector *sector, float range, int &index)
Find the point nearest to the path.
bool Delete(psPath *path)
Delete the given path from the db.
psPath * FindPath(const char *name)
Find the named path.
virtual bool Filter(const Waypoint *wp) const =0
Called to check if a waypoint should be filters.
Template class for implementing waypoint filtering when calculating routes.
A network of Waypoint and psPath objects.
csList< Edge * > FindEdgeRoute(Waypoint *start, Waypoint *end, const RouteFilter *routeFilter)
Find the shortest route between waypoint start and stop.
Represents a point on a path between two waypoints.
int GetNextWaypointCheck()
Get next unique number for waypoint checking.
size_t AddWaypointToGroup(csString group, Waypoint *wp)
Add a new waypoint to the given group.
Waypoint * CreateWaypoint(iDataConnection *db, csString &name, csVector3 &pos, csString §orName, float radius, csString &flags)
Create a new waypoint and insert in db.
psPathPoint * FindPathPoint(int id)
Find path point by id.