9 #ifndef Navigation_TriangleFromPosQuery_H
10 #define Navigation_TriangleFromPosQuery_H
25 template <
class T>
class WorkingMemArray;
52 class TriangleFromPosQuery :
public IAtomicQuery
55 static QueryType GetStaticType() {
return TypeTriangleFromPos; }
56 virtual QueryType GetType()
const {
return TypeTriangleFromPos; }
57 virtual void BuildQueryBlob(BaseBlobHandler* blobHandler);
58 virtual void InitFromQueryBlob(
World* world,
void* blob);
59 virtual Ptr<BaseBlobHandler> CreateQueryBlobHandler() {
return CreateStaticQueryBlobHandler(); }
60 static Ptr<BaseBlobHandler> CreateStaticQueryBlobHandler();
93 virtual void Advance(WorkingMemory* workingMemory);
103 const Vec3f& GetInputPos()
const;
106 KyFloat32 GetAltitudeOfProjectionInTriangle()
const;
108 const PositionSpatializationRange& GetPositionSpatializationRange()
const;
113 void PerformQueryWithInputCoordPos(WorkingMemory* workingMemory);
117 void GetNearestTrianglePtrFromPos(WorkingMemory* workingMemory);
118 KyResult FilterNavFloorsFromAltitudeRange(WorkingMemArray<NavFloor*>& floorIndicesToTest,
ActiveCell& activeCell);
119 void ProcessFilteredNavFloors(
const WorkingMemArray<NavFloor*>& filteredMetaFloorIndices,
120 const Vec3f& pos3fInCell,
KyFloat32 multiplicatorValidyForQueryType);
152 #endif //Navigation_TriangleFromPosQuery_H
void SetPositionSpatializationRange(const PositionSpatializationRange &positionSpatializationRange)
Write accessor for m_positionSpatializationRange.
Definition: trianglefromposquery.inl:18
Indicates the query has not yet been initialized.
Definition: trianglefromposquery.h:31
TriangleFromPosQueryResult
Enumerates the possible results of a TriangleFromPosQuery.
Definition: trianglefromposquery.h:29
void BindToDatabase(Database *database)
Binds the query with the specified Database, clears all the inputs and outputs and sets all other par...
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
This class is a runtime wrapper of a NavFloorBlob, it gathers all the runtime information associated ...
Definition: navfloor.h:40
The NavFloorBlob contains a connected and not overlapping part of triangle mesh static data within a ...
Definition: navfloorblob.h:42
Indicates that insufficient working memory caused the query to stop.
Definition: trianglefromposquery.h:35
virtual void Advance(WorkingMemory *workingMemory)
This function is called by the QueryQueue to process one step on the query.
Definition: trianglefromposquery.inl:12
KyFloat32 m_altitudeInTriangle
Updated during processing to indicate the projected altitude of m_inputPos3f on the triangle stored i...
Definition: trianglefromposquery.h:171
Vec3f m_inputPos3f
The position on the (X,Y) plane used to retrieve the nearest triangle.
Definition: trianglefromposquery.h:157
This object gathers all the active NavFloors at a CellPos.
Definition: activecell.h:23
PositionSpatializationRange m_positionSpatializationRange
The altitude tolerance around m_inputPos3f that will be searched for triangles.
Definition: trianglefromposquery.h:159
TriangleFromPosQueryType m_queryType
An element from the TriangleFromPosQueryType enumeration that indicates whether to look for triangles...
Definition: trianglefromposquery.h:164
#define KY_NULL
Null value.
Definition: types.h:247
void PerformQuery(WorkingMemory *workingMemory=0)
Performs the query.
This class is a runtime container for Gameware Navigation WorldElements such as NavData, Bots, BoxObstacles, TagVolumes...
Definition: world.h:54
NavTrianglePtr m_resultTrianglePtr
Updated during processing to store the nearest triangle found to m_inputPos3f.
Definition: trianglefromposquery.h:168
QueryType
Enumerates all the type of query.
Definition: iquery.h:29
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:64
Definition: gamekitcrowddispersion.h:20
Indicates that the query has not yet been initialized.
Definition: iquery.h:346
Instructs the query to retrieve the first triangle above the point provided.
Definition: trianglefromposquery.h:45
TriangleFromPosQueryResult m_result
Updated during processing to indicate the result of the query.
Definition: trianglefromposquery.h:173
void SetQueryType(TriangleFromPosQueryType queryType)
Write accessor for m_queryType.
Definition: trianglefromposquery.inl:23
Instructs the query to retrieve the first triangle below the point provided.
Definition: trianglefromposquery.h:44
Utilities for dealing with NavData coordinates, which are expressed in a world space based on integer...
Definition: worldintegerpos.h:21
Each instance of this class uniquely identifies a single NavTriangle in a NavFloor.
Definition: navtriangleptr.h:22
Indicates that the query has not yet been launched.
Definition: iquery.h:347
The TriangleFromPosQuery class takes a position in the 3D space (m_inputPos3f), and finds the nearest...
Definition: trianglefromposquery.h:53
Indicates that the point provided is outside the navigable boundaries of the NavMesh.
Definition: trianglefromposquery.h:34
TriangleFromPosQueryType
Enumerates the possible ways a TriangleFromPosQuery can choose the triangle it retrieves.
Definition: trianglefromposquery.h:41
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
Indicates that the query was completed successfully; a triangle was found.
Definition: trianglefromposquery.h:37
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43
Indicates the query has not yet been launched.
Definition: trianglefromposquery.h:32
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23
Instructs the query to retrieve the nearest triangle to the point provided, regardless of whether it ...
Definition: trianglefromposquery.h:43