mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-08-30 23:18:40 +00:00
179 lines
9.7 KiB
HTML
179 lines
9.7 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.9.1"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Recast Navigation: Recast & Detour</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Recast Navigation
|
|
</div>
|
|
<div id="projectbrief">Navigation-mesh Toolset for Games</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.1 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('index.html',''); initResizable(); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="PageDoc"><div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">Recast & Detour </div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><p><a class="anchor" id="md_README"></a></p>
|
|
<p><a href="https://github.com/recastnavigation/recastnavigation/actions/workflows/Build.yaml"><img src="https://github.com/recastnavigation/recastnavigation/actions/workflows/Build.yaml/badge.svg" alt="Build" style="pointer-events: none;" class="inline"/></a> <a href="https://github.com/recastnavigation/recastnavigation/actions/workflows/Tests.yaml"><img src="https://github.com/recastnavigation/recastnavigation/actions/workflows/Tests.yaml/badge.svg" alt="Tests" style="pointer-events: none;" class="inline"/></a></p>
|
|
<p><img src="screenshot.png" alt="" class="inline" title="screenshot of a navmesh baked with the sample program"/></p>
|
|
<h1><a class="anchor" id="autotoc_md0"></a>
|
|
Recast</h1>
|
|
<p>Recast is state of the art navigation mesh construction toolset for games.</p>
|
|
<p>Recast is...</p><ul>
|
|
<li>🤖 <b>Automatic</b> - throw any level geometry at it and you will get a robust navmesh out</li>
|
|
<li>🏎️ <b>Fast</b> - swift turnaround times for level designers</li>
|
|
<li>🧘 <b>Flexible</b> - easily customize the navmesh generation and runtime navigation systems to suit your specific game's needs.</li>
|
|
</ul>
|
|
<p>Recast constructs a navmesh through a multi-step rasterization process:</p>
|
|
<ol type="1">
|
|
<li>First Recast voxelizes the input triangle mesh by rasterizing the triangles into a multi-layer heightfield.</li>
|
|
<li>Voxels in areas where the character would not be able to move are removed by applying simple voxel data filters.</li>
|
|
<li>The walkable areas described by the voxel grid are then divided into sets of 2D polygonal regions.</li>
|
|
<li>The navigation polygons are generated by triangulating and stiching together the generated 2d polygonal regions.</li>
|
|
</ol>
|
|
<h1><a class="anchor" id="autotoc_md1"></a>
|
|
Detour</h1>
|
|
<p>Recast is accompanied by Detour, a path-finding and spatial reasoning toolkit. You can use any navigation mesh with Detour, but of course the data generated with Recast fits perfectly.</p>
|
|
<p>Detour offers a simple static navmesh data representation which is suitable for many simple cases. It also provides a tiled navigation mesh representation, which allows you to stream of navigation data in and out as the player progresses through the world and regenerate sections of the navmesh data as the world changes.</p>
|
|
<h1><a class="anchor" id="autotoc_md2"></a>
|
|
RecastDemo</h1>
|
|
<p>You can find a comprehensive demo project in the <code>RecastDemo</code> folder. It's a kitchen sink demo showcasing all the functionality of the library. If you are new to Recast & Detour, check out <a href="/RecastDemo/Source/Sample_SoloMesh.cpp">Sample_SoloMesh.cpp</a> to get started with building navmeshes and <a href="/RecastDemo/Source/NavMeshTesterTool.cpp">NavMeshTesterTool.cpp</a> to see how Detour can be used to find paths.</p>
|
|
<h2><a class="anchor" id="autotoc_md3"></a>
|
|
Building RecastDemo</h2>
|
|
<p>RecastDemo uses <a href="http://premake.github.io/">premake5</a> to build platform specific projects. Download it and make sure it's available on your path, or specify the path to it.</p>
|
|
<h3><a class="anchor" id="autotoc_md4"></a>
|
|
Linux</h3>
|
|
<ul>
|
|
<li>Install SDL2 and its dependencies according to your distro's guidelines.</li>
|
|
<li>Navigate to the <code>RecastDemo</code> folder and run <code>premake5 gmake2</code></li>
|
|
<li>Navigate to <code>RecastDemo/Build/gmake2</code> and run <code>make</code></li>
|
|
<li>Navigate to <code>RecastDemo/Bin</code> and run <code>./RecastDemo</code></li>
|
|
</ul>
|
|
<h3><a class="anchor" id="autotoc_md5"></a>
|
|
macOS</h3>
|
|
<ul>
|
|
<li>Grab the latest SDL2 development library dmg from <a href="https://github.com/libsdl-org/SDL">here</a> and place <code>SDL2.framework</code> in <code>RecastDemo/Bin</code></li>
|
|
<li>Navigate to the <code>RecastDemo</code> folder and run <code>premake5 xcode4</code></li>
|
|
<li>Open <code>Build/xcode4/recastnavigation.xcworkspace</code></li>
|
|
<li>Set the RecastDemo project as the target and build.</li>
|
|
</ul>
|
|
<h3><a class="anchor" id="autotoc_md6"></a>
|
|
Windows</h3>
|
|
<ul>
|
|
<li>Grab the latest SDL2 development library release from <a href="https://github.com/libsdl-org/SDL">here</a> and unzip it <code>RecastDemo\Contrib</code>. Rename the SDL folder such that the path <code>RecastDemo\Contrib\SDL\lib\x86</code> is valid.</li>
|
|
<li>Navigate to the <code>RecastDemo</code> folder and run <code>premake5 vs2022</code></li>
|
|
<li>Open <code>Build/vs2022/recastnavigation.sln</code>.</li>
|
|
<li>Set <code>RecastDemo</code> as the startup project, build, and run.</li>
|
|
</ul>
|
|
<h2><a class="anchor" id="autotoc_md7"></a>
|
|
Running Unit tests</h2>
|
|
<ul>
|
|
<li>Follow the instructions to build RecastDemo above. Premake should generate another build target called "Tests".</li>
|
|
<li>Build the "Tests" project. This will generate an executable named "Tests" in <code>RecastDemo/Bin/</code></li>
|
|
<li>Run the "Tests" executable. It will execute all the unit tests, indicate those that failed, and display a count of those that succeeded.</li>
|
|
</ul>
|
|
<h1><a class="anchor" id="autotoc_md8"></a>
|
|
Integrating with your game or engine</h1>
|
|
<p>See Integration.md</p>
|
|
<h1><a class="anchor" id="autotoc_md9"></a>
|
|
Contribute</h1>
|
|
<p>Check out the <a class="el" href="md_Roadmap.html">Project Roadmap</a> to see what features and functionality you might be able to help with, and the <a class="el" href="md_CONTRIBUTING.html">Contributing doc</a> for guidance on making contributions.</p>
|
|
<h1><a class="anchor" id="autotoc_md10"></a>
|
|
Discuss</h1>
|
|
<ul>
|
|
<li>Discuss Recast & Detour: <a href="http://groups.google.com/group/recastnavigation">http://groups.google.com/group/recastnavigation</a></li>
|
|
<li>Development blog: <a href="http://digestingduck.blogspot.com/">http://digestingduck.blogspot.com/</a></li>
|
|
</ul>
|
|
<h1><a class="anchor" id="autotoc_md11"></a>
|
|
License</h1>
|
|
<p>Recast & Detour is licensed under ZLib license, see License.txt for more information. </p>
|
|
</div></div><!-- PageDoc -->
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- HTML footer for doxygen 1.8.6-->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<a href="https://github.com/recastnavigation/recastnavigation">Project Home</a>
|
|
| <a href="./License.txt">Licence (ZLib)</a>
|
|
| Copyright 2009 Mikko Mononen
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|