Nebula
Loading...
Searching...
No Matches
navquery.h File Reference

Go to the source code of this file.

Classes

struct  NavigationFeature::QueryFilter
struct  NavigationFeature::NavPath

Namespaces

namespace  NavigationFeature
 Queries on a loaded navmesh.

Enumerations

enum class  NavigationFeature::PathStatus {
  NavigationFeature::Found , NavigationFeature::Partial , NavigationFeature::NoStart , NavigationFeature::NoEnd ,
  NavigationFeature::Failed
}

Functions

QueryFilter NavigationFeature::DefaultQueryFilter ()
 a filter with the area costs of the area table, every flag included
bool NavigationFeature::SetAreaCost (QueryFilter &filter, const Util::String &area, float cost)
 set the cost of an area by name, false if the area table has no such area
Math::vec3 NavigationFeature::SearchExtents (Navigation::NavMeshId navMesh)
 half the size of the box points are looked for in, from the agent kind of the navmesh
bool NavigationFeature::FindNearestPoint (Navigation::NavMeshId navMesh, const Math::point &position, const Math::vec3 &extents, Math::point &outPoint, const QueryFilter *filter=nullptr)
 the point on the surface closest to a position, within the extents around it. Returns false if there is none
NavPath NavigationFeature::FindPath (Navigation::NavMeshId navMesh, const Math::point &start, const Math::point &end, const QueryFilter *filter=nullptr)
 a path between two positions, which are moved to the closest surface within the search extents first
bool NavigationFeature::Raycast (Navigation::NavMeshId navMesh, const Math::point &start, const Math::point &end, Math::point &outHit, const QueryFilter *filter=nullptr)
 walk along the surface from start towards end. Returns true and the point where it is blocked if an edge of the navmesh is in the way
bool NavigationFeature::RandomPoint (Navigation::NavMeshId navMesh, Math::point &outPoint, const QueryFilter *filter=nullptr)
 a random point on the surface, every area of surface is as likely. Returns false if the navmesh has none the filter lets through
bool NavigationFeature::RandomPointAround (Navigation::NavMeshId navMesh, const Math::point &center, float radius, Math::point &outPoint, const QueryFilter *filter=nullptr)
 a random point on the surface which is connected to the center, on a polygon the circle touches, so it may be up to a polygon outside the radius. Returns false if there is none