19 #ifndef _PATH_GENERATOR_H
20 #define _PATH_GENERATOR_H
32 #define MAX_PATH_LENGTH 74
33 #define MAX_POINT_PATH_LENGTH 74
35 #define SMOOTH_PATH_STEP_SIZE 4.0f
36 #define SMOOTH_PATH_SLOP 0.3f
39 #define INVALID_POLYREF 0
60 bool CalculatePath(
float destX,
float destY,
float destZ,
bool forceDest =
false,
bool straightLine =
false);
75 void ReducePathLenghtByDist(
float dist);
103 void NormalizePath();
113 bool InRangeYZX(
float const* v1,
float const* v2,
float r,
float h)
const;
116 dtPolyRef GetPolyByLocation(
float const* Point,
float* Distance)
const;
120 void BuildPointPath(
float const* startPoint,
float const* endPoint);
121 void BuildShortcut();
129 bool GetSteerTarget(
float const* startPos,
float const* endPos,
float minTargetDist,
dtPolyRef const* path,
uint32 pathSize,
float* steerPos,
130 unsigned char& steerPosFlag,
dtPolyRef& steerPosRef);
131 dtStatus FindSmoothPath(
float const* startPos,
float const* endPos,
133 float* smoothPath,
int* smoothPathSize,
uint32 smoothPathMaxSize);
uint32 _polyLength
Definition: PathGenerator.h:80
Definition: PathGenerator.h:45
uint64_d dtPolyRef
Definition: DetourNavMesh.h:49
PathType
Definition: PathGenerator.h:41
Definition: PathGenerator.h:47
Definition: PathGenerator.h:44
void SetActualEndPosition(G3D::Vector3 const &point)
Definition: PathGenerator.h:102
bool _straightLine
Definition: PathGenerator.h:88
G3D::Vector3 const & GetEndPosition() const
Definition: PathGenerator.h:68
G3D::Vector3 _startPosition
Definition: PathGenerator.h:90
dtNavMesh const * _navMesh
Definition: PathGenerator.h:95
void SetEndPosition(G3D::Vector3 const &point)
Definition: PathGenerator.h:101
G3D::Vector3 const & GetActualEndPosition() const
Definition: PathGenerator.h:69
arena_t NULL
Definition: jemalloc_internal.h:624
Unit const *const _sourceUnit
Definition: PathGenerator.h:94
G3D::Vector3 const & GetStartPosition() const
Definition: PathGenerator.h:67
NavTerrain
Definition: MapDefines.h:22
Definition: DetourNavMeshQuery.h:35
unsigned int dtStatus
Definition: DetourStatus.h:22
double distance(double x, double y)
Definition: g3dmath.h:731
Definition: DetourNavMesh.h:323
Definition: PathGenerator.h:43
G3D::int16 z
Definition: Vector3int16.h:46
std::vector< Vector3 > PointsArray
Definition: MoveSplineInitArgs.h:30
uint32_t uint32
Definition: Define.h:150
Movement::PointsArray _pathPoints
Definition: PathGenerator.h:82
Movement::PointsArray const & GetPath() const
Definition: PathGenerator.h:71
G3D::int16 y
Definition: Vector2int16.h:38
dtQueryFilter _filter
Definition: PathGenerator.h:98
void SetPathLengthLimit(float distance)
Definition: PathGenerator.h:64
Definition: PathGenerator.h:52
bool _forceDestination
Definition: PathGenerator.h:86
Definition: PathGenerator.h:46
bool _useStraightPath
Definition: PathGenerator.h:85
Definition: PathGenerator.h:49
void SetUseStraightPath(bool useStraightPath)
Definition: PathGenerator.h:63
Definition: PathGenerator.h:48
dtNavMeshQuery const * _navMeshQuery
Definition: PathGenerator.h:96
PathType _type
Definition: PathGenerator.h:83
#define TC_GAME_API
Definition: Define.h:134
void SetStartPosition(G3D::Vector3 const &point)
Definition: PathGenerator.h:100
uint32_t uint32
Definition: g3dmath.h:168
G3D::int16 x
Definition: Vector2int16.h:37
#define MAX_PATH_LENGTH
Definition: PathGenerator.h:32
Definition: DetourNavMeshQuery.h:153
G3D::Vector3 _actualEndPosition
Definition: PathGenerator.h:92
void Clear()
Definition: PathGenerator.h:105
PathType GetPathType() const
Definition: PathGenerator.h:73
#define SMOOTH_PATH_STEP_SIZE
Definition: PathGenerator.h:35
#define MAX_POINT_PATH_LENGTH
Definition: PathGenerator.h:33
uint32 _pointPathLimit
Definition: PathGenerator.h:87
G3D::Vector3 _endPosition
Definition: PathGenerator.h:91