9 #ifndef Navigation_IPathFinderQuery_H
10 #define Navigation_IPathFinderQuery_H
23 class ScopedDisplayList;
29 PATHFINDER_DO_NOT_COMPUTE_CHANNELS,
30 PATHFINDER_DO_COMPUTE_CHANNELS,
36 class IPathFinderQuery :
public ITimeSlicedQuery
55 Path* GetPath()
const;
57 const Vec3f& GetStartPos()
const;
59 void SetNavigationProfileId(
KyUInt32 navigationProfileId);
60 KyUInt32 GetNavigationProfileId()
const;
75 void SetPath(Path* path);
76 void BindToDatabase(Database* database);
90 bool m_enableAdvancedVisualDebug;
93 KY_INLINE IPathFinderQuery::IPathFinderQuery()
96 , m_navigationProfileId(0)
97 , m_computeChannelMode(PATHFINDER_DO_NOT_COMPUTE_CHANNELS)
98 , m_dataBaseChangeIdx(0)
99 , m_enableAdvancedVisualDebug(false)
101 KY_INLINE
void IPathFinderQuery::BindToDatabase(
Database* database)
104 m_enableAdvancedVisualDebug =
false;
107 KY_INLINE
Path* IPathFinderQuery::GetPath()
const {
return m_path; }
108 KY_INLINE
const Vec3f& IPathFinderQuery::GetStartPos()
const {
return m_startPos3f; }
110 KY_INLINE
void IPathFinderQuery::SetNavigationProfileId(
KyUInt32 navigationProfileId) { m_navigationProfileId = navigationProfileId; }
111 KY_INLINE
KyUInt32 IPathFinderQuery::GetNavigationProfileId()
const {
return m_navigationProfileId; }
112 KY_INLINE
void IPathFinderQuery::SetPath(Path* path) {
m_path = path; }
116 class ScopedSetPathNavigationProfile
119 ScopedSetPathNavigationProfile(IPathFinderQuery* query) : m_query(query) {}
120 ~ScopedSetPathNavigationProfile()
123 m_query->
m_path->SetNavigationProfileId(m_query->GetNavigationProfileId());
125 IPathFinderQuery* m_query;
130 #endif //Navigation_IPathFinderQuery_H
ChannelComputerConfig m_channelComputerConfig
The parameter set specific to Channels computation.
Definition: ipathfinderquery.h:103
Base class for all pathfinder queries.
Definition: ipathfinderquery.h:38
#define KyFloat32MAXVAL
The maximum value that can be stored in the KyFloat32 variable type.
Definition: types.h:227
PathFinderQueryComputeChannelMode
This enum tells if the PathFinderQuery should compute Channels around path sections laying on the Nav...
Definition: ipathfinderquery.h:28
KyUInt32 m_dataBaseChangeIdx
Stores the revision of the Database when the Path has been computed.
Definition: ipathfinderquery.h:105
virtual void DisplayPropagationBounds(ScopedDisplayList &) const
Fill the displayList with display info that may help to understand a PathFinderFailure (mainly propag...
Definition: ipathfinderquery.h:82
Class that aggregates parameters that allow to configure the channel computation of a Bot...
Definition: channelcomputerconfig.h:76
#define KY_NULL
Null value.
Definition: types.h:247
The IPathFinderQuery ended prematurely due to changes into NavData.
Definition: ipathfinderquery.h:50
This class aggregates Channels along a Path.
Definition: channelarray.h:31
Ptr< Path > m_path
The Path found by the query.
Definition: ipathfinderquery.h:98
Vec3f m_startPos3f
The starting position for the Path request.
Definition: ipathfinderquery.h:97
PathFinderQueryComputeChannelMode m_computeChannelMode
The mode toggling Channels computation.
Definition: ipathfinderquery.h:102
The IPathFinderQuery has been completed but no Path has been found.
Definition: ipathfinderquery.h:49
The IPathFinderQuery has been completed and a Path has been found.
Definition: ipathfinderquery.h:48
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:64
virtual void GetPathFinderTextResult(String &) const
Fills the String with an explanation of the result. Use this to debug your pathfinder query...
Definition: ipathfinderquery.h:79
Definition: gamekitcrowddispersion.h:20
void BindToDatabase(Database *database)
Should be called by the derived class before Initializing the query It sets m_database to the provide...
Definition: iquery.h:364
PathFinderResult
Enumerates the possible status of a IPathFinderQuery.
Definition: ipathfinderquery.h:43
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
The IPathFinderQuery is initialized but has not been processed.
Definition: ipathfinderquery.h:46
The IPathFinderQuery is currently under process.
Definition: ipathfinderquery.h:47
The IPathFinderQuery is not yet initialized.
Definition: ipathfinderquery.h:45
The class representing a path.
Definition: path.h:42
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23
virtual const Vec3f * GetDestination() const =0
This function is virtual because not all the PathFinders have a preset destination, it may return KY_NULL.