### startTimer Source: https://recastnav.com/classrcContext.html Starts the specified performance timer. ```APIDOC ## startTimer() ### Description Starts the specified performance timer. ### Parameters - **label** (const rcTimerLabel) - The category of the timer. ``` -------------------------------- ### startTimer Source: https://recastnav.com/classBuildContext.html Starts the specified performance timer. ```APIDOC ## startTimer(label) ### Description Starts the specified performance timer. ### Method void ### Parameters - **label** (rcTimerLabel) - The label of the performance timer to start. ``` -------------------------------- ### doStartTimer Source: https://recastnav.com/classrcContext.html Starts the specified performance timer. This is an internal method. ```APIDOC ## doStartTimer() ### Description Starts the specified performance timer. ### Parameters - **label** (const rcTimerLabel) - in - The category of timer. ``` -------------------------------- ### doStartTimer Source: https://recastnav.com/classBuildContext.html Protected method to start the specified performance timer. ```APIDOC ## doStartTimer(label) ### Description Starts the specified performance timer. ### Method void ### Parameters - **label** (rcTimerLabel) - The category of timer. ### Overrides rcContext::doStartTimer ``` -------------------------------- ### Get Off-Mesh Connection Endpoints Source: https://recastnav.com/classdtNavMesh.html Retrieves the start and end points of an off-mesh connection, ordered by direction of travel. Requires the reference of the preceding polygon. ```cpp dtStatus dtNavMesh::getOffMeshConnectionPolyEndPoints(dtPolyRef _prevRef_, dtPolyRef _polyRef_, float * _startPos_, float * _endPos_) const ``` -------------------------------- ### init() Source: https://recastnav.com/classNavMeshTesterTool.html Initializes the tool with a sample. ```APIDOC ## init(Sample *newSample) ### Description Initializes the NavMeshTesterTool with a given Sample object. This method overrides the base SampleTool::init. ### Method void NavMeshTesterTool::init(Sample *newSample) ### Parameters #### Path Parameters - **newSample** (Sample *) - The sample object to initialize with. ``` -------------------------------- ### dtMergeCorridorStartMoved Source: https://recastnav.com/DetourPathCorridor_8h_source.html Merges the start of a corridor when the agent's starting position has moved. This function helps to update the path efficiently after a small movement of the start point. ```APIDOC ## dtMergeCorridorStartMoved ### Description Merges the start of a corridor when the agent's starting position has moved. ### Method int dtMergeCorridorStartMoved(dtPolyRef* path, const int npath, const int maxPath, const dtPolyRef* visited, const int nvisited) ### Parameters #### Path Parameters - **path** (dtPolyRef*) - The current path. - **npath** (const int) - The number of polygons in the current path. - **maxPath** (const int) - The maximum capacity of the path buffer. - **visited** (const dtPolyRef*) - An array of visited polygon references. - **nvisited** (const int) - The number of visited polygons. ``` -------------------------------- ### init() Source: https://recastnav.com/classOffMeshConnectionTool.html Initializes the tool with a sample. ```APIDOC ## init() ### Description Initializes the tool with a sample. ### Method void OffMeshConnectionTool::init(Sample * _sample) ### Parameters #### Path Parameters - **_sample** (Sample *) - Description not provided ``` -------------------------------- ### Functions Starting with 'w' Source: https://recastnav.com/functions_func_w.html This section details functions that start with the letter 'w'. ```APIDOC ## worldToScreen() ### Description Converts world coordinates to screen coordinates. ### Method (Not specified, likely a C++ member function) ### Endpoint (Not applicable) ### Parameters (Not specified) ### Request Example (Not applicable) ### Response #### Success Response (200) - **AppState** (Type) - Description of the return type (likely related to application state). ### Response Example (Not specified) ``` ```APIDOC ## write() ### Description Writes data to a file or stream. ### Method (Not specified, likely a C++ member function) ### Endpoint (Not applicable) ### Parameters (Not specified) ### Request Example (Not applicable) ### Response #### Success Response (200) - (No specific return type or description provided, likely void or a status indicator). ### Response Example (Not specified) ``` -------------------------------- ### BuildSettings, Sample Source: https://recastnav.com/functions.html Build settings and sample parameters. ```APIDOC ## agentHeight ### Description The height of the agent. ### Type float ``` ```APIDOC ## agentMaxClimb ### Description The maximum climb height for the agent. ### Type float ``` ```APIDOC ## agentMaxSlope ### Description The maximum slope the agent can climb. ### Type float ``` ```APIDOC ## agentRadius ### Description The radius of the agent. ### Type float ``` -------------------------------- ### Functions starting with 'm' Source: https://recastnav.com/functions_func_m.html This section details functions in Recast Navigation that start with the letter 'm'. ```APIDOC ## maxCompressedSize() ### Description Calculates the maximum compressed size for tile cache compression. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters None explicitly documented. ### Request Example N/A ### Response N/A ## modify() ### Description Modifies an existing node queue. Specifics of modification are not detailed. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters - **dtNodeQueue** (object) - Description not provided. ### Request Example N/A ### Response N/A ## moveAlongSurface() ### Description Moves a position along the navigation mesh surface. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters - **dtNavMeshQuery** (object) - Description not provided. ### Request Example N/A ### Response N/A ## moveOverOffmeshConnection() ### Description Handles movement over an off-mesh connection within the navigation mesh. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters - **dtPathCorridor** (object) - Description not provided. ### Request Example N/A ### Response N/A ## movePosition() ### Description Moves a position within the path corridor. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters - **dtPathCorridor** (object) - Description not provided. ### Request Example N/A ### Response N/A ## moveTargetPosition() ### Description Moves the target position within the path corridor. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters - **dtPathCorridor** (object) - Description not provided. ### Request Example N/A ### Response N/A ``` -------------------------------- ### TempObstacleHighlightTool::init() Source: https://recastnav.com/classTempObstacleHighlightTool.html Initializes the tool with a sample. ```APIDOC ## init() ### Description Initializes the tool with a given sample. This method overrides the base class method. ### Method void init(Sample *sample) ### Parameters - **sample** (Sample *) - Required - A pointer to the Sample object to initialize with. ### Returns None ``` -------------------------------- ### dtPathQueue::request Source: https://recastnav.com/DetourPathQueue_8h_source.html Requests a path between a start and end polygon, with specified start and end positions and a query filter. ```APIDOC ## dtPathQueue::request ### Description Requests a path between a start and end polygon, with specified start and end positions and a query filter. Returns a unique handle for the request. ### Signature ```cpp dtPathQueueRef request(dtPolyRef startRef, dtPolyRef endRef, const float* startPos, const float* endPos, const dtQueryFilter* filter); ``` ### Parameters - **startRef** (dtPolyRef) - The reference to the starting polygon. - **endRef** (dtPolyRef) - The reference to the ending polygon. - **startPos** (const float*) - The start position in 3D space (array of 3 floats). - **endPos** (const float*) - The end position in 3D space (array of 3 floats). - **filter** (const dtQueryFilter*) - A pointer to the query filter to use for pathfinding. ### Returns - **dtPathQueueRef**: A unique handle to the path request. Returns DT_PATHQ_INVALID if the request fails. ``` -------------------------------- ### InputGeom::getBuildSettings Source: https://recastnav.com/InputGeom_8h_source.html Returns a pointer to the build settings if they exist, otherwise returns nullptr. ```APIDOC ## InputGeom::getBuildSettings ### Description Returns a pointer to the build settings if they exist, otherwise returns nullptr. ### Method const BuildSettings* getBuildSettings() const ``` -------------------------------- ### init Source: https://recastnav.com/classdtPathQueue-members.html Initializes the path queue with specified capacities and a navigation mesh. ```APIDOC ## init(const int maxPathSize, const int maxSearchNodeCount, dtNavMesh *nav) ### Description Initializes the path queue with the maximum path size, maximum search node count, and a pointer to the navigation mesh. ### Method `init` ### Parameters - **maxPathSize** (const int) - The maximum number of polygons allowed in a path. - **maxSearchNodeCount** (const int) - The maximum number of nodes to consider during the search. - **nav** (dtNavMesh *) - A pointer to the navigation mesh to be used. ``` -------------------------------- ### dtMergeCorridorStartShortcut Source: https://recastnav.com/DetourPathCorridor_8h_source.html Merges the start of a corridor by applying a shortcut. This can be used to shorten the path if a direct route becomes available from the start. ```APIDOC ## dtMergeCorridorStartShortcut ### Description Merges the start of a corridor by applying a shortcut. ### Method int dtMergeCorridorStartShortcut(dtPolyRef* path, const int npath, const int maxPath, const dtPolyRef* visited, const int nvisited) ### Parameters #### Path Parameters - **path** (dtPolyRef*) - The current path. - **npath** (const int) - The number of polygons in the current path. - **maxPath** (const int) - The maximum capacity of the path buffer. - **visited** (const dtPolyRef*) - An array of visited polygon references. - **nvisited** (const int) - The number of visited polygons. ``` -------------------------------- ### Get Performance Time in Microseconds Source: https://recastnav.com/PerfTimer_8cpp.html Converts a TimeVal duration into microseconds. Use this to get precise elapsed time measurements. ```cpp int getPerfTimeUsec (const TimeVal duration) ``` -------------------------------- ### NavMeshTesterTool Constructor Source: https://recastnav.com/classNavMeshTesterTool.html Initializes a new instance of the NavMeshTesterTool. ```APIDOC ## NavMeshTesterTool() ### Description Constructs a new NavMeshTesterTool object. ### Method NavMeshTesterTool::NavMeshTesterTool() ``` -------------------------------- ### dtMergeCorridorStartMoved Source: https://recastnav.com/DetourPathCorridor_8h.html Merges the start of a path corridor when the agent's start position has moved. This function is useful for dynamically adjusting the path as the agent moves. ```APIDOC ## dtMergeCorridorStartMoved() ### Description Merges the start of a path corridor when the agent's start position has moved. ### Parameters - **_path** (dtPolyRef *) - Pointer to the path array. - **_npath** (int) - The current number of polygons in the path. - **_maxPath** (int) - The maximum allowed number of polygons in the path. - **_visited** (const dtPolyRef *) - Pointer to an array of visited polygons. - **_nvisited** (int) - The number of visited polygons. ### Returns - (int) The new number of polygons in the path. ``` -------------------------------- ### CrowdTool::init Source: https://recastnav.com/classCrowdTool.html Initializes the CrowdTool with a given sample. ```APIDOC ## CrowdTool::init ### Description Initializes the CrowdTool with a given sample. ### Method void ### Parameters * **_sample** (Sample *) - The sample to initialize with. ### Response None ### Example ```cpp Sample* mySample = ...; CrowdTool::init(mySample); ``` ``` -------------------------------- ### Get Base Polygon Reference for Tile Source: https://recastnav.com/classdtNavMesh.html Gets the polygon reference for the base polygon within a specified tile. Useful for iterating through polygons in a tile. ```cpp dtPolyRef dtNavMesh::getPolyRefBase(const dtMeshTile * _tile_) const ``` -------------------------------- ### begin Source: https://recastnav.com/classDebugDrawGL.html Begins drawing primitives of a specified type and size. This function should be called before submitting vertices. ```APIDOC ## begin() ### Description Begin drawing primitives. ### Parameters - **prim** (duDebugDrawPrimitives) - The primitive type to draw (e.g., points, lines, triangles). - **size** (float) - The size of the primitive, applicable to point size and line width. Defaults to 1.0f. ### Method void ``` -------------------------------- ### dtMergeCorridorEndMoved Source: https://recastnav.com/DetourPathCorridor_8cpp.html Merges the end of a path corridor when the start point has moved. This function helps to adjust the path to a new starting position while maintaining corridor integrity. ```APIDOC ## dtMergeCorridorEndMoved() ### Description Merges the end of a path corridor when the start point has moved. ### Parameters - **_path_** (dtPolyRef *) - The path corridor to modify. - **_npath_** (int) - The current number of polygons in the path. - **_maxPath_** (int) - The maximum allowed number of polygons in the path. - **_visited_** (const dtPolyRef *) - An array of visited polygons. - **_nvisited_** (int) - The number of visited polygons. ### Returns (int) - The new number of polygons in the path after merging. ``` -------------------------------- ### init Source: https://recastnav.com/classdtTileCache.html Initializes the tile cache with parameters and components. ```APIDOC ## init() ### Description Initializes the tile cache with parameters and components. ### Method Signature `dtStatus dtTileCache::init(const dtTileCacheParams* _params_, struct dtTileCacheAlloc* _talloc_, struct dtTileCacheCompressor* _tcomp_, struct dtTileCacheMeshProcess* _tmproc_)` ``` -------------------------------- ### SampleTool::init Source: https://recastnav.com/structSampleTool.html Initializes the SampleTool with a Sample object. This is a pure virtual function. ```APIDOC ## init() ### Description Initializes the SampleTool with a Sample object. ### Method virtual void init (Sample *sample)=0 ### Parameters * **sample** (Sample *) - A pointer to the Sample object to initialize with. ### Remarks This is a pure virtual function. ``` -------------------------------- ### getTarget Source: https://recastnav.com/classdtPathCorridor-members.html Gets the target position. ```APIDOC ## getTarget() const ### Description Gets the target position. ### Method Public Function ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **const float*** - Pointer to the target position. #### Response Example N/A ``` -------------------------------- ### getPos Source: https://recastnav.com/classdtPathCorridor-members.html Gets the current position. ```APIDOC ## getPos() const ### Description Gets the current position. ### Method Public Function ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **const float*** - Pointer to the current position. #### Response Example N/A ``` -------------------------------- ### init Source: https://recastnav.com/classNavmeshFlags-members.html Initializes the NavmeshFlags with a new navigation mesh. ```APIDOC ## init(const dtNavMesh *newNavmesh) ### Description Initializes the NavmeshFlags with a new navigation mesh. ### Method NavmeshFlags ### Parameters - **newNavmesh** (const dtNavMesh *) - Pointer to the new navigation mesh. ### Response None ``` -------------------------------- ### begin Source: https://recastnav.com/classSampleDebugDraw.html Begins the drawing of a primitive shape with an optional size. ```APIDOC ## begin() ### Description Begins drawing primitives. ### Signature `void begin(duDebugDrawPrimitives prim, float size = 1.0f)` ### Parameters * **prim** (duDebugDrawPrimitives) - The type of primitive to draw (e.g., lines, triangles). * **size** (float, optional) - The size of the primitives. Defaults to 1.0f. ``` -------------------------------- ### getPath Source: https://recastnav.com/classdtPathCorridor-members.html Gets the current path. ```APIDOC ## getPath() const ### Description Gets the current path. ### Method Public Function ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **dtPolyRef*** - Pointer to the path polygons. #### Response Example N/A ``` -------------------------------- ### SampleToolState::init Source: https://recastnav.com/structSampleToolState.html Initializes the tool state with a pointer to the Sample object. This is a pure virtual function. ```APIDOC ## SampleToolState::init() ### Description Initializes the tool state with a pointer to the Sample object. ### Method `void init(Sample *sample)` ### Parameters #### Path Parameters - **sample** (Sample *) - Required - A pointer to the Sample object. ``` -------------------------------- ### startTimer Source: https://recastnav.com/classrcContext-members.html Starts a timer with the specified label. ```APIDOC ## startTimer(const rcTimerLabel label) ### Description Starts a timer with the specified label. ### Signature startTimer(const rcTimerLabel label) ``` -------------------------------- ### initToolStates Source: https://recastnav.com/classSample.html Initializes the states of the tools. ```APIDOC ## initToolStates ### Description Initializes the states of the tools. ### Method void initToolStates (Sample *sample) const ### Parameters #### Path Parameters - **sample** (Sample *) - Description of the sample parameter ``` -------------------------------- ### init Source: https://recastnav.com/classdtPathCorridor-members.html Initializes the path corridor with a maximum path length. ```APIDOC ## init(const int maxPath) ### Description Initializes the path corridor with a maximum path length. ### Method Public Function ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### MeshProcess::init Source: https://recastnav.com/structMeshProcess.html Initializes the MeshProcess with the provided InputGeom. ```APIDOC ## MeshProcess::init ### Description Initializes the MeshProcess with the provided InputGeom. ### Signature `void init(InputGeom *geom)` ### Parameters * `geom` (InputGeom *) - A pointer to the InputGeom object to be used for initialization. ``` -------------------------------- ### getTileCount Source: https://recastnav.com/classdtTileCache.html Gets the number of tiles in the cache. ```APIDOC ## getTileCount() ### Description Gets the number of tiles in the cache. ### Method Signature `int dtTileCache::getTileCount() const` ``` -------------------------------- ### init Source: https://recastnav.com/classdtNavMeshQuery-members.html Initializes the navigation mesh query object. ```APIDOC ## init ### Description Initializes the navigation mesh query object. ### Method Signature void init(const dtNavMesh *nav, const int maxNodes) ``` -------------------------------- ### getObstacleCount Source: https://recastnav.com/classdtTileCache.html Gets the number of obstacles in the cache. ```APIDOC ## getObstacleCount() ### Description Gets the number of obstacles in the cache. ### Method Signature `int dtTileCache::getObstacleCount() const` ``` -------------------------------- ### Sample_TileMesh Class Methods Source: https://recastnav.com/classSample__TileMesh-members.html This section details the methods available in the Sample_TileMesh class, including overridden virtual functions and constructors/destructors. ```APIDOC ## build() ### Description Builds the navigation mesh for the Sample_TileMesh. ### Method override ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## buildAllTiles() ### Description Builds all tiles for the navigation mesh. ### Method None ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## buildTile(const float *pos) ### Description Builds a single tile at the specified position. ### Method None ### Endpoint N/A ### Parameters - **pos** (const float *) - The position to build the tile at. ### Request Example N/A ### Response N/A ``` ```APIDOC ## collectSettings(BuildSettings &settings) ### Description Collects the build settings from the Sample_TileMesh. ### Method override virtual ### Endpoint N/A ### Parameters - **settings** (BuildSettings &) - The BuildSettings object to populate. ### Request Example N/A ### Response N/A ``` ```APIDOC ## drawDebugUI() ### Description Draws the debug user interface for the Sample_TileMesh. ### Method override virtual ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## drawSettingsUI() ### Description Draws the settings user interface for the Sample_TileMesh. ### Method override virtual ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## drawToolsUI() ### Description Draws the tools user interface for the Sample_TileMesh. ### Method override virtual ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## getTilePos(const float *pos, int &outTileX, int &outTileY) const ### Description Gets the tile coordinates for a given position. ### Method const ### Endpoint N/A ### Parameters - **pos** (const float *) - The input position. - **outTileX** (int &) - Output parameter for the tile X coordinate. - **outTileY** (int &) - Output parameter for the tile Y coordinate. ### Request Example N/A ### Response N/A ``` ```APIDOC ## onMeshChanged(InputGeom *geom) ### Description Called when the input geometry has changed. ### Method override virtual ### Endpoint N/A ### Parameters - **geom** (InputGeom *) - Pointer to the input geometry. ### Request Example N/A ### Response N/A ``` ```APIDOC ## operator=(const Sample_TileMesh &)=delete ### Description Deleted copy assignment operator. ### Method None ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## operator=(const Sample_TileMesh &&)=delete ### Description Deleted move assignment operator. ### Method None ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## removeAllTiles() const ### Description Removes all tiles from the navigation mesh. ### Method const ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## removeTile(const float *pos) ### Description Removes a tile at the specified position. ### Method None ### Endpoint N/A ### Parameters - **pos** (const float *) - The position of the tile to remove. ### Request Example N/A ### Response N/A ``` ```APIDOC ## render() ### Description Renders the navigation mesh. ### Method override virtual ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## renderOverlay() ### Description Renders an overlay on the navigation mesh. ### Method override virtual ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## Sample_TileMesh() ### Description Constructor for Sample_TileMesh. ### Method None ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## Sample_TileMesh(const Sample_TileMesh &)=delete ### Description Deleted copy constructor. ### Method None ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## Sample_TileMesh(const Sample_TileMesh &&)=delete ### Description Deleted move constructor. ### Method None ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` ```APIDOC ## ~Sample_TileMesh() override ### Description Destructor for Sample_TileMesh. ### Method override virtual ### Endpoint N/A ### Parameters None ### Request Example N/A ### Response N/A ``` -------------------------------- ### getPathCount Source: https://recastnav.com/classdtPathCorridor-members.html Gets the number of polygons in the path. ```APIDOC ## getPathCount() const ### Description Gets the number of polygons in the path. ### Method Public Function ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **int** - The number of polygons in the path. #### Response Example N/A ``` -------------------------------- ### init (params) Source: https://recastnav.com/classdtNavMesh.html Initializes the navigation mesh for tiled usage with the provided navigation mesh parameters. ```APIDOC ## init() [1/2] dtStatus dtNavMesh::init( const dtNavMeshParams * _params ) ### Description Initializes the navigation mesh for tiled use. ### Parameters - **params** (const dtNavMeshParams *) - Input - Initialization parameters. ### Returns The status flags for the operation. ``` -------------------------------- ### getFilter Source: https://recastnav.com/classdtCrowd.html Gets the filter used by the crowd. ```APIDOC ## getFilter() ### Description Gets the filter used by the crowd. ### Returns - const dtQueryFilter * - The filter used by the crowd. ``` -------------------------------- ### getBuildSettings Source: https://recastnav.com/functions_func_g.html Retrieves the build settings. Associated with InputGeom. ```APIDOC ## getBuildSettings() ### Description Retrieves the settings used for building the navigation mesh. ### Method GET (assumed) ### Endpoint /g/getBuildSettings ### Returns - InputGeom: The input geometry object containing build settings. ``` -------------------------------- ### getLastPoly Source: https://recastnav.com/classdtPathCorridor-members.html Gets the last polygon in the path. ```APIDOC ## getLastPoly() const ### Description Gets the last polygon in the path. ### Method Public Function ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **dtPolyRef** - The reference to the last polygon. #### Response Example N/A ``` -------------------------------- ### getEditableFilter Source: https://recastnav.com/classdtCrowd.html Gets the filter used by the crowd. ```APIDOC ## getEditableFilter() ### Description Gets the filter used by the crowd. ### Returns - dtQueryFilter * - The filter used by the crowd. ``` -------------------------------- ### init(int maxPath) Source: https://recastnav.com/classdtPathCorridor.html Initializes the corridor by allocating its path buffer. This method can only be called once. ```APIDOC ## init(int maxPath) ### Description Allocates the corridor's path buffer to handle a specified maximum path size. ### Parameters - **maxPath** (int) - The maximum path size the corridor can handle. ### Returns - **bool**: True if the initialization succeeded, false otherwise. ### Warning This method cannot be called more than once. ``` -------------------------------- ### Define Sample Partition Types Source: https://recastnav.com/Sample_8h_source.html Enumerates different methods for partitioning the navigation mesh. Choose a partition type based on the desired mesh generation characteristics. ```cpp enum class SamplePartitionType : uint8_t { WATERSHED, MONOTONE, LAYERS }; ``` -------------------------------- ### getFirstPoly Source: https://recastnav.com/classdtPathCorridor-members.html Gets the first polygon in the path. ```APIDOC ## getFirstPoly() const ### Description Gets the first polygon in the path. ### Method Public Function ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) - **dtPolyRef** - The reference to the first polygon. #### Response Example N/A ``` -------------------------------- ### NavMeshTileBuildContext Constructor Source: https://recastnav.com/structNavMeshTileBuildContext.html Initializes a new instance of the NavMeshTileBuildContext struct. ```APIDOC ## NavMeshTileBuildContext() ### Description Constructs a NavMeshTileBuildContext object. ### Parameters * **_a** (struct dtTileCacheAlloc *) - Pointer to a dtTileCacheAlloc structure. ``` -------------------------------- ### nearestRef Source: https://recastnav.com/classdtFindNearestPolyQuery.html Gets the reference to the nearest polygon. ```APIDOC ## nearestRef() ### Description Gets the reference to the nearest polygon. ### Returns - dtPolyRef - The reference ID of the nearest polygon. ``` -------------------------------- ### SampleTool::onClick Source: https://recastnav.com/structSampleTool.html Handles a click event, providing ray start and hit positions. This is a pure virtual function. ```APIDOC ## onClick() ### Description Handles a click event, providing ray start and hit positions. ### Method virtual void onClick (const float *rayStartPos, const float *rayHitPos, bool shift)=0 ### Parameters * **rayStartPos** (const float *) - The starting position of the ray. * **rayHitPos** (const float *) - The position where the ray hit. * **shift** (bool) - Indicates if the shift key was pressed. ### Remarks This is a pure virtual function. ``` -------------------------------- ### rcGetDirForOffset Source: https://recastnav.com/Recast_8h.html Gets the direction for the specified offset. ```APIDOC ## rcGetDirForOffset ### Description Gets the direction for the specified offset. ### Signature `int rcGetDirForOffset(int offsetX, int offsetZ)` ``` -------------------------------- ### getDirOffsetY Source: https://recastnav.com/DetourTileCacheBuilder_8cpp.html Gets the y-offset for a given direction. ```APIDOC ## getDirOffsetY() Gets the y-offset for a given direction. ### Parameters - `_dir_` (int) - The direction index. ### Returns int - The y-offset. ``` -------------------------------- ### initToolStates() Source: https://recastnav.com/functions_func_i.html Initializes the states for various tools within the Recast Navigation system. ```APIDOC ## initToolStates() ### Description Initializes the states for various tools within the Recast Navigation system. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Associated Classes Sample ``` -------------------------------- ### duDebugDraw::begin Source: https://recastnav.com/structduDebugDraw.html Begins drawing a set of primitives. ```APIDOC ## begin ### Description Begins drawing primitives. ### Method `virtual void begin(duDebugDrawPrimitives prim, float size = 1.0f)` ### Parameters * **prim** (duDebugDrawPrimitives) - Required - The type of primitive to draw. * **size** (float) - Optional - The size of the primitive (e.g., point size, line width). Defaults to 1.0f. ``` -------------------------------- ### getDirOffsetX Source: https://recastnav.com/DetourTileCacheBuilder_8cpp.html Gets the x-offset for a given direction. ```APIDOC ## getDirOffsetX() Gets the x-offset for a given direction. ### Parameters - `_dir_` (int) - The direction index. ### Returns int - The x-offset. ``` -------------------------------- ### singleStep() Source: https://recastnav.com/classSample.html Advances the sample simulation by a single step. ```APIDOC ## singleStep() ### Description Executes a single simulation step for the sample. ### Signature `void Sample::singleStep() virtual` ``` -------------------------------- ### fixPathStart Source: https://recastnav.com/functions_func_f.html Fixes the starting point of a path in dtPathCorridor. ```APIDOC ## fixPathStart() ### Description Fixes the starting point of a path. ### Method Function ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### loadAll Source: https://recastnav.com/classSample__TempObstacles-members.html Loads all temporary obstacles from a file. ```APIDOC ## loadAll(const char *path) ### Description Loads all temporary obstacles from a file. ### Parameters #### Path Parameters - **path** (const char *) - Required - The path to the file to load obstacles from. ### Response #### Success Response (200) - **void** - No return value specified. ``` -------------------------------- ### walkContour Source: https://recastnav.com/RecastContour_8cpp.html Walks a contour starting from a given point. ```APIDOC ## walkContour() ### Description Walks a contour starting from coordinates `(_x_, _y_)` at index `_i_` within the compact heightfield `_chf_`. It populates the `_flags_` and stores the contour points in `_points_`. ### Signature `static void walkContour(int _x_, int _y_, int _i_, const rcCompactHeightfield & _chf_, unsigned char * _flags_, rcTempVector< int > & _points_) ` ``` -------------------------------- ### init() Source: https://recastnav.com/functions_func_i.html Initializes various components and tools within the Recast Navigation system. This function is used across multiple classes including ConvexVolumeTool, CrowdTool, dtCrowd, dtNavMesh, and more. ```APIDOC ## init() ### Description Initializes various components and tools within the Recast Navigation system. ### Method N/A (Function Signature) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Associated Classes ConvexVolumeTool, CrowdTool, CrowdToolState, dtCrowd, dtNavMesh, dtNavMeshQuery, dtObstacleAvoidanceDebugData, dtObstacleAvoidanceQuery, dtPathCorridor, dtPathQueue, dtProximityGrid, dtTileCache, MeshProcess, NavmeshFlags, NavMeshPruneTool, NavMeshTesterTool, NavMeshTileTool, OffMeshConnectionTool, SampleTool, SampleToolState, TempObstacleCreateTool, TempObstacleHighlightTool ``` -------------------------------- ### dtObstacleSegment::p Source: https://recastnav.com/DetourObstacleAvoidance_8h_source.html The start point of the obstacle segment. ```APIDOC ## dtObstacleSegment::p ### Description Start point of the obstacle segment. ### Type float[3] ``` -------------------------------- ### NavMeshTileBuildContext() Source: https://recastnav.com/functions_func_n.html Constructor for the NavMeshTileBuildContext class. ```APIDOC ## NavMeshTileBuildContext() ### Description Constructor for the NavMeshTileBuildContext class. ### Method Constructor ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### Mesh::getTriCount Source: https://recastnav.com/structMesh.html Gets the number of triangles in the mesh. ```APIDOC ## ◆ getTriCount() ### Description Gets the number of triangles in the mesh. ### Signature int Mesh::getTriCount () const ### Remarks This is an inline function. ``` -------------------------------- ### Mesh::getVertCount Source: https://recastnav.com/structMesh.html Gets the number of vertices in the mesh. ```APIDOC ## ◆ getVertCount() ### Description Gets the number of vertices in the mesh. ### Signature int Mesh::getVertCount () const ### Remarks This is an inline function. ``` -------------------------------- ### begin Source: https://recastnav.com/RecastAlloc_8h_source.html Returns an iterator to the beginning of the vector. ```APIDOC ## T* begin() ## const T* begin() const ### Description Returns a pointer to the first element of the vector. ``` -------------------------------- ### Initialization and Tile Management Source: https://recastnav.com/classdtNavMesh.html Functions for initializing the navigation mesh and managing its tiles. ```APIDOC ## init (const dtNavMeshParams *params) ### Description Initializes the navigation mesh for tiled use. ### Method dtStatus ### Parameters - **params** (const dtNavMeshParams *) - Description of initialization parameters. ## init (unsigned char *data, const int dataSize, const int flags) ### Description Initializes the navigation mesh for single tile use. ### Method dtStatus ### Parameters - **data** (unsigned char *) - Pointer to the navigation mesh data. - **dataSize** (const int) - Size of the navigation mesh data. - **flags** (const int) - Initialization flags. ## getParams () ### Description Returns the navigation mesh initialization parameters. ### Method const dtNavMeshParams * ## addTile (unsigned char *data, int dataSize, int flags, dtTileRef lastRef, dtTileRef *result) ### Description Adds a tile to the navigation mesh. ### Method dtStatus ### Parameters - **data** (unsigned char *) - Pointer to the tile data. - **dataSize** (int) - Size of the tile data. - **flags** (int) - Flags for the tile. - **lastRef** (dtTileRef) - Reference to the last tile added. - **result** (dtTileRef *) - Pointer to store the reference of the newly added tile. ## removeTile (dtTileRef ref, unsigned char **data, int *dataSize) ### Description Removes the specified tile from the navigation mesh. ### Method dtStatus ### Parameters - **ref** (dtTileRef) - Reference to the tile to remove. - **data** (unsigned char **) - Pointer to store the removed tile's data. - **dataSize** (int *) - Pointer to store the size of the removed tile's data. ``` -------------------------------- ### getRequestStatus Source: https://recastnav.com/classdtPathQueue-members.html Gets the current status of a pathfinding request. ```APIDOC ## getRequestStatus(dtPathQueueRef ref) const ### Description Gets the current status of a pathfinding request identified by the provided reference. ### Method `getRequestStatus` ### Parameters - **ref** (dtPathQueueRef) - The reference to the path queue entry whose status is to be retrieved. ### Returns The status of the request (e.g., pending, processed, failed). ``` -------------------------------- ### init Source: https://recastnav.com/classdtProximityGrid.html Initializes the proximity grid with a specified pool size and cell size. ```APIDOC ## init() ### Description Initializes the proximity grid with a specified pool size and cell size. ### Method bool init(const int poolSize, const float cellSize) ### Parameters #### Path Parameters - **poolSize** (int) - Required - The maximum number of items the grid can hold. - **cellSize** (float) - Required - The size of each cell in the grid. ``` -------------------------------- ### getNavMeshQuery Source: https://recastnav.com/classdtCrowd.html Gets the query object used by the crowd. ```APIDOC ## getNavMeshQuery() ### Description Gets the query object used by the crowd. ### Returns - const dtNavMeshQuery * - The query object used by the crowd. ``` -------------------------------- ### Initialization and Reset Source: https://recastnav.com/classdtObstacleAvoidanceQuery.html Methods for initializing and resetting the obstacle avoidance query system. ```APIDOC ## init ### Description Initializes the obstacle avoidance query system with the maximum number of circles and segments it can hold. ### Parameters - **maxCircles** (int) - The maximum number of obstacle circles. - **maxSegments** (int) - The maximum number of obstacle segments. ### Returns - bool - True if initialization was successful, false otherwise. ``` ```APIDOC ## reset ### Description Resets the obstacle avoidance query system, removing all added obstacles. ### Parameters None ``` -------------------------------- ### getGrid Source: https://recastnav.com/classdtCrowd.html Gets the crowd's proximity grid. ```APIDOC ## getGrid() ### Description Gets the crowd's proximity grid. ### Returns - const dtProximityGrid * - The crowd's proximity grid. ``` -------------------------------- ### buildAllTiles() Source: https://recastnav.com/classSample__TileMesh.html Builds all tiles for the navigation mesh. ```APIDOC ## buildAllTiles() ### Description Builds all tiles for the navigation mesh. ### Method ```cpp void buildAllTiles() ``` ### Parameters None ``` -------------------------------- ### getActiveAgents Source: https://recastnav.com/classdtCrowd.html Gets the active agents in the agent pool. ```APIDOC ## getActiveAgents() ### Description Gets the active agents in the agent pool. ### Parameters - **agents** (dtCrowdAgent **) - Output - An array of agent pointers. [(dtCrowdAgent *) * maxAgents] - **maxAgents** (const int) - Input - The size of the crowd agent array. ### Returns - int - The number of agents returned in `agents`. ``` -------------------------------- ### duLogBuildTimes Source: https://recastnav.com/RecastDump_8h.html Logs the build times for tiles using the provided context. ```APIDOC ## duLogBuildTimes() ### Description Logs the build times for tiles. ### Method void ### Parameters - **ctx** (rcContext &) - The recast context. - **totalTileUsec** (const int) - The total time in microseconds spent building tiles. ``` -------------------------------- ### getSegmentCount Source: https://recastnav.com/classdtLocalBoundary.html Gets the number of segments in the local boundary. ```APIDOC ## getSegmentCount() ### Description Gets the number of segments in the local boundary. ### Method int getSegmentCount() const ### Parameters None ### Returns - **int** - The number of segments. ``` -------------------------------- ### nearestPoint Source: https://recastnav.com/classdtFindNearestPolyQuery.html Gets the nearest point on the polygon mesh. ```APIDOC ## nearestPoint() ### Description Gets the nearest point on the polygon mesh. ### Returns - const float* - A pointer to the nearest point coordinates. ``` -------------------------------- ### Initialization Source: https://recastnav.com/classdtNavMeshQuery.html Initializes the query object with a navigation mesh and a maximum number of nodes for pathfinding. ```APIDOC ## init ### Description Initializes the query object with a navigation mesh and a maximum number of nodes. ### Method dtStatus init (const dtNavMesh *nav, const int maxNodes) ### Parameters - **nav** (const dtNavMesh *) - A pointer to the navigation mesh to be used for queries. - **maxNodes** (const int) - The maximum number of nodes to be used in pathfinding. ### Return Value dtStatus - Indicates the success or failure of the initialization. ``` -------------------------------- ### FileIO::getFileSize Source: https://recastnav.com/classFileIO.html Gets the size of the file in bytes. ```APIDOC ## getFileSize ### Description Gets the size of the file in bytes. ### Method size_t ### Returns - size_t - The size of the file in bytes. ``` -------------------------------- ### collectSettings() Source: https://recastnav.com/classSample__TileMesh.html Collects the current build settings. ```APIDOC ## collectSettings() ### Description Collects the current build settings into a BuildSettings object. ### Method ```cpp void collectSettings(BuildSettings &settings) ``` ### Parameters - **settings** (BuildSettings &): A reference to a BuildSettings object to be populated with the current settings. ``` -------------------------------- ### prev Source: https://recastnav.com/DetourTileCacheBuilder_8cpp.html Gets the previous index in a circular array. ```APIDOC ## prev() Gets the previous index in a circular array. ### Parameters - `_i_` (int) - The current index. - `_n_` (int) - The size of the array. ### Returns int - The previous index. ``` -------------------------------- ### Iterating through rcPolyMesh Polygons Source: https://recastnav.com/structrcPolyMesh.html This example demonstrates how to iterate through the polygons and vertices of an rcPolyMesh. It shows how to access vertex indices, check for border edges, and convert vertex coordinates to world space. ```cpp const int nvp = mesh.nvp; const float cs = mesh.cs; const float ch = mesh.ch; const float* orig = mesh.bmin; for (int i = 0; i < mesh.npolys; ++i) { const unsigned short* p = &mesh.polys[i*nvp*2]; // Iterate the vertices. unsigned short vi[3]; // The vertex indices. for (int j = 0; j < nvp; ++j) { if (p[j] == RC_MESH_NULL_IDX) break; // End of vertices. if (p[j + nvp] == RC_MESH_NULL_IDX) { // The edge beginning with this vertex is a solid border. } else { // The edge beginning with this vertex connects to // polygon p[j + nvp]. } // Convert to world space. const unsigned short* v = &mesh.verts[p[j]*3]; const float x = orig[0] + v[0]*cs; const float y = orig[1] + v[1]*ch; const float z = orig[2] + v[2]*cs; // Do something with the vertices. } } ``` -------------------------------- ### next Source: https://recastnav.com/DetourTileCacheBuilder_8cpp.html Gets the next index in a circular array. ```APIDOC ## next() Gets the next index in a circular array. ### Parameters - `_i_` (int) - The current index. - `_n_` (int) - The size of the array. ### Returns int - The next index. ``` -------------------------------- ### build Source: https://recastnav.com/classSample.html Builds the navigation mesh. ```APIDOC ## build ### Description Builds the navigation mesh. ### Method virtual bool build () ### Parameters None ``` -------------------------------- ### renderOverlay() Source: https://recastnav.com/classSample__SoloMesh.html Renders an overlay on top of the Sample_SoloMesh visualization. This method overrides the base Sample class renderOverlay method. ```APIDOC ## renderOverlay() ### Description Renders an overlay on top of the Sample_SoloMesh visualization. This method overrides the base Sample class renderOverlay method. ### Signature `void Sample_SoloMesh::renderOverlay()` ### Remarks Override virtual Reimplemented from Sample. ``` -------------------------------- ### render() Source: https://recastnav.com/classSample__SoloMesh.html Renders the current state of the Sample_SoloMesh. This method overrides the base Sample class render method. ```APIDOC ## render() ### Description Renders the current state of the Sample_SoloMesh. This method overrides the base Sample class render method. ### Signature `void Sample_SoloMesh::render()` ### Remarks Override virtual Reimplemented from Sample. ``` -------------------------------- ### Sample_TempObstacles Constructor Source: https://recastnav.com/classSample__TempObstacles-members.html Constructs a new Sample_TempObstacles object. ```APIDOC ## Sample_TempObstacles() ### Description Constructs a new Sample_TempObstacles object. ### Response #### Success Response (200) - **Sample_TempObstacles** - The newly constructed object. ```