78 bool IsOnUpperBound()
const;
79 bool IsOnLowerBound()
const;
81 bool IsAtLastNodeOfPath()
const;
82 bool IsAtLastNodeOfAChannel()
const;
83 Path* GetPath()
const;
92 Vec2f m_checkPointDirection;
131 KyUInt32 GetPathEventIntervalCount()
const;
138 const PathEvent& GetFirstPathEvent()
const;
139 const PathEvent& GetLastPathEvent()
const;
163 const NavTag* GetNavTagOfEventInterval(
KyUInt32 intervalIdx)
const;
183 KY_INLINE
bool PathEvent::IsAtLastNodeOfPath()
const {
return m_positionOnPath.IsAtLastNodeOfPath(); }
184 KY_INLINE
bool PathEvent::IsAtLastNodeOfAChannel()
const {
return m_positionOnPath.IsAtLastNodeOfAChannel(); }
186 KY_INLINE Path* PathEvent::GetPath()
const {
return m_positionOnPath.GetPath(); }
188 KY_INLINE PathEventList::PathEventList() {}
189 KY_INLINE PathEventList::~PathEventList() { Clear(); }
191 KY_INLINE
void PathEventList::Clear() { m_pathEventIntervalArray.Clear(); }
193 KY_INLINE
KyUInt32 PathEventList::GetPathEventCount()
const {
return m_pathEventIntervalArray.GetCount(); }
195 KY_INLINE
KyUInt32 PathEventList::GetPathEventIntervalCount()
const
197 if (m_pathEventIntervalArray.GetCount() != 0)
198 return m_pathEventIntervalArray.GetCount() - 1;
205 KY_LOG_ERROR_IF(eventIdx >= GetPathEventCount(), (
"Input index is not a valid event index"));
206 KY_LOG_ERROR_IF(eventIdx == 0, (
"You cannot retrieve the index of the interval before the first event. It will return unused index"));
212 KY_LOG_ERROR_IF(eventIdx >= GetPathEventCount(), (
"Input index is not a valid event index"));
213 KY_LOG_ERROR_IF(eventIdx == GetPathEventCount() - 1, (
"You cannot retrieve the index of the interval after the last event. It will return unused index"));
226 KY_INLINE
const NavTag* PathEventList::GetNavTagOfEventInterval(
KyUInt32 intervalIdx)
const
228 KY_LOG_ERROR_IF(intervalIdx >= GetPathEventIntervalCount(), (
"Input index is not a valid interval index"));
229 return m_pathEventIntervalArray[intervalIdx + 1].m_navTagOnInterval.GetNavTag();
232 KY_INLINE
KyUInt32 PathEventList::GetStartPathEventIdxOfInterval(
KyUInt32 intervalIdx)
const
234 KY_LOG_ERROR_IF(intervalIdx >= GetPathEventIntervalCount(), (
"Input index is not a valid interval index"));
237 KY_INLINE
KyUInt32 PathEventList::GetEndPathEventIdxOfInterval(
KyUInt32 intervalIdx)
const
239 KY_LOG_ERROR_IF(intervalIdx >= GetPathEventIntervalCount(), (
"Input index is not a valid interval index"));
240 return intervalIdx + 1;
243 KY_INLINE
const PathEvent& PathEventList::GetStartPathEventOfInterval(
KyUInt32 intervalIdx)
const
245 KY_DEBUG_ASSERTN(intervalIdx < GetPathEventIntervalCount(), (
"Input index is not a valid interval index"));
246 return m_pathEventIntervalArray[intervalIdx].m_endingEventOnPath;
248 KY_INLINE
const PathEvent& PathEventList::GetEndPathEventOfInterval(
KyUInt32 intervalIdx)
const
250 KY_DEBUG_ASSERTN(intervalIdx < GetPathEventIntervalCount(), (
"Input index is not a valid interval index"));
251 return m_pathEventIntervalArray[intervalIdx + 1].m_endingEventOnPath;
254 KY_INLINE PathEvent& PathEventList::GetPathEvent(
KyUInt32 eventIdx)
256 KY_DEBUG_ASSERTN(eventIdx < GetPathEventCount(), (
"Input index is not a valid event index"));
257 return m_pathEventIntervalArray[eventIdx].m_endingEventOnPath;
260 KY_INLINE PathEvent& PathEventList::GetFirstPathEvent() {
return GetPathEvent(0); }
261 KY_INLINE PathEvent& PathEventList::GetLastPathEvent() {
return GetPathEvent(GetPathEventCount() - 1); }
263 KY_INLINE
const PathEvent& PathEventList::GetPathEvent(
KyUInt32 eventIdx)
const
265 KY_DEBUG_ASSERTN(eventIdx < GetPathEventCount(), (
"Input index is not a valid event index"));
266 return m_pathEventIntervalArray[eventIdx].m_endingEventOnPath;
269 KY_INLINE
const PathEvent& PathEventList::GetFirstPathEvent()
const {
return GetPathEvent(0); }
270 KY_INLINE
const PathEvent& PathEventList::GetLastPathEvent()
const {
return GetPathEvent(GetPathEventCount() - 1); }
event is not a user checkpoint
Definition: patheventlist.h:52
This class aggregates all necessary information about a position on a Path.
Definition: positiononpath.h:29
PathEventList aggregates all PathEvents and PathEventIntervals in a PathValidityInterval.
Definition: patheventlist.h:117
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
PathEvent is the PathValidityInterval upper bound.
Definition: patheventlist.h:44
PathValidityInterval bound specific: bound reached start or end of the path or the max distance of va...
Definition: patheventlist.h:31
void SetCheckPointStatus(CheckPointStatus checkPointStatus)
Allows to change the user checkpoint status of the PathEvent.
Definition: patheventlist.h:174
PathEvent is the PathValidityInterval temporary upper bound.
Definition: patheventlist.h:45
bool IsACheckPoint() const
returns true if it is a check point with or without direction
Definition: patheventlist.h:176
General purpose array for movable objects that require explicit construction/destruction.
Definition: kyarray.h:162
const NavTag * GetNavTagOnIntervalAfterEvent(KyUInt32 eventIdx) const
Returns a pointer to the NavTag lying under the interval starting at the event of index eventIdx...
Definition: patheventlist.h:221
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
CheckPointStatus
Defines whether the PathEvent is a check point or not.
Definition: patheventlist.h:50
Each instance of this class uniquely identifies a single NavFloor.
Definition: navtagptr.h:21
KyUInt32 GetIntervalIdxAfterEvent(KyUInt32 eventIdx) const
Return the index of interval starting at the event of index eventIdx.
Definition: patheventlist.h:210
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
The PathEvent is at a transition between the NavMesh and a PathEdge going from the NavMesh to outside...
Definition: patheventlist.h:26
The PathEvent is at a transition between different NavTags.
Definition: patheventlist.h:24
const Vec2f & GetCheckPointDirection() const
relevant only if IsACheckPointWithDirection() returns true
Definition: patheventlist.h:178
PathEvent is the PathValidityInterval lower bound.
Definition: patheventlist.h:43
The PathEvent is at a transition between the NavMesh and a PathEdge going from outside to the NavMesh...
Definition: patheventlist.h:25
2d vector using KyFloat32.
Definition: vec2f.h:18
KyUInt32 GetIntervalIdxBeforeEvent(KyUInt32 eventIdx) const
Return the index of interval ending at the event of index eventIdx.
Definition: patheventlist.h:203
A PathEvent is a particular PositionOnPath which feature is specified by a PathEventType.
Definition: patheventlist.h:59
This class represents an interval between two PathEvents within a PathEventList.
Definition: patheventlist.h:99
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
PathEventStatusInList
Defines the PathEvent status relative to its place in the PathEventList.
Definition: patheventlist.h:39
void SetCheckPointWithDirection(Vec2f direction)
Set CheckPointStatus_EventIsACheckPoint and assigned it a direction (Currently only used with Traject...
Definition: patheventlist.h:175
const NavTag * GetNavTagOnIntervalBeforeEvent(KyUInt32 eventIdx) const
Returns a pointer to the NavTag lying under interval ending at the event of index eventIdx...
Definition: patheventlist.h:217
The PathEvent is not yet defined.
Definition: patheventlist.h:22
static Vec2f Zero()
Returns {0.0f, 0.0f}.
Definition: vec2f.h:93
PathEvent neither lower bound nor upper bound.
Definition: patheventlist.h:42
event is a user checkpoint with no direction specified
Definition: patheventlist.h:53
The PathEvent is outside the NavMesh.
Definition: patheventlist.h:27
bool IsACheckPointWithDirection() const
returns true only if is a checkpoint with direction, i.e. it returns false if it is a checkpoint but ...
Definition: patheventlist.h:177
PathValidityInterval bound specific: bound hit a border or a non-traversable navTag boundary during v...
Definition: patheventlist.h:35
The PathEvent is on a NavGraph vertex.
Definition: patheventlist.h:23
PathEvent is not yet defined.
Definition: patheventlist.h:41
The class representing a path.
Definition: path.h:62
PathEventType
Defines the different kinds of PathEvent.
Definition: patheventlist.h:20