/* =========================================================================== IceTech GPL Source Code Copyright (C) 2026 Justin Marshall =========================================================================== */ #ifndef __RECAST_NAVMESH_H__ #define __RECAST_NAVMESH_H__ #include "../../../engine/tools/compilers/recast/RecastNavigation.h" class idRecastNavMesh { public: idRecastNavMesh( void ); ~idRecastNavMesh( void ); void Shutdown( void ); bool Load( const idStr &mapName, const idStr &fileName, unsigned int mapFileCRC ); bool IsLoaded( void ) const; const idStr & GetName( void ) const { return name; } int NumPolys( void ) const; const idAASSettings * GetSettings( void ) const; void Stats( void ) const; void DebugDraw( int drawMode ) const; int PointAreaNum( const idVec3 &origin ) const; int PointReachableAreaNum( const idVec3 &origin, const idBounds &searchBounds, const int areaFlags ) const; int BoundsReachableAreaNum( const idBounds &bounds, const int areaFlags ) const; void PushPointIntoAreaNum( int areaNum, idVec3 &origin ) const; idVec3 AreaCenter( int areaNum ) const; int AreaFlags( int areaNum ) const; int AreaTravelFlags( int areaNum ) const; bool Trace( aasTrace_t &trace, const idVec3 &start, const idVec3 &end ) const; bool SetAreaState( const idBounds &bounds, const int areaContents, bool disabled ); aasHandle_t AddObstacle( const idBounds &bounds ); void RemoveObstacle( const aasHandle_t handle ); void RemoveAllObstacles( void ); int TravelTimeToGoalArea( int areaNum, const idVec3 &origin, int goalAreaNum, int travelFlags ) const; bool RouteToGoalArea( int areaNum, const idVec3 origin, int goalAreaNum, int travelFlags, int &travelTime, idReachability **reach ) const; bool PathToGoal( aasPath_t &path, int areaNum, const idVec3 &origin, int goalAreaNum, const idVec3 &goalOrigin, int travelFlags ) const; bool PathValid( int areaNum, const idVec3 &origin, int goalAreaNum, const idVec3 &goalOrigin, int travelFlags, idVec3 &endPos, int &endAreaNum ) const; bool FindNearestGoal( const idNAV *owner, aasGoal_t &goal, int areaNum, const idVec3 origin, const idVec3 &target, int travelFlags, aasObstacle_t *obstacles, int numObstacles, idNAVCallback &callback ) const; void ShowPath( const idVec3 &origin, int goalAreaNum, const idVec3 &goalOrigin ) const; void ShowArea( const idVec3 &origin ) const; static bool BuildMapFile( const idStr &mapName, const idStr &aasType ); static idStr NavFileNameForMapName( const idStr &mapName ); private: bool HasManager( void ) const; private: idStr name; recastNavHandle_t handle; mutable idReachability syntheticReach; }; #endif /* !__RECAST_NAVMESH_H__ */