ezEngine Release 25.08
Loading...
Searching...
No Matches
ezAiNavmeshQuery Class Reference

Allows to do queries on a navmesh. More...

#include <NavMeshQuery.h>

Public Member Functions

ezAiNavMeshGetNavmesh () const
 
void SetNavmesh (ezAiNavMesh *pNavmesh)
 Sets on which navmesh to do the queries.
 
void SetQueryFilter (const dtQueryFilter &filter)
 Sets the filter to use on the navmesh to ignore certain areas.
 
bool PrepareQueryArea (const ezVec3 &vCenter, float fRadius)
 Checks that the given area of the navmesh is loaded, such that query results are useful.
 
bool Raycast (const ezVec3 &vStart, const ezVec3 &vDir, float fDistance, ezAiNavmeshRaycastHit &out_raycastHit)
 Does a raycast along the navmesh from the start position into a given direction.
 
bool FindRandomPointAroundCircle (const ezVec3 &vStart, float fRadius, ezRandom &ref_rng, ezVec3 &out_vPoint)
 Attempts to find a random point on the navmesh. The circle limits which navmesh polygons are visited.
 

Detailed Description

Allows to do queries on a navmesh.

Member Function Documentation

◆ FindRandomPointAroundCircle()

bool ezAiNavmeshQuery::FindRandomPointAroundCircle ( const ezVec3 vStart,
float  fRadius,
ezRandom ref_rng,
ezVec3 out_vPoint 
)

Attempts to find a random point on the navmesh. The circle limits which navmesh polygons are visited.

The result may be outside the circle, if the circle overlaps with a large navmesh polygon.

◆ PrepareQueryArea()

bool ezAiNavmeshQuery::PrepareQueryArea ( const ezVec3 vCenter,
float  fRadius 
)

Checks that the given area of the navmesh is loaded, such that query results are useful.

Returns false, if some navmesh sector is not yet available. It will be put into a queue and generated over the next frames.

◆ Raycast()

bool ezAiNavmeshQuery::Raycast ( const ezVec3 vStart,
const ezVec3 vDir,
float  fDistance,
ezAiNavmeshRaycastHit out_raycastHit 
)

Does a raycast along the navmesh from the start position into a given direction.

Returns true, if a navmesh edge has been hit and the result struct was filled with details.

◆ SetNavmesh()

void ezAiNavmeshQuery::SetNavmesh ( ezAiNavMesh pNavmesh)

Sets on which navmesh to do the queries.

See also
ezAiNavMeshWorldModule::GetNavMesh()

◆ SetQueryFilter()

void ezAiNavmeshQuery::SetQueryFilter ( const dtQueryFilter &  filter)

Sets the filter to use on the navmesh to ignore certain areas.

See also
ezAiNavMeshWorldModule::GetPathSearchFilter()

The documentation for this class was generated from the following files: