9 #ifndef Navigation_FindFirstVisiblePositionOnPathQuery_H
10 #define Navigation_FindFirstVisiblePositionOnPathQuery_H
25 template<
class TraverseLogic>
26 class FindFirstVisiblePositionOnPathQuery :
public BaseFindFirstVisiblePositionOnPathQuery
58 void SetSamplingDistance(
KyFloat32 samplingDistance);
68 virtual void Advance(WorkingMemory* workingMemory);
80 const Vec3f& GetVisibilityStartPoint()
const;
86 CandidateValidationResult ValidateCandidate(
94 class PositionOnPathWorkingMemArray
97 PositionOnPathWorkingMemArray() {}
101 m_array.Init(workingMemory);
103 if (m_array.IsInitialized() ==
false)
106 return m_array.SetMinimumCapacity(capacity);
109 KyResult PushBack(
const PositionOnPath& positionOnPath)
111 return m_array.PushBack(InternalPositionOnPath(positionOnPath));
114 void GetPositionOnPath(
KyUInt32 index, PositionOnPath& positionOnPath)
const
116 m_array[index].CopyToPositionOnPath(positionOnPath);
119 KyUInt32 GetCount()
const {
return m_array.GetCount(); }
122 class InternalPositionOnPath
125 InternalPositionOnPath(
const PositionOnPath& positionOnPath)
127 positionOnPath.GetRawValues(m_path, m_position, m_onPathStatus, m_currentIndexOnPath, m_distanceToEndOfPath);
130 void CopyToPositionOnPath(PositionOnPath& positionOnPath)
const
132 positionOnPath.SetRawValues(m_path, m_position, m_onPathStatus, m_currentIndexOnPath, m_distanceToEndOfPath);
142 WorkingMemArray<InternalPositionOnPath> m_array;
158 #endif // Navigation_FindFirstVisiblePositionOnPathQuery_H
FindFirstVisiblePositionOnPathQueryResult
Enumerates the possible results of a FindFirstVisiblePositionOnPathQuery.
Definition: basefindfirstvisiblepositiononpathquery.h:21
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
virtual void Advance(WorkingMemory *workingMemory)
This function is called by the QueryQueue to process one step on the query.
Definition: findfirstvisiblepositiononpathquery.inl:80
This class aggregates all necessary information about a position on a Path, namely: ...
Definition: positiononpath.h:33
void SetRayCanGoMarginMode(RayCanGoMarginMode rayCanGoMarginMode)
Sets the RayCanGoMarginMode value to be used in the ray can go queries.
Definition: findfirstvisiblepositiononpathquery.inl:43
PositionOnPathStatus
< enumerates="" the="" different="" status="" an="" objectpositiononpath="" can="" have="" on="" its="" path.="" />
Definition: positiononpath.h:20
#define KY_NULL
Null value.
Definition: types.h:247
void SetVisibilityStartTrianglePtr(const NavTrianglePtr &visibilityStartTrianglePtr)
Set The NavMesh triangle that corresponds to m_visibilityStartPos3f.
Definition: findfirstvisiblepositiononpathquery.inl:34
The RayCanGoQuery class tests whether or not a ray (with a width of 0) can pass along a straight line...
Definition: raycangoquery.h:24
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:64
RayCanGoMarginMode
Defines the different mode for the NavMesh border margin to be used in RayCanGo queries.
Definition: database.h:41
void PerformQuery(WorkingMemory *workingMemory=0)
Performs the query.
Definition: findfirstvisiblepositiononpathquery.inl:87
Definition: gamekitcrowddispersion.h:20
#define KY_ERROR
Shorthand for Kaim::Result::Failure.
Definition: types.h:272
ScopedDisplayList is used to push text, lines or shapes for rendering in the NavigationLab e...
Definition: displaylist.h:136
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Definition: navtriangleptr.h:22
unsigned int KyUInt32
Type used internally to represent an unsigned 32-bit integer.
Definition: types.h:36
The FindFirstVisiblePositionOnPathQuery class searches for a PositionOnPath that can be reached from ...
Definition: findfirstvisiblepositiononpathquery.h:27
void Initialize()
Should be called by the derived class before trying to perform the query or to push it in a QueryQueu...
Definition: iquery.h:372
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23
void BindToDatabase(Database *database)
Binds the query with the specified Database, clears all the inputs and outputs and sets all other par...
Definition: findfirstvisiblepositiononpathquery.inl:21