#include <pathfinding.hpp>
MWMechanics::PathFinder::PathFinder |
( |
| ) |
|
Synchronize new path with old one to avoid visiting 1 waypoint 2 times
- Note
- BuildPath() takes closest PathGrid point to NPC as first point of path. This is undesirable if NPC has just passed a Pathgrid point, as this makes the 2nd point of the new path == the 1st point of old path. Which results in NPC "running in a circle" back to the just passed waypoint.
bool MWMechanics::PathFinder::checkPathCompleted |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
tolerance = PathTolerance |
|
) |
| |
true if we are within tolerance units of the last path point.
void MWMechanics::PathFinder::clearPath |
( |
| ) |
|
static float MWMechanics::PathFinder::DistanceSquared |
( |
ESM::Pathgrid::Point |
point, |
|
|
const osg::Vec3f & |
pos |
|
) |
| |
|
inlinestatic |
static int MWMechanics::PathFinder::GetClosestPoint |
( |
const ESM::Pathgrid * |
grid, |
|
|
const osg::Vec3f & |
pos |
|
) |
| |
|
inlinestatic |
int MWMechanics::PathFinder::getPathSize |
( |
| ) |
const |
|
inline |
float MWMechanics::PathFinder::getXAngleToNext |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| const |
float MWMechanics::PathFinder::getZAngleToNext |
( |
float |
x, |
|
|
float |
y |
|
) |
| const |
bool MWMechanics::PathFinder::isPathConstructed |
( |
| ) |
const |
|
inline |
utility function to convert a osg::Vec3f to a Pathgrid::Point
utility function to convert an ESM::Position to a Pathgrid::Point
static float MWMechanics::PathFinder::sgn |
( |
float |
val | ) |
|
|
inlinestatic |
static int MWMechanics::PathFinder::sgn |
( |
int |
a | ) |
|
|
inlinestatic |
const int MWMechanics::PathFinder::PathTolerance = 32 |
|
static |
The documentation for this class was generated from the following files: