diff --git a/CMakeLists.txt b/CMakeLists.txt index 292d1dc06..09ccb315b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -604,9 +604,7 @@ if(WIN32) endif(WIN32) # Extern -set(RECASTNAVIGATION_DEMO OFF CACHE BOOL "Do not build RecastDemo") set(RECASTNAVIGATION_STATIC ON CACHE BOOL "Build recastnavigation static libraries") -set(RECASTNAVIGATION_TESTS OFF CACHE BOOL "Do not build recastnavigation tests") add_subdirectory (extern/recastnavigation EXCLUDE_FROM_ALL) add_subdirectory (extern/osg-ffmpeg-videoplayer) diff --git a/extern/recastnavigation/.gitignore b/extern/recastnavigation/.gitignore index 98f17e4b7..7c12d58f0 100644 --- a/extern/recastnavigation/.gitignore +++ b/extern/recastnavigation/.gitignore @@ -9,16 +9,6 @@ *.so *.idb -## Linux exes have no extension -RecastDemo/Bin/RecastDemo -RecastDemo/Bin/Tests - -# Build directory -RecastDemo/Build - -# Ignore meshes -RecastDemo/Bin/Meshes/* - ## Logs and databases # *.log *.sql @@ -38,9 +28,6 @@ Thumbs.db ## xcode specific *xcuserdata* -## SDL contrib -RecastDemo/Contrib/SDL/* - ## Generated doc files Docs/html diff --git a/extern/recastnavigation/.travis.yml b/extern/recastnavigation/.travis.yml deleted file mode 100644 index 0e63abad1..000000000 --- a/extern/recastnavigation/.travis.yml +++ /dev/null @@ -1,72 +0,0 @@ -language: cpp -branches: - only: - - master - - coverity_scan - - /recast-.*$/ - -sudo: false - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - - llvm-toolchain-xenial-7 - packages: [ cmake, clang-7, clang-tools-7, gcc-8, g++-8, libsdl2-dev ] - -matrix: - include: - - name: Recastnavigation (all) on MacOS xcode9.4 - os: osx - osx_image: xcode9.4 - before_install: - - brew update - - brew install sdl2 - if: branch != coverity_scan - - name: Recastnavigation on Ubuntu Xenial GCC-5 - os: linux - dist: xenial - sudo: required - if: branch != coverity_scan - - name: Recastnavigation on Ubuntu Xenial GCC-8 - os: linux - dist: xenial - sudo: required - env: - - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" - if: branch != coverity_scan - - name: Recastnavigation on Ubuntu Xenial GCC-5 using Premake5 - os: linux - dist: xenial - sudo: required - if: branch != coverity_scan - before_install: - - wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha12/premake-5.0.0-alpha12-linux.tar.gz -O premake.tar.gz - - tar -xf premake.tar.gz - env: - - PREMAKE=1 - - name: Recastnavigation on Ubuntu Xenial Clang-7 with Static Analysis - os: linux - dist: xenial - sudo: required - env: - - MATRIX_EVAL="CC=clang-7 && CXX=clang++-7" - - ANALYZE="scan-build-7 --force-analyze-debug-code --use-cc clang-7 --use-c++ clang++-7" - if: branch != coverity_scan - compiler: clang - - name: Recastnavigation Coverity Scan - os: linux - dist: xenial - sudo: required - if: branch = coverity_scan - -before_script: - - if [ "${TRAVIS_OS_NAME}" = "linux" ]; then eval "${MATRIX_EVAL}"; fi - - if [ "${PREMAKE}" = "1" ]; then cd RecastDemo && ../premake5 gmake && cd ..; fi - - if [ "${PREMAKE}" != "1" ]; then mkdir -p build && cd build && ${ANALYZE} cmake ../ && cd ..; fi - -script: # 2 CPUs on Travis-CI + 1 extra for IO bound process - - if [ "${PREMAKE}" = "1" ]; then make -C RecastDemo/Build/gmake -j3; fi - - if [ "${PREMAKE}" != "1" ]; then make -C build -j3; fi - - if [ "${PREMAKE}" = "1" ]; then RecastDemo/Bin/Tests; fi - - if [ "${PREMAKE}" != "1" ]; then cd build && ctest; fi diff --git a/extern/recastnavigation/CMakeLists.txt b/extern/recastnavigation/CMakeLists.txt index d23859dfc..4952e51da 100644 --- a/extern/recastnavigation/CMakeLists.txt +++ b/extern/recastnavigation/CMakeLists.txt @@ -6,9 +6,6 @@ project(RecastNavigation) SET(SOVERSION 1) SET(VERSION 1.0.0) -option(RECASTNAVIGATION_DEMO "Build demo" ON) -option(RECASTNAVIGATION_TESTS "Build tests" ON) -option(RECASTNAVIGATION_EXAMPLES "Build examples" ON) option(RECASTNAVIGATION_STATIC "Build static libraries" ON) add_subdirectory(DebugUtils) @@ -16,12 +13,3 @@ add_subdirectory(Detour) add_subdirectory(DetourCrowd) add_subdirectory(DetourTileCache) add_subdirectory(Recast) - -if (RECASTNAVIGATION_DEMO) - add_subdirectory(RecastDemo) -endif () - -if (RECASTNAVIGATION_TESTS) - enable_testing() - add_subdirectory(Tests) -endif () diff --git a/extern/recastnavigation/CONTRIBUTING.md b/extern/recastnavigation/CONTRIBUTING.md deleted file mode 100644 index 3cfdc2160..000000000 --- a/extern/recastnavigation/CONTRIBUTING.md +++ /dev/null @@ -1,185 +0,0 @@ -# Contributing to Recast and Detour - -We'd love for you to contribute to our source code and to make Recast and Detour even better than they are -today! Here are the guidelines we'd like you to follow: - - - [Code of Conduct](#coc) - - [Question or Problem?](#question) - - [Issues and Bugs](#issue) - - [Feature Requests](#feature) - - [Submission Guidelines](#submission-guidelines) - - [Git Commit Guidelines](#git-commit-guidelines) - -## Code of Conduct -This project adheres to the [Open Code of Conduct][code-of-conduct]. -By participating, you are expected to honor this code. - -## Got a Question or Problem? - -If you have questions about how to use Recast or Detour, please direct these to the [Google Group][groups] -discussion list. We are also available on [Gitter][gitter]. - -## Found an Issue? -If you find a bug in the source code or a mistake in the documentation, you can help us by -submitting an issue to our [GitHub Repository][github]. Even better you can submit a Pull Request -with a fix. - -**Please see the Submission Guidelines below**. - -## Want a Feature? -You can request a new feature by submitting an issue to our [GitHub Repository][github]. If you -would like to implement a new feature then consider what kind of change it is: - -* **Major Changes** that you wish to contribute to the project should be discussed first on our -[Google Group][groups] or in [GitHub Issues][github-issues] so that we can better coordinate our efforts, prevent -duplication of work, and help you to craft the change so that it is successfully accepted into the -project. -* **Small Changes** can be crafted and submitted to the [GitHub Repository][github] as a Pull Request. - -## Submission Guidelines - -### Submitting an Issue -Before you submit your issue search the [GitHub Issues][github-issues] archive, -maybe your question was already answered. - -If your issue appears to be a bug, and hasn't been reported, open a new issue. -Help us to maximize the effort we can spend fixing issues and adding new -features, by not reporting duplicate issues. Providing the following information will increase the -chances of your issue being dealt with quickly: - -* **Overview of the Issue** - what type of issue is it, and why is it an issue for you? -* **Callstack** - if it's a crash or other runtime error, a callstack will help diagnosis -* **Screenshots** - for navmesh generation problems, a picture really is worth a thousand words. - Implement `duDebugDraw` and call some methods from DetourDebugDraw.h. Seriously, just do it, we'll definitely ask you to if you haven't! -* **Logs** - stdout and stderr from the console, or log files if there are any. - If integrating into your own codebase, be sure to implement the log callbacks in `rcContext`. -* **Reproduction steps** - a minimal, unambigious set of steps including input, that causes the error for you. - e.g. input geometry and settings you can use to input into RecastDemo to get it to fail. - Note: These can be saved by pressing the 9 key in RecastDemo, and the resulting .gset file can be shared (with the .obj if it is not one of the default ones). -* **Recast version(s) and/or git commit hash** - particularly if you can find the point at which the error first started happening -* **Environment** - operating system, compiler etc. -* **Related issues** - has a similar issue been reported before? -* **Suggest a Fix** - if you can't fix the bug yourself, perhaps you can point to what might be - causing the problem (line of code or commit) - -Here is a great example of a well defined issue: https://github.com/recastnavigation/recastnavigation/issues/12 - -**If you get help, help others. Good karma rulez!** - -### Submitting a Pull Request -Before you submit your pull request consider the following guidelines: - -* Search [GitHub Pull Requests][github-pulls] for an open or closed Pull Request - that relates to your submission. You don't want to duplicate effort. -* Make your changes in a new git branch: - - ```shell - git checkout -b my-fix-branch master - ``` - -* Implement your changes, **including appropriate tests if appropriate/possible**. -* Commit your changes using a descriptive commit message that follows our - [commit message conventions](#commit-message-format). - - ```shell - git commit -a - ``` - Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files. - -* Squash any work-in-progress commits (by rebasing) to form a series of commits that make sense individually. - Ideally the pull request will be small and focused enough that it fits sensibly in one commit. - - ```shell - git rebase -i origin/master - ``` - -* Push your branch to GitHub: - - ```shell - git push origin my-fix-branch - ``` - -* In GitHub, send a pull request to `recastnavigation:master`. -* If we suggest changes then: - * Make the required updates. - * Commit your changes to your branch (e.g. `my-fix-branch`). - * Squash the changes, overwriting history in your fix branch - we don't want history to include incomplete work. - * Push the changes to your GitHub repository (this will update your Pull Request). - -If you have rebased to squash commits together, you will need to force push to update the PR: - - ```shell - git rebase master -i - git push origin my-fix-branch -f - ``` - -That's it! Thank you for your contribution! - -#### After your pull request is merged - -After your pull request is merged, you can safely delete your branch and pull the changes -from the main (upstream) repository: - -* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows: - - ```shell - git push origin --delete my-fix-branch - ``` - -* Check out the master branch: - - ```shell - git checkout master -f - ``` - -* Delete the local branch: - - ```shell - git branch -D my-fix-branch - ``` - -* Update your master with the latest upstream version: - - ```shell - git pull --ff upstream master - ``` - -## Git Commit Guidelines - -### Commit content - -Do your best to factor commits appropriately, i.e not too large with unrelated -things in the same commit, and not too small with the same small change applied N -times in N different commits. If there was some accidental reformatting or whitespace -changes during the course of your commits, please rebase them away before submitting -the PR. - -### Commit Message Format -Please format commit messages as follows (based on this [excellent post](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)): - -``` -Summarize change in 50 characters or less - -Provide more detail after the first line. Leave one blank line below the -summary and wrap all lines at 72 characters or less. - -If the change fixes an issue, leave another blank line after the final -paragraph and indicate which issue is fixed in the specific format -below. - -Fix #42 -``` - -Important things you should try to include in commit messages include: -* Motivation for the change -* Difference from previous behaviour -* Whether the change alters the public API, or affects existing behaviour significantly - - - -[code-of-conduct]: http://todogroup.org/opencodeofconduct/#Recastnavigation/b.hymers@gmail.com -[github]: https://github.com/recastnavigation/recastnavigation -[github-issues]: https://github.com/recastnavigation/recastnavigation/issues -[github-pulls]: https://github.com/recastnavigation/recastnavigation/pulls -[gitter]: https://gitter.im/recastnavigation/chat -[groups]: https://groups.google.com/forum/?fromgroups#!forum/recastnavigation diff --git a/extern/recastnavigation/Docs/Conceptual/license_c.txt b/extern/recastnavigation/Docs/Conceptual/license_c.txt deleted file mode 100644 index c2a3c1e85..000000000 --- a/extern/recastnavigation/Docs/Conceptual/license_c.txt +++ /dev/null @@ -1,27 +0,0 @@ - -/** -@page License License - -
-Copyright (c) 2009-2011 Mikko Mononen memon@inside.org - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any damages -arising from the use of this software. - -Permission is granted to anyone to use this software for any purpose, -including commercial applications, and to alter it and redistribute it -freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. -- -*/ \ No newline at end of file diff --git a/extern/recastnavigation/Docs/Conceptual/mainpage_c.txt b/extern/recastnavigation/Docs/Conceptual/mainpage_c.txt deleted file mode 100644 index 14dd1cf8f..000000000 --- a/extern/recastnavigation/Docs/Conceptual/mainpage_c.txt +++ /dev/null @@ -1,109 +0,0 @@ -/// @mainpage Recast Navigation -/// -/// @image html recast_intro.png -/// -///
-Direction 0 = (-1, 0) -Direction 1 = (0, 1) -Direction 2 = (1, 0) -Direction 3 = (0, -1) -- -Example of iterating and inspecting spans, including connected neighbors: - -@code -// Where chf is an instance of a rcCompactHeightfield. - -const float cs = chf.cs; -const float ch = chf.ch; - -for (int y = 0; y < chf.height; ++y) -{ - for (int x = 0; x < chf.width; ++x) - { - // Deriving the minimum corner of the grid location. - const float fx = chf.bmin[0] + x*cs; - const float fz = chf.bmin[2] + y*cs; - - // Get the cell for the grid location then iterate - // up the column. - const rcCompactCell& c = chf.cells[x+y*chf.width]; - for (unsigned i = c.index, ni = c.index+c.count; i < ni; ++i) - { - const rcCompactSpan& s = chf.spans[i]; - - Deriving the minimum (floor) of the span. - const float fy = chf.bmin[1] + (s.y+1)*ch; - - // Testing the area assignment of the span. - if (chf.areas[i] == RC_WALKABLE_AREA) - { - // The span is in the default 'walkable area'. - } - else if (chf.areas[i] == RC_NULL_AREA) - { - // The surface is not considered walkable. - // E.g. It was filtered out during the build processes. - } - else - { - // Do something. (Only applicable for custom build - // build processes.) - } - - // Iterating the connected axis-neighbor spans. - for (int dir = 0; dir < 4; ++dir) - { - if (rcGetCon(s, dir) != RC_NOT_CONNECTED) - { - // There is a neighbor in this direction. - const int nx = x + rcGetDirOffsetX(dir); - const int ny = y + rcGetDirOffsetY(dir); - const int ni = (int)chf.cells[nx+ny*w].index + rcGetCon(s, 0); - const rcCompactSpan& ns = chf.spans[ni]; - // Do something with the neighbor span. - } - } - } - } -} -@endcode - -@see rcAllocCompactHeightfield, rcFreeCompactHeightfield, rcBuildCompactHeightfield - -@struct rcContour -@par - -A contour only exists within the context of a #rcContourSet object. - -While the height of the contour's border may vary, the contour will always -form a simple polygon when projected onto the xz-plane. - -Example of converting vertices into world space: - -@code -// Where cset is the rcContourSet object to which the contour belongs. -float worldX = cset.bmin[0] + vertX * cset.cs; -float worldY = cset.bmin[1] + vertY * cset.ch; -float worldZ = cset.bmin[2] + vertZ * cset.cs; -@endcode - -@see rcContourSet - -@var rcContour::verts -@par - -The simplified contour is a version of the raw contour with all -'unnecessary' vertices removed. Whether a vertex is -considered unnecessary depends on the contour build process. - -The data format is as follows: (x, y, z, r) * #nverts - -A contour edge is formed by the current and next vertex. The r-value -represents region and connection information for the edge. For example: - -@code -int r = verts[i*4+3]; - -int regionId = r & RC_CONTOUR_REG_MASK; - -if (r & RC_BORDER_VERTEX) -{ - // The edge represents a solid border. -} - -if (r & RC_AREA_BORDER) -{ - // The edge represents a transition between different areas. -} -@endcode - -@var rcContour::rverts -@par - -See #verts for information on element layout. - -@struct rcContourSet -@par - -All contours within the set share the minimum bounds and cell sizes of the set. - -The standard process for building a contour set is to allocate it -using #rcAllocContourSet, then initialize it using #rcBuildContours. - -@see rcAllocContourSet, rcFreeContourSet, rcBuildContours - -@struct rcPolyMesh -@par - -A mesh of potentially overlapping convex polygons of between three -and #nvp vertices. The mesh exists within the context of an axis-aligned -bounding box (AABB) with vertices laid out in an evenly spaced grid, based -on the values of #cs and #ch. - -The standard process for building a contour set is to allocate it using -#rcAllocPolyMesh, the initialize it using #rcBuildPolyMesh - -Example of iterating the polygons: - -@code -// Where mesh is a reference to a rcPolyMesh object. - -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. - } -} -@endcode - -@see rcAllocPolyMesh, rcFreePolyMesh, rcBuildPolyMesh - -@var rcPolyMesh::verts -@par - -The values of #bmin ,#cs, and #ch are used to convert vertex coordinates -to world space as follows: - -@code -float worldX = bmin[0] + verts[i*3+0] * cs -float worldY = bmin[1] + verts[i*3+1] * ch -float worldZ = bmin[2] + verts[i*3+2] * cs -@endcode - -@var rcPolyMesh::polys -@par - -Each entry is 2 * #nvp in length. The first half of the entry -contains the indices of the polygon. The first instance of #RC_MESH_NULL_IDX -indicates the end of the indices for the entry. The second half contains -indices to neighbor polygons. A value of #RC_MESH_NULL_IDX indicates no -connection for the associated edge. (I.e. The edge is a solid border.) - -For example: -
-nvp = 6 -For the entry: (1, 3, 4, 8, RC_MESH_NULL_IDX, RC_MESH_NULL_IDX, - 18, RC_MESH_NULL_IDX , 21, RC_MESH_NULL_IDX, RC_MESH_NULL_IDX, RC_MESH_NULL_IDX) - -(1, 3, 4, 8) defines a polygon with 4 vertices. -Edge 1->3 is shared with polygon 18. -Edge 4->8 is shared with polygon 21. -Edges 3->4 and 4->8 are border edges not shared with any other polygon. -- -@var rcPolyMesh::areas -@par - -The standard build process assigns the value of #RC_WALKABLE_AREA to all walkable polygons. -This value can then be changed to meet user requirements. - -@struct rcPolyMeshDetail -@par - -The detail mesh is made up of triangle sub-meshes that provide extra -height detail for each polygon in its assoicated polygon mesh. - -The standard process for building a detail mesh is to allocate it -using #rcAllocPolyMeshDetail, then build it using #rcBuildPolyMeshDetail. - -See the individual field definitions for details realted to the structure -the mesh. - -@see rcAllocPolyMeshDetail, rcFreePolyMeshDetail, rcBuildPolyMeshDetail, rcPolyMesh - -@var rcPolyMeshDetail::meshes -@par - -[(baseVertIndex, vertCount, baseTriIndex, triCount) * #nmeshes] - -Maximum number of vertices per sub-mesh: 127