#include <PathGenerator.h>
|
| PathGenerator (WorldObject const *owner) |
|
| ~PathGenerator () |
|
| PathGenerator (PathGenerator const &right)=delete |
|
| PathGenerator (PathGenerator &&right)=delete |
|
PathGenerator & | operator= (PathGenerator const &right)=delete |
|
PathGenerator & | operator= (PathGenerator &&right)=delete |
|
bool | CalculatePath (float srcX, float srcY, float srcZ, float destX, float destY, float destZ, bool forceDest=false) |
|
bool | CalculatePath (float destX, float destY, float destZ, bool forceDest=false) |
|
bool | IsInvalidDestinationZ (WorldObject const *target) const |
|
void | SetUseStraightPath (bool useStraightPath) |
|
void | SetPathLengthLimit (float distance) |
|
void | SetUseRaycast (bool useRaycast) |
|
G3D::Vector3 const & | GetStartPosition () const |
|
G3D::Vector3 const & | GetEndPosition () const |
|
G3D::Vector3 const & | GetActualEndPosition () const |
|
Movement::PointsArray const & | GetPath () const |
|
float | GetPathLength () const |
|
PathType | GetPathType () const |
|
void | ShortenPathUntilDist (G3D::Vector3 const &target, float dist) |
|
|
void | SetStartPosition (G3D::Vector3 const &point) |
|
void | SetEndPosition (G3D::Vector3 const &point) |
|
void | SetActualEndPosition (G3D::Vector3 const &point) |
|
void | NormalizePath () |
|
void | Clear () |
|
bool | InRange (G3D::Vector3 const &p1, G3D::Vector3 const &p2, float r, float h) const |
|
float | Dist3DSqr (G3D::Vector3 const &p1, G3D::Vector3 const &p2) const |
|
bool | InRangeYZX (float const *v1, float const *v2, float r, float h) const |
|
dtPolyRef | GetPathPolyByPosition (dtPolyRef const *polyPath, uint32 polyPathSize, float const *Point, float *Distance=nullptr) const |
|
dtPolyRef | GetPolyByLocation (float const *Point, float *Distance) const |
|
bool | HaveTile (G3D::Vector3 const &p) const |
|
void | BuildPolyPath (G3D::Vector3 const &startPos, G3D::Vector3 const &endPos) |
|
void | BuildPointPath (float const *startPoint, float const *endPoint) |
|
void | BuildShortcut () |
|
NavTerrainFlag | GetNavTerrain (float x, float y, float z) const |
|
void | CreateFilter () |
|
void | UpdateFilter () |
|
uint32 | FixupCorridor (dtPolyRef *path, uint32 npath, uint32 maxPath, dtPolyRef const *visited, uint32 nvisited) |
|
bool | GetSteerTarget (float const *startPos, float const *endPos, float minTargetDist, dtPolyRef const *path, uint32 pathSize, float *steerPos, unsigned char &steerPosFlag, dtPolyRef &steerPosRef) |
|
dtStatus | FindSmoothPath (float const *startPos, float const *endPos, dtPolyRef const *polyPath, uint32 polyPathSize, float *smoothPath, int *smoothPathSize, uint32 maxSmoothPathSize) |
|
void | AddFarFromPolyFlags (bool startFarFromPoly, bool endFarFromPoly) |
|
Definition at line 55 of file PathGenerator.h.
◆ PathGenerator() [1/3]
PathGenerator::PathGenerator |
( |
WorldObject const * |
owner | ) |
|
|
explicit |
◆ ~PathGenerator()
PathGenerator::~PathGenerator |
( |
| ) |
|
◆ PathGenerator() [2/3]
◆ PathGenerator() [3/3]
◆ AddFarFromPolyFlags()
void PathGenerator::AddFarFromPolyFlags |
( |
bool |
startFarFromPoly, |
|
|
bool |
endFarFromPoly |
|
) |
| |
|
private |
◆ BuildPointPath()
void PathGenerator::BuildPointPath |
( |
float const * |
startPoint, |
|
|
float const * |
endPoint |
|
) |
| |
|
private |
◆ BuildPolyPath()
void PathGenerator::BuildPolyPath |
( |
G3D::Vector3 const & |
startPos, |
|
|
G3D::Vector3 const & |
endPos |
|
) |
| |
|
private |
◆ BuildShortcut()
void PathGenerator::BuildShortcut |
( |
| ) |
|
|
private |
◆ CalculatePath() [1/2]
bool PathGenerator::CalculatePath |
( |
float |
destX, |
|
|
float |
destY, |
|
|
float |
destZ, |
|
|
bool |
forceDest = false |
|
) |
| |
◆ CalculatePath() [2/2]
bool PathGenerator::CalculatePath |
( |
float |
srcX, |
|
|
float |
srcY, |
|
|
float |
srcZ, |
|
|
float |
destX, |
|
|
float |
destY, |
|
|
float |
destZ, |
|
|
bool |
forceDest = false |
|
) |
| |
◆ Clear()
void PathGenerator::Clear |
( |
| ) |
|
|
inlineprivate |
◆ CreateFilter()
void PathGenerator::CreateFilter |
( |
| ) |
|
|
private |
◆ Dist3DSqr()
float PathGenerator::Dist3DSqr |
( |
G3D::Vector3 const & |
p1, |
|
|
G3D::Vector3 const & |
p2 |
|
) |
| const |
|
private |
◆ FindSmoothPath()
dtStatus PathGenerator::FindSmoothPath |
( |
float const * |
startPos, |
|
|
float const * |
endPos, |
|
|
dtPolyRef const * |
polyPath, |
|
|
uint32 |
polyPathSize, |
|
|
float * |
smoothPath, |
|
|
int * |
smoothPathSize, |
|
|
uint32 |
maxSmoothPathSize |
|
) |
| |
|
private |
◆ FixupCorridor()
uint32 PathGenerator::FixupCorridor |
( |
dtPolyRef * |
path, |
|
|
uint32 |
npath, |
|
|
uint32 |
maxPath, |
|
|
dtPolyRef const * |
visited, |
|
|
uint32 |
nvisited |
|
) |
| |
|
private |
◆ GetActualEndPosition()
G3D::Vector3 const & PathGenerator::GetActualEndPosition |
( |
| ) |
const |
|
inline |
◆ GetEndPosition()
G3D::Vector3 const & PathGenerator::GetEndPosition |
( |
| ) |
const |
|
inline |
◆ GetNavTerrain()
NavTerrainFlag PathGenerator::GetNavTerrain |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| const |
|
private |
◆ GetPath()
◆ GetPathLength()
float PathGenerator::GetPathLength |
( |
| ) |
const |
◆ GetPathPolyByPosition()
dtPolyRef PathGenerator::GetPathPolyByPosition |
( |
dtPolyRef const * |
polyPath, |
|
|
uint32 |
polyPathSize, |
|
|
float const * |
Point, |
|
|
float * |
Distance = nullptr |
|
) |
| const |
|
private |
◆ GetPathType()
PathType PathGenerator::GetPathType |
( |
| ) |
const |
|
inline |
◆ GetPolyByLocation()
dtPolyRef PathGenerator::GetPolyByLocation |
( |
float const * |
Point, |
|
|
float * |
Distance |
|
) |
| const |
|
private |
◆ GetStartPosition()
G3D::Vector3 const & PathGenerator::GetStartPosition |
( |
| ) |
const |
|
inline |
◆ GetSteerTarget()
bool PathGenerator::GetSteerTarget |
( |
float const * |
startPos, |
|
|
float const * |
endPos, |
|
|
float |
minTargetDist, |
|
|
dtPolyRef const * |
path, |
|
|
uint32 |
pathSize, |
|
|
float * |
steerPos, |
|
|
unsigned char & |
steerPosFlag, |
|
|
dtPolyRef & |
steerPosRef |
|
) |
| |
|
private |
◆ HaveTile()
bool PathGenerator::HaveTile |
( |
G3D::Vector3 const & |
p | ) |
const |
|
private |
Workaround For some reason, often the tx and ty variables wont get a valid value Use this check to prevent getting negative tile coords and crashing on getTileAt
Definition at line 721 of file PathGenerator.cpp.
◆ InRange()
bool PathGenerator::InRange |
( |
G3D::Vector3 const & |
p1, |
|
|
G3D::Vector3 const & |
p2, |
|
|
float |
r, |
|
|
float |
h |
|
) |
| const |
|
private |
◆ InRangeYZX()
bool PathGenerator::InRangeYZX |
( |
float const * |
v1, |
|
|
float const * |
v2, |
|
|
float |
r, |
|
|
float |
h |
|
) |
| const |
|
private |
◆ IsInvalidDestinationZ()
bool PathGenerator::IsInvalidDestinationZ |
( |
WorldObject const * |
target | ) |
const |
◆ NormalizePath()
void PathGenerator::NormalizePath |
( |
| ) |
|
|
private |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ SetActualEndPosition()
void PathGenerator::SetActualEndPosition |
( |
G3D::Vector3 const & |
point | ) |
|
|
inlineprivate |
◆ SetEndPosition()
void PathGenerator::SetEndPosition |
( |
G3D::Vector3 const & |
point | ) |
|
|
inlineprivate |
◆ SetPathLengthLimit()
void PathGenerator::SetPathLengthLimit |
( |
float |
distance | ) |
|
|
inline |
◆ SetStartPosition()
void PathGenerator::SetStartPosition |
( |
G3D::Vector3 const & |
point | ) |
|
|
inlineprivate |
◆ SetUseRaycast()
void PathGenerator::SetUseRaycast |
( |
bool |
useRaycast | ) |
|
|
inline |
◆ SetUseStraightPath()
void PathGenerator::SetUseStraightPath |
( |
bool |
useStraightPath | ) |
|
|
inline |
◆ ShortenPathUntilDist()
void PathGenerator::ShortenPathUntilDist |
( |
G3D::Vector3 const & |
target, |
|
|
float |
dist |
|
) |
| |
◆ UpdateFilter()
void PathGenerator::UpdateFilter |
( |
| ) |
|
|
private |
◆ _actualEndPosition
G3D::Vector3 PathGenerator::_actualEndPosition |
|
private |
◆ _endPosition
G3D::Vector3 PathGenerator::_endPosition |
|
private |
◆ _filter
dtQueryFilter PathGenerator::_filter |
|
private |
◆ _forceDestination
bool PathGenerator::_forceDestination |
|
private |
◆ _navMesh
dtNavMesh const* PathGenerator::_navMesh |
|
private |
◆ _navMeshQuery
dtNavMeshQuery const* PathGenerator::_navMeshQuery |
|
private |
◆ _pathPoints
◆ _pathPolyRefs
◆ _pointPathLimit
uint32 PathGenerator::_pointPathLimit |
|
private |
◆ _polyLength
uint32 PathGenerator::_polyLength |
|
private |
◆ _source
◆ _startPosition
G3D::Vector3 PathGenerator::_startPosition |
|
private |
◆ _type
◆ _useRaycast
bool PathGenerator::_useRaycast |
|
private |
◆ _useStraightPath
bool PathGenerator::_useStraightPath |
|
private |
The documentation for this class was generated from the following files: