gwnavruntime/queries/utils/basediskcollisionquery.h Source File

basediskcollisionquery.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 // Primary contact: JUBA - secondary contact: NOBODY
8 #ifndef Navigation_BaseDiskCollisionQuery_H
9 #define Navigation_BaseDiskCollisionQuery_H
10 
11 
16 
17 namespace Kaim
18 {
19 
22 {
25 
31 
33 };
34 
37 {
38 public:
39  static QueryType GetStaticType() { return TypeDiskCollision; }
40  virtual QueryType GetType() const { return TypeDiskCollision; }
41  virtual void BuildQueryBlob(BaseBlobHandler* blobHandler);
42  virtual void InitFromQueryBlob(World* world, void* blob);
43  virtual Ptr<BaseBlobHandler> CreateQueryBlobHandler() { return CreateStaticQueryBlobHandler(); }
44  static Ptr<BaseBlobHandler> CreateStaticQueryBlobHandler();
45 
46 
47  // ---------------------------------- Main API Functions ----------------------------------
48 
49  DiskCollisionQueryResult GetResult() const;
50  const Vec3f& GetCenterPos() const;
51  const NavTrianglePtr& GetCenterTrianglePtr() const;
52  KyFloat32 GetRadius() const;
53  DynamicOutputMode GetDynamicOutputMode() const;
54  QueryDynamicOutput* GetQueryDynamicOutput() const;
55  const WorldIntegerPos& GetCenterIntegerPos() const;
56 
57  const PositionSpatializationRange& GetPositionSpatializationRange() const;
58 
59 protected:
62 
63  void BindToDatabase(Database* database);
64  void Initialize(const Vec3f& center, KyFloat32 radius);
65 
66  void SetCenterTrianglePtr(const NavTrianglePtr& centerTrianglePtr);
67  void SetPositionSpatializationRange(const PositionSpatializationRange& positionSpatializationRange);
68  void SetDynamicOutputMode(DynamicOutputMode savingMode);
69  void SetQueryDynamicOutput(QueryDynamicOutput* queryDynamicOutput);
70  void SetCenterIntegerPos(const WorldIntegerPos& centerIntegerPos);
71  void SetResult(DiskCollisionQueryResult result);
72 
73  DiskCollisionQueryResult ConvertTraversalResultToDiskCollisionResult(TraversalResult traversalRC);
74 
75 protected:
76  WorldIntegerPos m_centerIntegerPos;
77 
79 
82 
84 
86  PositionSpatializationRange m_positionSpatializationRange;
87 
89 
91 
98  Ptr<QueryDynamicOutput> m_queryDynamicOutput;
99 };
100 
101 }
102 
104 
105 #endif //Navigation_BaseDiskCollisionQuery_H
106 
Vec3f m_centerPos3f
The position of the center of the disk.
Definition: basediskcollisionquery.h:85
Indicates that an unknown error occurred during the query processing.
Definition: basediskcollisionquery.h:30
Indicates that the center point lies inside the NavMesh, but that the radius collides with a border o...
Definition: basediskcollisionquery.h:28
This class gather the data encountered along some query process.
Definition: querydynamicoutput.h:61
Ptr< QueryDynamicOutput > m_queryDynamicOutput
A ref-counted Ptr to a QueryDynamicOutput instance, used to store the data encountered during the que...
Definition: basediskcollisionquery.h:107
Base class for all the queries that do not need to be time-sliced.
Definition: iquery.h:289
Indicates that the center point lies outside the navigable area of the NavMesh.
Definition: basediskcollisionquery.h:26
Indicates that the disk fits inside the navigable area of the NavMesh.
Definition: basediskcollisionquery.h:32
Base class for DiskCollisionQuery.
Definition: basediskcollisionquery.h:36
This class is a runtime container for Gameware Navigation WorldElements such as NavData, Bots, BoxObstacles, TagVolumes...
Definition: world.h:54
DynamicOutputMode
Enumerates possible ways of storing crossed data from a query in a QueryDynamicOutput object...
Definition: querydynamicoutput.h:26
DiskCollisionQueryResult
Enumerates the possible results of a DiskCollisionQuery.
Definition: basediskcollisionquery.h:21
PositionSpatializationRange m_positionSpatializationRange
The altitude range around the position used when determining m_centerTrianglePtr from the m_centerPos...
Definition: basediskcollisionquery.h:93
NavTrianglePtr m_centerTrianglePtr
The NavMesh triangle that corresponds to m_centerPos3f. Can be set as an input, or retrieved as an ou...
Definition: basediskcollisionquery.h:88
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
Indicates that insufficient working memory caused the query to stop.
Definition: basediskcollisionquery.h:29
Definition: gamekitcrowddispersion.h:20
Indicates that the query has not yet been initialized.
Definition: iquery.h:346
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
DynamicOutputMode m_dynamicOutputMode
Specifies the type of data stored in m_queryDynamicOutput.
Definition: basediskcollisionquery.h:97
Indicates that the query has not yet been launched.
Definition: iquery.h:347
Indicates that the query has not yet been launched.
Definition: basediskcollisionquery.h:24
Indicates that the NavTag at the center point was forbidden.
Definition: basediskcollisionquery.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
KyFloat32 m_radius
The radius of the disk.
Definition: basediskcollisionquery.h:90
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
Indicates that the query has not yet been initialized.
Definition: basediskcollisionquery.h:23
DiskCollisionQueryResult m_result
Updated during processing to indicate the result of the query.
Definition: basediskcollisionquery.h:95