9 #ifndef Navigation_RayCast3dQuery_H
10 #define Navigation_RayCast3dQuery_H
36 class RayCastFull3dQuery :
public IAtomicQuery
39 static QueryType GetStaticType() {
return TypeRayCastFull3D; }
40 virtual QueryType GetType()
const {
return TypeRayCastFull3D; }
62 virtual void Advance(WorkingMemory* workingMemory)
81 RayCastData(
const Vec3f& startPos,
const Vec3f& destPos) : m_dir(destPos-startPos), m_dirInv(1.f, 1.f, 1.f)
83 m_dirIsNullOnAxis[0] =
false;
84 m_dirIsNullOnAxis[1] =
false;
85 m_dirIsNullOnAxis[2] =
false;
91 bool m_dirIsNullOnAxis[3];
94 void CollideAgainsttriangle(
const Vec3f& a,
const Vec3f& b,
const Vec3f& c,
KyFloat32& currentCollisionDistance);
95 void RayCast3DAgainstNavFloor(NavFloor* navFloor,
const RayCastData& rayCastData,
const CoordPos64& cellOrigin,
KyFloat32& currentCollisionDistance);
96 bool RayVersusBox3f(
const RayCastData& rayCastData,
const Box3f& box);
100 Vec3f m_collisionPoint3f;
113 #endif //Navigation_RayCast3dQuery_H
QueryProcessStatus m_processStatus
Modified by the query within Advance().
Definition: iquery.h:272
Box2LL CoordBox64
A type that represents a bounding box in the integer 2D grid.
Definition: navmeshtypes.h:20
RayCast in full 3d useful for implementing picking on NavMesh.
Definition: raycastfull3dquery.h:37
#define KY_NULL
Null value.
Definition: types.h:247
void BindToDatabase(Database *database)
Binds the query with the specified Database, clears all the inputs and outputs and sets all other par...
Indicates that the point provided is outside the navigable boundaries of the NavMesh.
Definition: raycastfull3dquery.h:30
RayCast3dQueryResult
Enumerates the possible results of a RayCast3dQuery.
Definition: raycastfull3dquery.h:25
QueryType
Enumerates all the type of query.
Definition: iquery.h:29
Indicates that the query was completed successfully; a triangle was found.
Definition: raycastfull3dquery.h:31
virtual void Advance(WorkingMemory *workingMemory)
This function is called by the QueryQueue to process one step on the query.
Definition: raycastfull3dquery.h:77
This class is a runtime container for all NavData that represents the world from the point of view of...
Definition: database.h:64
Vec2LL CoordPos64
A type that represents the position of a point within the 2D integer grid.
Definition: navmeshtypes.h:19
Definition: gamekitcrowddispersion.h:20
Indicates that the query has not yet been initialized.
Definition: iquery.h:346
NavTrianglePtr m_resultTrianglePtr
Updated during processing to store the nearest triangle found to #m_inputPos3f.
Definition: raycastfull3dquery.h:127
Indicates the query has not yet been initialized.
Definition: raycastfull3dquery.h:27
Indicates that the query has not yet been launched.
Definition: iquery.h:347
RayCast3dQueryResult m_result
Updated during processing to indicate the result of the query.
Definition: raycastfull3dquery.h:129
Indicates the query has not yet been launched.
Definition: raycastfull3dquery.h:28
void PerformQuery(WorkingMemory *workingMemory=0)
Performs the query.
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