9 #ifndef Navigation_BaseInsidePosFromOutsidePosQuery_H
10 #define Navigation_BaseInsidePosFromOutsidePosQuery_H
22 class BaseNearestBorderHalfEdgeFromPosQuery;
37 enum InsidePosFromOutsidePosQueryMode
39 INSIDEPOSFROMOUTSIDE_FROM_NEAREST_HALFEDGE,
40 INSIDEPOSFROMOUTSIDE_FROM_RAYCAST
47 static QueryType GetStaticType() {
return TypeInsidePosFromOutsidePos; }
48 virtual QueryType GetType()
const {
return TypeInsidePosFromOutsidePos; }
49 virtual void BuildQueryBlob(BaseBlobHandler* blobHandler);
50 virtual void InitFromQueryBlob(
World* world,
void* blob);
51 virtual Ptr<BaseBlobHandler> CreateQueryBlobHandler() {
return CreateStaticQueryBlobHandler(); }
52 static Ptr<BaseBlobHandler> CreateStaticQueryBlobHandler();
58 InsidePosFromOutsidePosQueryMode GetQueryMode()
const;
59 const Vec3f& GetInputPos()
const;
60 const Vec3f& GetInsidePos()
const;
61 const Vec2f& GetCastDirection()
const;
68 const PositionSpatializationRange& GetPositionSpatializationRange()
const;
74 void BindToDatabase(
Database* database);
78 void SetHorizontalTolerance(
KyFloat32 horizontalTolerance);
79 void SetPositionSpatializationRange(
const PositionSpatializationRange& positionSpatializationRange);
80 void SetDistFromObstacle(
KyFloat32 distFromObstacle);
84 KyResult ComputeInsidePosFromBordersAndPos(WorkingMemory* workingMemory,
const NavHalfEdgeRawPtr& prevBorderHalfEdgerawPtr,
101 InsidePosFromOutsidePosQueryMode m_queryMode;
102 Vec2f m_castDirection;
117 #endif //Navigation_BaseInsidePosFromOutsidePosQuery_H
Base class for InsidePosFromOutsidePosQuery.
Definition: baseinsideposfromoutsideposquery.h:44
InsidePosFromOutsidePosQueryResult
Enumerates the possible results of an InsidePosFromOutsidePosQuery.
Definition: baseinsideposfromoutsideposquery.h:26
Indicates that the query was completed successfully, and a valid position on the NavMesh was found wi...
Definition: baseinsideposfromoutsideposquery.h:34
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
Indicates the query has not yet been initialized.
Definition: baseinsideposfromoutsideposquery.h:28
Base class for all the queries that do not need to be time-sliced.
Definition: iquery.h:289
PositionSpatializationRange m_positionSpatializationRange
The Z extent from m_inputPos3f of the axis-aligned bounding box within which the search is performed...
Definition: baseinsideposfromoutsideposquery.h:101
KyFloat32 m_distFromObstacle
Specifies a preferred distance between the final chosen point and the border of the NavMesh...
Definition: baseinsideposfromoutsideposquery.h:106
Indicates that insufficient working memory caused the query to stop.
Definition: baseinsideposfromoutsideposquery.h:31
This class is a runtime container for Gameware Navigation WorldElements such as NavData, Bots, BoxObstacles, TagVolumes...
Definition: world.h:54
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
This class defines a two-dimensional vector whose coordinates are stored using floating-point numbers...
Definition: vec2f.h:24
Definition: gamekitcrowddispersion.h:20
NavTrianglePtr m_insidePosTrianglePtr
Updated during processing to store the NavMesh triangle that contains m_insidePos3f.
Definition: baseinsideposfromoutsideposquery.h:113
Indicates that the query has not yet been initialized.
Definition: iquery.h:346
Vec3f m_insidePos3f
Updated during processing to store the valid point found inside the NavMesh, if any.
Definition: baseinsideposfromoutsideposquery.h:111
Indicates the query has not yet been launched.
Definition: baseinsideposfromoutsideposquery.h:29
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
InsidePosFromOutsidePosQueryResult m_result
Updated during processing to indicate the result of the query.
Definition: baseinsideposfromoutsideposquery.h:115
Indicates that the query has not yet been launched.
Definition: iquery.h:347
KyFloat32 m_horizontalTolerance
The horizontal half-width (along both the X and Y axes) of the axis-aligned bounding box within which...
Definition: baseinsideposfromoutsideposquery.h:100
Indicates that a valid position was not found within the query's bounding box.
Definition: baseinsideposfromoutsideposquery.h:33
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
Each instance of this class uniquely identifies a singleNavHalfEdge in a NavFloor.
Definition: navhalfedgerawptr.h:34
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
Vec3f m_inputPos3f
The starting position for the query.
Definition: baseinsideposfromoutsideposquery.h:98