19 #ifndef __WAYPOINT_H__    20 #define __WAYPOINT_H__    22 #include <csutil/csstring.h>    23 #include <csgeom/vector3.h>    24 #include <iengine/sector.h>    51     const char* 
GetName()
 const { 
return alias.GetDataSafe(); }
   109     Waypoint(csString& name, csVector3& pos, csString& sectorName, 
float radius, csString& flags);
   117     bool Load(iDocumentNode *node, iEngine *engine);
   118     bool Import(iDocumentNode *node, iEngine *engine, iDataConnection *
db);
   119     bool Load(iResultRow& row, iEngine *engine); 
   122     void RemoveLink(
psPath * path);
   131     void RemoveAlias(csString aliasName);
   141     bool Rename(iDataConnection * db,
const char* name);
   143     void Rename(
const char* name);
   146     const char* 
GetGroup(){ 
return group.GetDataSafe(); }
   149     csString GetAliases();
   153     const WaypointAlias* FindAlias(
const csString& aliasName) 
const;
   169     csString     GetFlags() 
const;
   172     bool SetRadius(
float radius);
   173     bool SetRadius(iDataConnection * db, 
float radius);
   174     void RecalculateEdges(
psWorld * world, iEngine *engine);
   178     bool CheckWithin(iEngine * engine, 
const csVector3& pos, 
const iSector* sector);
   180     int Create(iDataConnection * db);
   181     WaypointAlias* CreateAlias(iDataConnection * db, csString 
alias, 
float rotationAngle);
   182     bool RemoveAlias(iDataConnection * db, csString alias);
   183     bool Adjust(iDataConnection * db, csVector3 & pos, csString sector);
   184     void Adjust(csVector3 & pos, csString sector);
   185     void Adjust(csVector3 & pos, iSector* sector);
   188     void SetFlags(
const csString& flagStr);
   200     bool SetFlag(iDataConnection * db, 
const csString &flagstr, 
bool enable);
   211     bool SetFlag(
const csString &flagstr, 
bool enable);    
 psWorld is in charge of managing all regions (zone map files) and loading/unloading them as needed...
 
WaypointAlias(Waypoint *wp, int id, const csString &alias, float rotationAngle)
Constructor. 
 
csString group
Hold group name for this waypoint if any. 
 
bool indoor
True if this waypoint is indoor. 
 
iSector * GetSector(iEngine *engine)
Return cached sector or find the sector and cache it from engine. 
 
iSector * GetSector(iEngine *engine)
Get the sector from the location. 
 
const char * GetName() const 
Get the name of this waypoint. 
 
Class to hold information regarding aliases for waypoints. 
 
csPDelArray< Edge > edges
Edges for each link. 
 
Location loc
Id and position. 
 
bool ground
True if this waypoint is ground. 
 
csPDelArray< WaypointAlias > aliases
Hold aliases for this waypoint. 
 
csArray< Waypoint * > links
Links to other waypoinst connected with paths from this node. 
 
bool underwater
True if this waypoint is underwater. 
 
csString alias
An alias for an waypoint. 
 
float GetRotationAngle() const 
Get the Rotation Angle of this alias. 
 
const char * GetGroup()
Get the group name of this waypoint. 
 
void SetFlag(const char *name, bool flag, uint32 filter)
 
iSector * GetSector(iEngine *engine) const 
 
Represents the Edge in a PathNetwork. 
 
int GetID() const 
Get the DB id for this alias. 
 
A waypoint is a specified circle on the map with a name, location, and a list of waypoints it is conn...
 
float distance
Data used in the dijkstra's algorithm to find waypoint path. 
 
bool road
True if this waypoint is a road/street. 
 
bool excluded
Predecessor WP to track shortest way back to start. 
 
bool path
True if this waypoint is a path. 
 
csString name
The name of this location. 
 
bool pub
True if this waypoint is public. 
 
csVector3 pos
The positon of this location. 
 
bool operator==(Waypoint &other) const 
 
iDataConnection * db
Global connection to the Database. Set from the psDatabase class. 
 
uint32_t effectID
When displayed in a client this is the effect id. 
 
Waypoint * pi
Hold current shortest distance to the start WP. 
 
bool SetRotationAngle(iDataConnection *db, float rotationAngle)
Set a new rotation angle for this waypoint. 
 
int id
The ID of this location, from the DB. 
 
int GetID() const 
Get the id of this waypoint. 
 
bool priv
True if this waypoint is private. 
 
float radius
The radius of this locaiton. 
 
csArray< float > dists
Distances of each link. 
 
bool operator<(Waypoint &other) const 
 
bool CreateUpdate(iDataConnection *db)
Crate or update a waypoint alias. 
 
Helper interface to allocate effect IDs. 
 
int id
The ID of this waypoint alias in DB. 
 
const csVector3 & GetPosition() const 
 
Waypoint * wp
The waypoint this alias is a part of. 
 
float rotationAngle
The direction the NPC should face when placed on this waypoint. 
 
csArray< psPath * > paths
Path object for each of the links. 
 
bool city
True if this waypoint is in a city. 
 
Template class for implementing waypoint filtering when calculating routes. 
 
A Location is a named place on the map, located dynamically by NPCs as scripted. 
 
void SetRotationAngle(float rotationAngle)
Set a new rotation angle for this waypoint. 
 
const char * GetName() const 
Get the Name of this alias. 
 
bool allowReturn
This prevents the link back to the prior waypoint < from being chosen, if true.