|
Planeshift
|
A waypoint is a specified circle on the map with a name, location, and a list of waypoints it is connected to. More...
#include <waypoint.h>
Public Member Functions | |
| WaypointAlias * | AddAlias (int id, csString aliasName, float rotationAngle) |
| Add a new alias to this waypoint. More... | |
| void | AddLink (psPath *path, Waypoint *wp, psPath::Direction direction, float distance) |
| bool | Adjust (iDataConnection *db, csVector3 &pos, csString sector) |
| void | Adjust (csVector3 &pos, csString sector) |
| void | Adjust (csVector3 &pos, iSector *sector) |
| bool | CheckWithin (iEngine *engine, const csVector3 &pos, const iSector *sector) |
| int | Create (iDataConnection *db) |
| WaypointAlias * | CreateAlias (iDataConnection *db, csString alias, float rotationAngle) |
| const WaypointAlias * | FindAlias (const csString &aliasName) const |
| Locate the WaypointAlias struct for a alias by alias name. More... | |
| WaypointAlias * | FindAlias (const csString &aliasName) |
| Locate the WaypointAlias struct for a alias by alias name. More... | |
| csString | GetAliases () |
| Get a string with aliases for this waypoint. More... | |
| uint32_t | GetEffectID (iEffectIDAllocator *allocator) |
| Return the effect ID for this waypoint or assign a new ID. More... | |
| csString | GetFlags () const |
| const char * | GetGroup () |
| Get the group name of this waypoint. More... | |
| int | GetID () const |
| Get the id of this waypoint. More... | |
| const char * | GetName () const |
| Get the name of this waypoint. More... | |
| const csVector3 & | GetPosition () const |
| float | GetRadius () const |
| Edge * | GetRandomEdge (const psPathNetwork::RouteFilter *routeFilter) |
| iSector * | GetSector (iEngine *engine) |
| Get the sector from the location. More... | |
| iSector * | GetSector (iEngine *engine) const |
| bool | Import (iDocumentNode *node, iEngine *engine, iDataConnection *db) |
| bool | Load (iDocumentNode *node, iEngine *engine) |
| bool | Load (iResultRow &row, iEngine *engine) |
| bool | operator< (Waypoint &other) const |
| bool | operator== (Waypoint &other) const |
| void | RecalculateEdges (psWorld *world, iEngine *engine) |
| void | RemoveAlias (csString aliasName) |
| Remove a alias from this waypoint. More... | |
| bool | RemoveAlias (iDataConnection *db, csString alias) |
| void | RemoveLink (psPath *path) |
| bool | Rename (iDataConnection *db, const char *name) |
| Rename the waypoint and update the db. More... | |
| void | Rename (const char *name) |
| Rename the waypoint. More... | |
| bool | SetFlag (iDataConnection *db, const csString &flagstr, bool enable) |
| Enable/Disable the listed flags. More... | |
| bool | SetFlag (const csString &flagstr, bool enable) |
| Enable/Disable the listed flags. More... | |
| void | SetFlags (const csString &flagStr) |
| Set all flags based on the string. More... | |
| void | SetID (int id) |
| bool | SetRadius (float radius) |
| bool | SetRadius (iDataConnection *db, float radius) |
| bool | SetRotationAngle (const csString &aliasName, float rotationAngle) |
| Set the rotation angle for an alias. More... | |
| Waypoint () | |
| Waypoint (const char *name) | |
| Waypoint (csString &name, csVector3 &pos, csString §orName, float radius, csString &flags) | |
Public Attributes | |
| csPDelArray< WaypointAlias > | aliases |
| Hold aliases for this waypoint. More... | |
| bool | allowReturn |
| This prevents the link back to the prior waypoint < from being chosen, if true. More... | |
| bool | city |
| True if this waypoint is in a city. More... | |
| float | distance |
| Data used in the dijkstra's algorithm to find waypoint path. More... | |
| csArray< float > | dists |
| Distances of each link. More... | |
| csPDelArray< Edge > | edges |
| Edges for each link. More... | |
| uint32_t | effectID |
| When displayed in a client this is the effect id. More... | |
| bool | excluded |
| Predecessor WP to track shortest way back to start. More... | |
| bool | ground |
| True if this waypoint is ground. More... | |
| csString | group |
| Hold group name for this waypoint if any. More... | |
| bool | indoor |
| True if this waypoint is indoor. More... | |
| csArray< Waypoint * > | links |
| Links to other waypoinst connected with paths from this node. More... | |
| Location | loc |
| Id and position. More... | |
| bool | path |
| True if this waypoint is a path. More... | |
| csArray< psPath * > | paths |
| Path object for each of the links. More... | |
| Waypoint * | pi |
| Hold current shortest distance to the start WP. More... | |
| bool | priv |
| True if this waypoint is private. More... | |
| bool | pub |
| True if this waypoint is public. More... | |
| bool | road |
| True if this waypoint is a road/street. More... | |
| bool | underground |
| True if this waypoint is underground. More... | |
| bool | underwater |
| True if this waypoint is underwater. More... | |
A waypoint is a specified circle on the map with a name, location, and a list of waypoints it is connected to.
With this class, a network of nodes can be created which will allow for pathfinding and path wandering by NPCs.
Definition at line 81 of file waypoint.h.
| Waypoint::Waypoint | ( | ) |
| Waypoint::Waypoint | ( | const char * | name | ) |
| Waypoint::Waypoint | ( | csString & | name, |
| csVector3 & | pos, | ||
| csString & | sectorName, | ||
| float | radius, | ||
| csString & | flags | ||
| ) |
| WaypointAlias* Waypoint::AddAlias | ( | int | id, |
| csString | aliasName, | ||
| float | rotationAngle | ||
| ) |
Add a new alias to this waypoint.
| void Waypoint::AddLink | ( | psPath * | path, |
| Waypoint * | wp, | ||
| psPath::Direction | direction, | ||
| float | distance | ||
| ) |
| bool Waypoint::Adjust | ( | iDataConnection * | db, |
| csVector3 & | pos, | ||
| csString | sector | ||
| ) |
| void Waypoint::Adjust | ( | csVector3 & | pos, |
| csString | sector | ||
| ) |
| void Waypoint::Adjust | ( | csVector3 & | pos, |
| iSector * | sector | ||
| ) |
| bool Waypoint::CheckWithin | ( | iEngine * | engine, |
| const csVector3 & | pos, | ||
| const iSector * | sector | ||
| ) |
| int Waypoint::Create | ( | iDataConnection * | db | ) |
| WaypointAlias* Waypoint::CreateAlias | ( | iDataConnection * | db, |
| csString | alias, | ||
| float | rotationAngle | ||
| ) |
| const WaypointAlias* Waypoint::FindAlias | ( | const csString & | aliasName | ) | const |
Locate the WaypointAlias struct for a alias by alias name.
| WaypointAlias* Waypoint::FindAlias | ( | const csString & | aliasName | ) |
Locate the WaypointAlias struct for a alias by alias name.
| csString Waypoint::GetAliases | ( | ) |
Get a string with aliases for this waypoint.
| uint32_t Waypoint::GetEffectID | ( | iEffectIDAllocator * | allocator | ) |
Return the effect ID for this waypoint or assign a new ID.
| allocator |
| csString Waypoint::GetFlags | ( | ) | const |
|
inline |
Get the group name of this waypoint.
Definition at line 146 of file waypoint.h.
|
inline |
Get the id of this waypoint.
Definition at line 134 of file waypoint.h.
|
inline |
Get the name of this waypoint.
Definition at line 138 of file waypoint.h.
|
inline |
Definition at line 176 of file waypoint.h.
|
inline |
Definition at line 171 of file waypoint.h.
| Edge* Waypoint::GetRandomEdge | ( | const psPathNetwork::RouteFilter * | routeFilter | ) |
|
inline |
Get the sector from the location.
Definition at line 166 of file waypoint.h.
|
inline |
Definition at line 167 of file waypoint.h.
| bool Waypoint::Import | ( | iDocumentNode * | node, |
| iEngine * | engine, | ||
| iDataConnection * | db | ||
| ) |
| bool Waypoint::Load | ( | iDocumentNode * | node, |
| iEngine * | engine | ||
| ) |
| bool Waypoint::Load | ( | iResultRow & | row, |
| iEngine * | engine | ||
| ) |
|
inline |
Definition at line 114 of file waypoint.h.
|
inline |
Definition at line 112 of file waypoint.h.
| void Waypoint::RecalculateEdges | ( | psWorld * | world, |
| iEngine * | engine | ||
| ) |
| void Waypoint::RemoveAlias | ( | csString | aliasName | ) |
Remove a alias from this waypoint.
| bool Waypoint::RemoveAlias | ( | iDataConnection * | db, |
| csString | alias | ||
| ) |
| void Waypoint::RemoveLink | ( | psPath * | path | ) |
| bool Waypoint::Rename | ( | iDataConnection * | db, |
| const char * | name | ||
| ) |
Rename the waypoint and update the db.
| void Waypoint::Rename | ( | const char * | name | ) |
Rename the waypoint.
| bool Waypoint::SetFlag | ( | iDataConnection * | db, |
| const csString & | flagstr, | ||
| bool | enable | ||
| ) |
Enable/Disable the listed flags.
Will search the flagstr input to find the flag to enable or disable.
| db | Need a pointer to the db to update flags |
| flagstr | The flag to modify. |
| enable | Set to true to enable the flag. |
| bool Waypoint::SetFlag | ( | const csString & | flagstr, |
| bool | enable | ||
| ) |
Enable/Disable the listed flags.
Will search the flagstr input to find the flag to enable or disable.
| flagstr | The flag to modify. |
| enable | Set to true to enable the flag. |
| void Waypoint::SetFlags | ( | const csString & | flagStr | ) |
Set all flags based on the string.
| void Waypoint::SetID | ( | int | id | ) |
| bool Waypoint::SetRadius | ( | float | radius | ) |
| bool Waypoint::SetRadius | ( | iDataConnection * | db, |
| float | radius | ||
| ) |
| bool Waypoint::SetRotationAngle | ( | const csString & | aliasName, |
| float | rotationAngle | ||
| ) |
Set the rotation angle for an alias.
| csPDelArray<WaypointAlias> Waypoint::aliases |
Hold aliases for this waypoint.
Definition at line 86 of file waypoint.h.
| bool Waypoint::allowReturn |
This prevents the link back to the prior waypoint < from being chosen, if true.
Definition at line 93 of file waypoint.h.
| bool Waypoint::city |
True if this waypoint is in a city.
Definition at line 99 of file waypoint.h.
| float Waypoint::distance |
Data used in the dijkstra's algorithm to find waypoint path.
Definition at line 219 of file waypoint.h.
| csArray<float> Waypoint::dists |
Distances of each link.
Definition at line 89 of file waypoint.h.
| csPDelArray<Edge> Waypoint::edges |
Edges for each link.
Definition at line 90 of file waypoint.h.
| uint32_t Waypoint::effectID |
When displayed in a client this is the effect id.
Definition at line 105 of file waypoint.h.
| bool Waypoint::excluded |
Predecessor WP to track shortest way back to start.
Definition at line 221 of file waypoint.h.
| bool Waypoint::ground |
True if this waypoint is ground.
Definition at line 103 of file waypoint.h.
| csString Waypoint::group |
Hold group name for this waypoint if any.
Definition at line 85 of file waypoint.h.
| bool Waypoint::indoor |
True if this waypoint is indoor.
Definition at line 100 of file waypoint.h.
| csArray<Waypoint*> Waypoint::links |
Links to other waypoinst connected with paths from this node.
Definition at line 88 of file waypoint.h.
| Location Waypoint::loc |
Id and position.
Definition at line 84 of file waypoint.h.
| bool Waypoint::path |
True if this waypoint is a path.
Definition at line 101 of file waypoint.h.
| csArray<psPath*> Waypoint::paths |
Path object for each of the links.
Definition at line 91 of file waypoint.h.
| Waypoint* Waypoint::pi |
Hold current shortest distance to the start WP.
Definition at line 220 of file waypoint.h.
| bool Waypoint::priv |
True if this waypoint is private.
Definition at line 97 of file waypoint.h.
| bool Waypoint::pub |
True if this waypoint is public.
Definition at line 98 of file waypoint.h.
| bool Waypoint::road |
True if this waypoint is a road/street.
Definition at line 102 of file waypoint.h.
| bool Waypoint::underground |
True if this waypoint is underground.
Definition at line 95 of file waypoint.h.
| bool Waypoint::underwater |
True if this waypoint is underwater.
Definition at line 96 of file waypoint.h.