Repository: snape/RVO2-3D Branch: main Commit: 10eb1dae058e Files: 77 Total size: 327.3 KB Directory structure: gitextract_3w42ou2q/ ├── .bazelignore ├── .bazelrc ├── .bazelversion ├── .bazelversion.license ├── .buildifier.json ├── .buildifier.json.license ├── .clang-format ├── .clang-tidy ├── .devcontainer/ │ ├── devcontainer.json │ └── devcontainer.json.license ├── .dockerignore ├── .editorconfig ├── .gitattributes ├── .github/ │ ├── CODEOWNERS │ ├── CODE_OF_CONDUCT.md │ ├── SECURITY.md │ ├── SUPPORT.md │ └── workflows/ │ ├── ci.yml │ └── codeql.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .vscode/ │ ├── extensions.json │ ├── extensions.json.license │ ├── settings.json │ └── settings.json.license ├── .yamllint.yaml ├── .zenodo.json ├── .zenodo.json.license ├── BUILD.bazel ├── Brewfile ├── CITATION.cff ├── CMakeLists.txt ├── CMakePresets.json ├── CMakePresets.json.license ├── CPPLINT.cfg ├── CTestConfig.cmake ├── Dockerfile ├── LICENSE ├── LICENSES/ │ ├── Apache-2.0.txt │ ├── CC-BY-4.0.txt │ ├── CC-BY-SA-4.0.txt │ └── CC0-1.0.txt ├── MODULE.bazel ├── QUALITY_DECLARATION.md ├── README.md ├── RVO3D.pc.in ├── RVO3DConfig.cmake.in ├── compose.yaml ├── doc/ │ ├── CMakeLists.txt │ ├── footer.html │ ├── footer.html.license │ ├── header.html │ ├── header.html.license │ └── stylesheet.css ├── examples/ │ ├── BUILD.bazel │ ├── CMakeLists.txt │ └── Sphere.cc ├── include-what-you-use.imp ├── include-what-you-use.imp.license ├── package.xml ├── renovate.json ├── renovate.json.license ├── requirements.txt ├── src/ │ ├── Agent.cc │ ├── Agent.h │ ├── BUILD.bazel │ ├── CMakeLists.txt │ ├── KdTree.cc │ ├── KdTree.h │ ├── Plane.cc │ ├── Plane.h │ ├── RVO.h │ ├── RVOSimulator.cc │ ├── RVOSimulator.h │ ├── Vector3.cc │ └── Vector3.h └── triggers ================================================ FILE CONTENTS ================================================ ================================================ FILE: .bazelignore ================================================ # -*- mode: gitignore; -*- # vi: set ft=gitignore: # # .bazelignore # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # _build/ .github/ .idea/ .reuse/ cmake-build-*/ ================================================ FILE: .bazelrc ================================================ # # .bazelrc # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # build --force_pic=true build --remote_upload_local_results=false build --sandbox_default_allow_network=false build:macos --apple_generate_dsym=true build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain build:macos --apple_platform_type=macos common --enable_platform_specific_config=true common --heap_dump_on_oom=true test --test_verbose_timeout_warnings=true try-import %workspace%/.user.bazelrc ================================================ FILE: .bazelversion ================================================ 9.x ================================================ FILE: .bazelversion.license ================================================ .bazelversion RVO2-3D Library SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Please send all bug reports to . The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: .buildifier.json ================================================ { "type": "auto", "mode": "fix", "lint": "fix", "warningsList": [ "all" ] } ================================================ FILE: .buildifier.json.license ================================================ .buildifier.json RVO2-3D Library SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Please send all bug reports to . The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: .clang-format ================================================ # -*- mode: yaml; -*- # vi: set ft=yaml: # # .clang-format # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # --- BasedOnStyle: Google PointerAlignment: Right ================================================ FILE: .clang-tidy ================================================ # -*- mode: yaml; -*- # vi: set ft=yaml: # # .clang-tidy # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # --- Checks: > bugprone-*, cert-*, clang-analyzer-*, clang-diagnostic-*, cppcoreguidelines-*, google-*, misc-*, openmp-*, performance-*, portability-*, readability-*, -bugprone-easily-swappable-parameters, -bugprone-exception-escape, -bugprone-narrowing-conversions, -cppcoreguidelines-avoid-magic-numbers, -cppcoreguidelines-narrowing-conversions, -cppcoreguidelines-pro-bounds-constant-array-index, -cppcoreguidelines-pro-bounds-pointer-arithmetic, -misc-no-recursion, -readability-identifier-length, -readability-magic-numbers CheckOptions: - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic value: 1 FormatStyle: file HeaderFilterRegex: '.*' WarningsAsErrors: '*' ================================================ FILE: .devcontainer/devcontainer.json ================================================ { "name": "RVO2-3D", "customizations": { "vscode": { "extensions": [ "bazelbuild.vscode-bazel", "editorconfig.editorconfig", "ms-vscode.cmake-tools", "ms-vscode.cpptools", "ms-vscode.vscode-markdown-notebook", "ms-vscode-remote.remote-containers", "redhat.vscode-yaml" ], "settings": { "cmake.buildDirectory": "${workspaceFolder}/_build", "cmake.preferredGenerators": [ "Ninja Multi-Config", "Ninja" ] } } }, "containerUser": "ubuntu", "dockerComposeFile": "../compose.yaml", "overrideCommand": true, "service": "dev", "workspaceFolder": "/workspace" } ================================================ FILE: .devcontainer/devcontainer.json.license ================================================ devcontainer.json RVO2-3D Library SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Please send all bug reports to . The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: .dockerignore ================================================ # -*- mode: gitignore; -*- # vi: set ft=gitignore: # # .dockerignore # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # _build/ .idea/ .user.bazelrc bazel-* cmake-build-*/ CMakeUserPresets.json ================================================ FILE: .editorconfig ================================================ # -*- mode: editorconfig; -*- # vi: set ft=editorconfig: # # .editorconfig # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # root = true [*] charset = utf-8 end_of_line = lf indent_size = 2 indent_style = space insert_final_newline = true max_line_length = 80 trim_trailing_whitespace = true [*.bazel] indent_size = 4 [*.md] trim_trailing_whitespace = false [.bazelignore] indent_size = 4 [.bazelrc] indent_size = 4 [Brewfile] indent_size = 4 [dep5] indent_size = 1 ================================================ FILE: .gitattributes ================================================ # -*- mode: gitattributes; -*- # vi: set ft=gitattributes: # # .gitattributes # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # [attr]whitespace-0 whitespace=tab-in-indent,trailing-space [attr]whitespace-1 whitespace=tab-in-indent,tabwidth=1,trailing-space [attr]whitespace-2 whitespace=tab-in-indent,tabwidth=2,trailing-space [attr]whitespace-4 whitespace=tab-in-indent,tabwidth=4,trailing-space [attr]whitespace-md whitespace=-blank-at-eol,blank-at-eof,tab-in-indent * text=auto *.bazel text diff=python linguist-language=starlark whitespace-4 *.cc text diff=cpp linguist-language=c++ whitespace-2 *.cff text linguist-documentation whitespace-2 *.cfg text whitespace-2 *.cmake text whitespace-2 *.cmake.in text whitespace-2 *.css text diff=css linguist-documentation whitespace=trailing-space *.h text diff=cpp linguist-language=c++ whitespace-2 *.html text diff=html linguist-documentation whitespace=trailing-space *.imp text linguist-language=json whitespace-2 *.json text whitespace-2 *.license text linguist-documentation whitespace-0 *.md text diff=markdown whitespace-md *.pc.in text whitespace-2 *.txt text *.xml text *.yaml text whitespace-2 *.yml text whitespace-2 .bazelignore text whitespace-4 .bazelrc text whitespace-4 .bazelversion text whitespace-4 .clang-format text whitespace-2 .clang-tidy text whitespace-2 .dockerignore text whitespace-2 .editorconfig text whitespace-2 .gitattributes text export-ignore whitespace-2 .gitignore text export-ignore whitespace-2 .zenodo.json export-ignore linguist-documentation Brewfile text diff=ruby export-ignore whitespace-4 CMakeLists.txt whitespace-2 CODEOWNERS text whitespace-2 dep5 text linguist-documentation whitespace-1 Dockerfile text whitespace-2 LICENSE text linguist-documentation linguist-vendored whitespace-0 README.md linguist-documentation requirements.txt whitespace-2 triggers whitespace-0 .github/** export-ignore .github/**/*.md linguist-documentation LICENSES/**/*.txt linguist-documentation linguist-vendored whitespace-0 ================================================ FILE: .github/CODEOWNERS ================================================ # -*- mode: gitignore; -*- # vi: set ft=gitignore: # # CODEOWNERS # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # * @snape ================================================ FILE: .github/CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards Examples of behavior that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. ## Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ### 2. Warning **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at . Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). For answers to common questions about this code of conduct, see the FAQ at . Translations are available at . ================================================ FILE: .github/SECURITY.md ================================================ # Security Policy ## Supported Versions The current release will be supported with security updates when practical. ## Reporting a Vulnerability Please send all vulnerability reports to [geom@cs.unc.edu](mailto:geom@cs.unc.edu). The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: .github/SUPPORT.md ================================================ # Support Resources Please send all bug reports to [geom@cs.unc.edu](mailto:geom@cs.unc.edu). The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: .github/workflows/ci.yml ================================================ # # ci.yml # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # --- name: ci on: # yamllint disable-line rule:truthy push: branches: - main pull_request: branches: - main schedule: - cron: '0 5 * * *' jobs: bazel-almalinux: name: bazel almalinux amd64 runs-on: ubuntu-latest container: almalinux:10 steps: - name: setup run: | dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) dnf upgrade -q -y dnf install -q -y \ ca-certificates \ gcc-c++ \ git \ python3 \ wget \ which dnf clean all rm -rf /var/cache/yum wget -qO /usr/local/bin/bazelisk \ https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 chmod +x /usr/local/bin/bazelisk ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: bazel test --flaky_test_attempts=3 ... shell: bash bazel-alpine: name: bazel alpine linux amd64 runs-on: ubuntu-latest container: alpine:3 steps: - name: setup run: | apk upgrade -q --no-cache apk add -q --no-cache \ ca-certificates \ g++ \ git \ libc6-compat \ python3 \ wget \ which wget -qO /usr/local/bin/bazelisk \ https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 chmod +x /usr/local/bin/bazelisk ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel shell: sh - name: checkout uses: actions/checkout@v6 # - name: build test package # run: bazel test --flaky_test_attempts=3 ... # shell: sh bazel-arch: name: bazel arch linux amd64 runs-on: ubuntu-latest container: archlinux:latest steps: - name: setup run: | pacman --needed --noconfirm --noprogressbar -S -u -y \ ca-certificates \ gcc \ git \ python \ wget \ which rm -rf \ /var/cache/pacman/pkg/* \ /var/lib/pacman/sync/* wget -qO /usr/local/bin/bazelisk \ https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 chmod +x /usr/local/bin/bazelisk ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: bazel test --flaky_test_attempts=3 ... shell: bash bazel-fedora: name: bazel fedora linux amd64 runs-on: ubuntu-latest container: fedora:44 steps: - name: setup run: | dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) dnf upgrade -q -y dnf install -q -y \ ca-certificates \ gcc-c++ \ git \ python3 \ wget \ which dnf clean all rm -rf /var/cache/yum wget -qO /usr/local/bin/bazelisk \ https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 chmod +x /usr/local/bin/bazelisk ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: bazel test --flaky_test_attempts=3 ... shell: bash bazel-macos: name: bazel macos arm64 runs-on: macos-15 steps: - name: checkout uses: actions/checkout@v6 - name: setup run: | brew update -q brew bundle install -q brew cleanup -q -s rm -rf $(brew --cache) env: HOMEBREW_NO_ANALYTICS: 1 HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1 shell: zsh -efuo pipefail {0} - name: build test package run: bazel test --flaky_test_attempts=3 ... shell: zsh -efuo pipefail {0} bazel-opensuse: name: bazel opensuse leap amd64 runs-on: ubuntu-latest container: opensuse/leap:16.0 steps: - name: setup run: | zypper -n -q ref || (sleep 15; zypper -n -q ref) zypper -n -q up zypper -n -q in --no-recommends \ ca-certificates \ gcc-c++ \ git \ python3 \ wget \ which zypper -n -q cc -a wget -qO /usr/local/bin/bazelisk \ https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 chmod +x /usr/local/bin/bazelisk ln -s /usr/local/bin/bazelisk /usr/local/bin/bazel shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: bazel test --flaky_test_attempts=3 ... shell: bash bazel-ubuntu: name: bazel ubuntu amd64 runs-on: ubuntu-latest container: ubuntu:24.04 steps: - name: setup run: | apt-get -qq -o APT::Acquire::Retries=4 update \ || (sleep 15; apt-get -qq -o APT::Acquire::Retries=4 update) apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ upgrade apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ --no-install-recommends install \ ca-certificates \ g++ \ git \ python-is-python3 \ wget apt-get -qq -o Dpkg::Use-Pty=0 autoremove rm -rf /var/lib/apt/lists/* wget -q https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-amd64.deb dpkg -i bazelisk-amd64.deb rm -rf bazelisk-amd64.deb env: DEBIAN_FRONTEND: noninteractive shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: bazel test --flaky_test_attempts=3 ... shell: bash bazel-ubuntu-arm64: name: bazel ubuntu arm64 runs-on: ubuntu-24.04-arm container: ubuntu:24.04 steps: - name: setup run: | apt-get -qq -o APT::Acquire::Retries=4 update \ || (sleep 15; apt-get -qq -o APT::Acquire::Retries=4 update) apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ upgrade apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ --no-install-recommends install \ ca-certificates \ g++ \ git \ python-is-python3 \ wget apt-get -qq -o Dpkg::Use-Pty=0 autoremove rm -rf /var/lib/apt/lists/* wget -q https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-arm64.deb dpkg -i bazelisk-arm64.deb rm -rf bazelisk-arm64.deb env: DEBIAN_FRONTEND: noninteractive shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: bazel test --flaky_test_attempts=3 ... shell: bash cmake-almalinux: name: cmake almalinux amd64 runs-on: ubuntu-latest container: almalinux:10 steps: - name: setup run: | dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) dnf upgrade -q -y dnf install -q -y \ ca-certificates \ cmake \ dnf-plugins-core \ gcc-c++ \ git \ glibc-langpack-en \ graphviz \ make \ pkgconf-pkg-config \ rpm-build dnf config-manager --set-enabled crb dnf install -q -y doxygen dnf clean all rm -rf /var/cache/yum shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: | mkdir _build cd _build cmake \ -DBUILD_DOCUMENTATION:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=install \ -DENABLE_HARDENING:BOOL=ON \ -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ -DENABLE_OPENMP:BOOL=ON \ -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ -DWARNINGS_AS_ERRORS:BOOL=ON \ --warn-uninitialized \ .. cmake --build . ctest . --repeat after-timeout:3 cmake --install . cpack -G RPM cpack -G RPM --config CPackSourceConfig.cmake shell: bash cmake-alpine: name: cmake alpine linux amd64 runs-on: ubuntu-latest container: alpine:3 steps: - name: setup run: | apk upgrade -q --no-cache apk add -q --no-cache \ ca-certificates \ cmake \ doxygen \ g++ \ git \ graphviz \ make \ pkgconf shell: sh - name: checkout uses: actions/checkout@v6 - name: build test package run: | mkdir _build cd _build cmake \ -DBUILD_DOCUMENTATION:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=install \ -DENABLE_HARDENING:BOOL=ON \ -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ -DENABLE_OPENMP:BOOL=ON \ -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ -DWARNINGS_AS_ERRORS:BOOL=ON \ --warn-uninitialized \ .. cmake --build . ctest . --repeat after-timeout:3 cmake --install . cpack -G TGZ cpack -G TGZ --config CPackSourceConfig.cmake shell: sh cmake-arch: name: cmake arch linux amd64 runs-on: ubuntu-latest container: archlinux:latest steps: - name: setup run: | pacman --needed --noconfirm --noprogressbar -S -u -y \ ca-certificates \ cmake \ doxygen \ gcc \ git \ graphviz \ make \ pkgconf rm -rf \ /var/cache/pacman/pkg/* \ /var/lib/pacman/sync/* shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: | mkdir _build cd _build cmake \ -DBUILD_DOCUMENTATION:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=install \ -DENABLE_HARDENING:BOOL=ON \ -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ -DENABLE_OPENMP:BOOL=ON \ -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ -DWARNINGS_AS_ERRORS:BOOL=ON \ --warn-uninitialized \ .. cmake --build . ctest . --repeat after-timeout:3 cmake --install . cpack -G TGZ cpack -G TGZ --config CPackSourceConfig.cmake shell: bash cmake-fedora: name: cmake fedora linux amd64 runs-on: ubuntu-latest container: fedora:44 steps: - name: setup run: | dnf makecache -q --refresh || (sleep 15; dnf makecache -q --refresh) dnf upgrade -q -y dnf install -q -y \ ca-certificates \ cmake \ doxygen \ gcc-c++ \ git \ glibc-langpack-en \ graphviz \ make \ pkgconf-pkg-config \ rpm-build dnf clean all rm -rf /var/cache/yum shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: | mkdir _build cd _build cmake \ -DBUILD_DOCUMENTATION:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=install \ -DENABLE_HARDENING:BOOL=ON \ -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ -DENABLE_OPENMP:BOOL=ON \ -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ -DWARNINGS_AS_ERRORS:BOOL=ON \ --warn-uninitialized \ .. cmake --build . ctest . --repeat after-timeout:3 cmake --install . cpack -G RPM cpack -G RPM --config CPackSourceConfig.cmake shell: bash cmake-macos: name: cmake macos arm64 runs-on: macos-15 steps: - name: checkout uses: actions/checkout@v6 - name: setup run: | brew update -q brew bundle install -q brew cleanup -q -s rm -rf $(brew --cache) env: HOMEBREW_NO_ANALYTICS: 1 HOMEBREW_NO_AUTO_UPDATE: 1 HOMEBREW_NO_INSTALL_CLEANUP: 1 shell: zsh -efuo pipefail {0} - name: build test package run: | mkdir _build cd _build cmake \ -DBUILD_DOCUMENTATION:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=install \ -DENABLE_HARDENING:BOOL=ON \ -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ -DENABLE_OPENMP:BOOL=OFF \ -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ -DWARNINGS_AS_ERRORS:BOOL=ON \ --warn-uninitialized \ .. cmake --build . ctest . --repeat after-timeout:3 cmake --install . cpack -G TGZ cpack -G TGZ --config CPackSourceConfig.cmake shell: zsh -efuo pipefail {0} cmake-opensuse: name: cmake opensuse leap amd64 runs-on: ubuntu-latest container: opensuse/leap:16.0 steps: - name: setup run: | zypper -n -q ref || (sleep 15; zypper -n -q ref) zypper -n -q up zypper -n -q in --no-recommends \ ca-certificates \ cmake \ doxygen \ gcc-c++ \ git \ graphviz \ make \ pkgconf \ rpm-build zypper -n -q cc -a shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: | mkdir _build cd _build cmake \ -DBUILD_DOCUMENTATION:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=install \ -DENABLE_HARDENING:BOOL=ON \ -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ -DENABLE_OPENMP:BOOL=ON \ -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ -DWARNINGS_AS_ERRORS:BOOL=ON \ --warn-uninitialized \ .. cmake --build . ctest . --repeat after-timeout:3 cmake --install . cpack -G RPM cpack -G RPM --config CPackSourceConfig.cmake shell: bash cmake-ubuntu: name: cmake ubuntu amd64 runs-on: ubuntu-latest container: ubuntu:24.04 steps: - name: setup run: | apt-get -qq -o APT::Acquire::Retries=4 update \ || (sleep 15; apt-get -qq -o APT::Acquire::Retries=4 update) apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ upgrade apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ --no-install-recommends install \ ca-certificates \ cmake \ doxygen \ dpkg-dev \ file \ g++ \ git \ graphviz \ make \ pkgconf apt-get -qq -o Dpkg::Use-Pty=0 autoremove rm -rf /var/lib/apt/lists/* env: DEBIAN_FRONTEND: noninteractive shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: | mkdir _build cd _build cmake \ -DBUILD_DOCUMENTATION:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=install \ -DENABLE_HARDENING:BOOL=ON \ -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ -DENABLE_OPENMP:BOOL=ON \ -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ -DWARNINGS_AS_ERRORS:BOOL=ON \ --warn-uninitialized \ .. cmake --build . ctest . --repeat after-timeout:3 cmake --install . cpack -G DEB cpack -G DEB --config CPackSourceConfig.cmake shell: bash cmake-ubuntu-arm64: name: cmake ubuntu arm64 runs-on: ubuntu-24.04-arm container: ubuntu:24.04 steps: - name: setup run: | apt-get -qq -o APT::Acquire::Retries=4 update \ || (sleep 15; apt-get -qq -o APT::Acquire::Retries=4 update) apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ upgrade apt-get -qq -o APT::Acquire::Retries=4 -o Dpkg::Use-Pty=0 \ --no-install-recommends install \ ca-certificates \ cmake \ doxygen \ dpkg-dev \ file \ g++ \ git \ graphviz \ make \ pkgconf apt-get -qq -o Dpkg::Use-Pty=0 autoremove rm -rf /var/lib/apt/lists/* env: DEBIAN_FRONTEND: noninteractive shell: bash - name: checkout uses: actions/checkout@v6 - name: build test package run: | mkdir _build cd _build cmake \ -DBUILD_DOCUMENTATION:BOOL=ON \ -DBUILD_TESTING:BOOL=ON \ -DCMAKE_INSTALL_PREFIX:PATH=install \ -DENABLE_HARDENING:BOOL=ON \ -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON \ -DENABLE_OPENMP:BOOL=ON \ -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF \ -DWARNINGS_AS_ERRORS:BOOL=ON \ --warn-uninitialized \ .. cmake --build . ctest . --repeat after-timeout:3 cmake --install . cpack -G DEB cpack -G DEB --config CPackSourceConfig.cmake shell: bash cmake-windows: name: cmake windows amd64 runs-on: windows-latest steps: - name: checkout uses: actions/checkout@v6 - name: setup run: | choco upgrade cmake.install -r -y --install-arguments=ADD_CMAKE_TO_PATH=System ` --no-progress shell: pwsh - name: build test package run: | mkdir _build cd _build cmake ` -DBUILD_DOCUMENTATION:BOOL=ON ` -DBUILD_TESTING:BOOL=ON ` -DCMAKE_INSTALL_PREFIX:PATH=install ` -DENABLE_HARDENING:BOOL=ON ` -DENABLE_INTERPROCEDURAL_OPTIMIZATION:BOOL=ON ` -DENABLE_OPENMP:BOOL=OFF ` -DOUTPUT_TIME_AND_POSITIONS:BOOL=OFF ` -DWARNINGS_AS_ERRORS:BOOL=ON ` --warn-uninitialized ` .. cmake --build . --config Release ctest . --build-config Release --repeat after-timeout:3 cmake --install . cpack -C Release -G ZIP cpack -C Release -G ZIP --config CPackSourceConfig.cmake shell: pwsh ================================================ FILE: .github/workflows/codeql.yml ================================================ # # codeql.yml # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # --- name: codeql on: # yamllint disable-line rule:truthy push: branches: - main pull_request: branches: - main schedule: - cron: '0 6 * * 3' jobs: analyze: name: analyze runs-on: ubuntu-latest steps: - name: checkout uses: actions/checkout@v6 - name: initialize codeql uses: github/codeql-action/init@v4 with: languages: cpp - name: autobuild uses: github/codeql-action/autobuild@v4 - name: perform codeql analysis uses: github/codeql-action/analyze@v4 ================================================ FILE: .gitignore ================================================ # -*- mode: gitignore; -*- # vi: set ft=gitignore: # # .gitignore # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # /_build/ /.idea/ /.user.bazelrc /.venv/ /bazel-* /cmake-build-*/ /CMakeUserPresets.json /MODULE.bazel.lock ================================================ FILE: .pre-commit-config.yaml ================================================ --- repos: - repo: https://codeberg.org/fsfe/reuse-tool rev: v6.2.0 hooks: - id: reuse-lint-file - repo: https://github.com/adrienverge/yamllint rev: v1.38.0 hooks: - id: yamllint args: - --format - parsable - repo: https://github.com/codespell-project/codespell rev: v2.4.2 hooks: - id: codespell - repo: https://github.com/pocc/pre-commit-hooks rev: master hooks: - id: clang-format entry: >- sh -c 'set -eu; if [ "$(uname -s)" = Darwin ]; then PATH="/opt/homebrew/opt/llvm/bin:${PATH}"; fi; exec clang-format-hook "$@"' -- - id: cpplint - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: - id: check-case-conflict - id: check-json - id: check-merge-conflict - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace exclude: (?i)\.(markdown|md)$ - repo: https://github.com/rhysd/actionlint rev: v1.7.12 hooks: - id: actionlint args: - -oneline ================================================ FILE: .vscode/extensions.json ================================================ { "recommendations": [ "bazelbuild.vscode-bazel", "editorconfig.editorconfig", "ms-vscode.cmake-tools", "ms-vscode.cpptools", "ms-vscode.vscode-markdown-notebook", "ms-vscode-remote.remote-containers", "redhat.vscode-yaml" ] } ================================================ FILE: .vscode/extensions.json.license ================================================ extensions.json RVO2-3D Library SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Please send all bug reports to . The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: .vscode/settings.json ================================================ { "cmake.buildDirectory": "${workspaceFolder}/_build", "cmake.preferredGenerators": [ "Ninja Multi-Config", "Ninja" ] } ================================================ FILE: .vscode/settings.json.license ================================================ settings.json RVO2-3D Library SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Please send all bug reports to . The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: .yamllint.yaml ================================================ # # .yamllint.yaml # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # --- extends: default rules: line-length: max: 80 level: warning ================================================ FILE: .zenodo.json ================================================ { "upload_type": "software", "title": "Optimal Reciprocal Collision Avoidance in Three Dimensions", "creators": [ { "name": "Van den Berg, Jur", "affiliation": "University of North Carolina at Chapel Hill" }, { "name": "Guy, Stephen J.", "affiliation": "University of North Carolina at Chapel Hill", "orcid": "0000-0001-8986-5817" }, { "name": "Snape, Jamie", "affiliation": "University of North Carolina at Chapel Hill", "orcid": "0000-0002-3326-9765" }, { "name": "Lin, Ming C.", "affiliation": "University of North Carolina at Chapel Hill", "orcid": "0000-0003-3736-6949" }, { "name": "Manocha, Dinesh", "affiliation": "University of North Carolina at Chapel Hill", "orcid": "0000-0001-7047-9801" } ], "description": "We present a formal approach to reciprocal collision avoidance, where multiple independent mobile robots or agents need to avoid collisions with each other without communication among agents while moving in a common workspace. Our formulation, optimal reciprocal collision avoidance (ORCA), provides sufficient conditions for collision-free motion by letting each agent take half of the responsibility of avoiding pairwise collisions. Selecting the optimal action for each agent is reduced to solving a low-dimensional linear program, and we prove that the resulting motions are smooth. We test our optimal reciprocal collision avoidance approach on several dense and complex simulation scenarios workspaces involving thousands of agents, and compute collision-free actions for all of them in only a few milliseconds. RVO2-3D Library is an open-source C++98 implementation of our algorithm in three dimensions. It has a simple API for third-party applications. The user specifies agents and their preferred velocities. The simulation is performed step-by-step via a simple call to the library. The simulation is fully accessible and manipulable during runtime. The library exploits multiple processors if they are available using OpenMP for efficient parallelization of the simulation.", "access_right": "open", "license": { "id": "Apache-2.0", "title": "Apache License 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0" }, "keywords": [ "collision avoidance", "mobile robots", "motion planning", "multi-robot systems", "navigation" ], "grants": [ { "id": "10.13039/100000001::0636208" }, { "id": "10.13039/100000001::0917040" }, { "id": "10.13039/100000001::0904990" } ] } ================================================ FILE: .zenodo.json.license ================================================ .zenodo.json RVO2-3D Library SPDX-FileCopyrightText: No Copyright SPDX-License-Identifier: CC0-1.0 CC0 1.0 Universal Public Domain Dedication No Copyright The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. See Other Information below. Other Information: * In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights. * Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. * When using or citing the work, you should not imply endorsement by the author or the affirmer. Please send all bug reports to . The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: BUILD.bazel ================================================ # -*- mode: bazel; -*- # vi: set ft=bazel: # # BUILD.bazel # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # load("@rules_cc//cc:defs.bzl", "cc_shared_library") load("@rules_license//rules:license.bzl", "license") load("@rules_license//rules:package_info.bzl", "package_info") load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files") load("@rules_pkg//pkg:pkg.bzl", "pkg_deb", "pkg_tar") package(default_package_metadata = [ ":license", ":package_info", ]) license( name = "license", copyright_notice = "2008 University of North Carolina at Chapel Hill", license_kinds = ["@rules_license//licenses/spdx:Apache-2.0"], license_text = "LICENSE", visibility = ["//:__subpackages__"], ) package_info( name = "package_info", package_name = "RVO2-3D Library", package_url = "https://gamma.cs.unc.edu/RVO2/", package_version = "1.1.0", visibility = ["//:__subpackages__"], ) exports_files( ["LICENSE"], visibility = ["//visibility:public"], ) pkg_files( name = "doc", srcs = ["LICENSE"], attributes = pkg_attributes(mode = "0644"), prefix = "usr/share/doc/RVO3D", ) cc_shared_library( name = "RVO3D", visibility = ["//visibility:public"], deps = ["//src:RVO3D"], ) pkg_files( name = "lib", srcs = [":RVO3D"], attributes = pkg_attributes(mode = "0644"), prefix = "usr/lib", ) genrule( name = "rvo3d_cps", outs = ["RVO3D.cps"], cmd = """ cat << 'EOF' > $@ { "compat_version": "1", "components": { "RVO3D": { "includes": ["@prefix@/include/RVO3D"], "type": "dylib" } }, "cps_path": "@prefix@/lib/cps/RVO3D", "cps_version": "0.14.1", "default_components": ["RVO3D"], "description": "Optimal Reciprocal Collision Avoidance in Three Dimensions", "license": "Apache-2.0", "name": "RVO3D", "version": "1.1.0", "version_schema": "simple", "website": "https://gamma.cs.unc.edu/RVO2/" } EOF """, ) genrule( name = "rvo3d_release_cps", outs = ["RVO3D@release.cps"], cmd = select({ "@platforms//os:macos": """ cat << 'EOF' > $@ { "components": { "RVO3D": { "location": "@prefix@/lib/libRVO3D.dylib" } }, "configuration": "Release", "name": "RVO3D" } EOF """, "@platforms//os:windows": """ cat << 'EOF' > $@ { "components": { "RVO3D": { "location": "@prefix@/lib/RVO3D.dll" } }, "configuration": "Release", "name": "RVO3D" } EOF """, "//conditions:default": """ cat << 'EOF' > $@ { "components": { "RVO3D": { "location": "@prefix@/lib/libRVO3D.so" } }, "configuration": "Release", "name": "RVO3D" } EOF """, }), ) pkg_files( name = "cps", srcs = [ "RVO3D.cps", "RVO3D@release.cps", ], attributes = pkg_attributes(mode = "0644"), prefix = "usr/lib/cps/RVO3D", ) # REUSE-IgnoreStart genrule( name = "rvo3d_pc", outs = ["RVO3D.pc"], cmd = """ cat << 'EOF' > $@ # # RVO3D.pc # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # prefix=/usr exec_prefix=$${prefix} libdir=$${exec_prefix}/lib includedir=$${prefix}/include/RVO3D Name: RVO2-3D Library Description: Optimal Reciprocal Collision Avoidance in Three Dimensions URL: https://gamma.cs.unc.edu/RVO2/ Version: 1.1.0 Libs: -L$${libdir} -lRVO3D Cflags: -I$${includedir} EOF """, ) # REUSE-IgnoreEnd pkg_files( name = "pkgconfig", srcs = ["RVO3D.pc"], attributes = pkg_attributes(mode = "0644"), prefix = "usr/lib/pkgconfig", ) pkg_tar( name = "tar", srcs = [ ":cps", ":doc", ":lib", ":pkgconfig", "//src:include", ], extension = "tar.gz", ) pkg_deb( name = "deb", architecture = select( { "@platforms//cpu:aarch64": "arm64", "@platforms//cpu:x86_64": "amd64", }, no_match_error = "Unsupported CPU for //:deb. Supported CPUs: aarch64, x86_64.", ), data = ":tar", depends = [ "libc6", "libgcc-s1", "libstdc++6", ], description = "Optimal Reciprocal Collision Avoidance in Three Dimensions", homepage = "https://gamma.cs.unc.edu/RVO2/", license = "Apache-2", maintainer = "Jamie Snape", package = "rvo3d", priority = "optional", section = "contrib/libdevel", target_compatible_with = ["@platforms//os:linux"], triggers = "triggers", version = "1.1.0", ) ================================================ FILE: Brewfile ================================================ # -*- mode: ruby; -*- # vi: set ft=ruby: # # Brewfile # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # brew 'bazelisk', conflicts_with: ['bazel'] brew 'buildifier' brew 'buildozer' brew 'cmake' brew 'cppcheck' brew 'cpplint' brew 'doxygen' brew 'gcc' brew 'git' brew 'graphviz' brew 'include-what-you-use' brew 'jsonlint' brew 'lcov' brew 'llvm' brew 'markdownlint-cli' brew 'ninja' brew 'pkgconf', conflicts_with: ['pkg-config'] brew 'python' brew 'yamllint' ================================================ FILE: CITATION.cff ================================================ # -*- mode: yaml; -*- # vi: set ft=yaml: # # CITATION.cff # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: CC-BY-SA-4.0 # # Creative Commons Attribution-ShareAlike 4.0 International Public License # # You are free to: # # * Share -- copy and redistribute the material in any medium or format # # * ShareAlike -- If you remix, transform, or build upon the material, you must # distribute your contributions under the same license as the original # # * Adapt -- remix, transform, and build upon the material for any purpose, even # commercially. # # The licensor cannot revoke these freedoms as long as you follow the license # terms. # # Under the following terms: # # * Attribution -- You must give appropriate credit, provide a link to the # license, and indicate if changes were made. You may do so in any reasonable # manner, but not in any way that suggests the licensor endorses you or your # use. # # * No additional restrictions -- You may not apply legal terms or technological # measures that legally restrict others from doing anything the license # permits. # # Notices: # # * You do not have to comply with the license for elements of the material in # the public domain or where your use is permitted by an applicable exception # or limitation. # # * No warranties are given. The license may not give you all of the permissions # necessary for your intended use. For example, other rights such as # publicity, privacy, or moral rights may limit how you use the material. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # --- cff-version: 1.2.0 abstract: >- We present a formal approach to reciprocal collision avoidance, where multiple independent mobile robots or agents need to avoid collisions with each other without communication among agents while moving in a common workspace. Our formulation, optimal reciprocal collision avoidance (ORCA), provides sufficient conditions for collision-free motion by letting each agent take half of the responsibility of avoiding pairwise collisions. Selecting the optimal action for each agent is reduced to solving a low-dimensional linear program, and we prove that the resulting motions are smooth. We test our optimal reciprocal collision avoidance approach on several dense and complex simulation scenarios workspaces involving thousands of agents, and compute collision-free actions for all of them in only a few milliseconds. RVO2-3D Library is an open-source C++98 implementation of our algorithm in three dimensions. It has a simple API for third-party applications. The user specifies agents and their preferred velocities. The simulation is performed step-by-step via a simple call to the library. The simulation is fully accessible and manipulable during runtime. The library exploits multiple processors if they are available using OpenMP for efficient parallelization of the simulation. authors: - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Berg given-names: Jur name-particle: 'van den' post-code: 27599 region: NC - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Guy given-names: 'Stephen J.' orcid: 'https://orcid.org/0000-0001-8986-5817' post-code: 27599 region: NC website: 'https://www-users.cse.umn.edu/~sjguy/' - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Snape given-names: Jamie orcid: 'https://orcid.org/0000-0002-3326-9765' post-code: 27599 region: NC website: 'https://www.jamiesnape.io/' - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Lin given-names: 'Ming C.' orcid: 'https://orcid.org/0000-0003-3736-6949' post-code: 27599 region: NC website: 'https://www.cs.umd.edu/people/lin/' - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Manocha given-names: Dinesh orcid: 'https://orcid.org/0000-0001-7047-9801' post-code: 27599 region: NC website: 'https://www.cs.umd.edu/people/dmanocha/' identifiers: - type: doi value: '10.5281/zenodo.7039619' keywords: - 'collision avoidance' - 'mobile robots' - 'motion planning' - 'multi-robot systems' - navigation license: 'Apache-2.0' message: >- If you use this software, please cite it using the metadata from this file and the metadata from 'preferred-citation'. references: - abstract: >- We present a formal approach to reciprocal collision avoidance, where multiple independent mobile robots or agents need to avoid collisions with each other without communication among agents while moving in a common workspace. Our formulation, optimal reciprocal collision avoidance (ORCA), provides sufficient conditions for collision-free motion by letting each agent take half of the responsibility of avoiding pairwise collisions. Selecting the optimal action for each agent is reduced to solving a low-dimensional linear program, and we prove that the resulting motions are smooth. We test our optimal reciprocal collision avoidance approach on several dense and complex simulation scenarios workspaces involving thousands of agents, and compute collision-free actions for all of them in only a few milliseconds. authors: - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Berg given-names: Jur name-particle: 'van den' post-code: 27599 region: NC - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Guy given-names: 'Stephen J.' orcid: 'https://orcid.org/0000-0001-8986-5817' post-code: 27599 region: NC website: 'https://www-users.cse.umn.edu/~sjguy/' - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Lin given-names: 'Ming C.' orcid: 'https://orcid.org/0000-0003-3736-6949' post-code: 27599 region: NC website: 'https://www.cs.umd.edu/people/lin/' - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Manocha given-names: Dinesh orcid: 'https://orcid.org/0000-0001-7047-9801' post-code: 27599 region: NC website: 'https://www.cs.umd.edu/people/dmanocha/' conference: address: 'Hotel Astoria, Pilatusstrasse 29' city: Lucerne country: CH date-end: '2009-09-03' date-start: '2009-08-31' name: '14th International Symposium of Robotics Research (ISRR)' post-code: 6002 contact: - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Guy given-names: 'Stephen J.' orcid: 'https://orcid.org/0000-0001-8986-5817' post-code: 27599 region: NC website: 'https://www-users.cse.umn.edu/~sjguy/' collection-doi: '10.1007/978-3-642-19457-3' collection-title: >- Robotics Research: The 14th International Symposium ISRR collection-type: proceedings copyright: >- Copyright © 2011 Springer Verlag editors: - address: >- Institute of Robotics and Intelligent Systems (IRIS), Autonomous Systems Lab, Leonhardstrasse 21 affiliation: ETH Zürich city: Zürich country: CH family-names: Pradalier given-names: Cédric orcid: 'https://orcid.org/0000-0002-1746-2733' post-code: 8092 - address: >- Institute of Robotics and Intelligent Systems (IRIS), Autonomous Systems Lab, Leonhardstrasse 21 affiliation: ETH Zürich city: Zürich country: CH family-names: Siegwart given-names: Roland orcid: 'https://orcid.org/0000-0002-2760-7983' post-code: 8092 - address: >- Deutsches Zentrum für Luft und Raumfahrt (DLR), Institut für Robotik und Mechatronik, Münchener Straße 20 affiliation: German Aerospace Center city: 'Oberpfaffenhofen-Weßling' country: DE family-names: Hirzinger given-names: Gerhard post-code: 82234 end: 19 identifiers: - type: doi value: '10.1007/978-3-642-19457-3_1' isbn: '978-3-642-19456-6' keywords: - 'collision avoidance' - 'mobile robots' - 'motion planning' - 'multi-robot systems' - navigation publisher: address: 'Tiergartenstraße 17' city: Heidelberg country: DE name: 'Springer Verlag' post-code: 69121 languages: - en month: 5 pages: 17 start: 3 title: 'Reciprocal n-body collision avoidance' type: 'conference-paper' url: 'https://gamma.cs.unc.edu/ORCA/' volume: 70 year: 2011 - abstract: >- We present an algorithm for collision-free navigation of multiple flying robots in three-dimensional workspace. Our approach extends the model of a simple car to a simple-airplane, which has constraints on speed and steering angle and includes a configuration variable for the altitude. We use a locally optimal reciprocal collision avoidance scheme that computes the trajectory without any collisions or oscillations for each airplane independently. In addition, our algorithm explicitly considers the kinematic and dynamic constraints of a simple-airplane and uses the notion of variable reciprocity when choosing velocities to ensure that simple-airplanes that are less constrained take more responsibility for avoiding collisions. We test our approach in two simulations and compute collision-free and oscillation-free trajectories that satisfy the kinematic and dynamic constraints of each simple-airplane. authors: - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Snape given-names: Jamie orcid: 'https://orcid.org/0000-0002-3326-9765' post-code: 27599 region: NC website: 'https://www.jamiesnape.io/' - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Manocha given-names: Dinesh orcid: 'https://orcid.org/0000-0001-7047-9801' post-code: 27599 region: NC website: 'https://www.cs.umd.edu/people/dmanocha/' conference: address: '555 W Fifth Ave, William A. Egan Civic and Convention Center' city: Anchorage country: CH date-end: '2010-05-03' date-start: '2010-05-08' name: >- 2010 IEEE International Conference on Robotics and Automation (ICRA) post-code: 99501 region: AK contact: - address: >- 201 S Columbia St, Frederick P. Brooks, Jr. Computer Science Bldg affiliation: 'University of North Carolina at Chapel Hill' city: 'Chapel Hill' country: US family-names: Snape given-names: Jamie orcid: 'https://orcid.org/0000-0002-3326-9765' post-code: 27599 region: NC website: 'https://www.jamiesnape.io/' collection-doi: '10.1109/ICRA11042.2010' collection-title: >- Proceedings of the 2010 IEEE International Conference on Robotics and Automation (ICRA) collection-type: proceedings copyright: >- Copyright © 2010 Institute of Electrical and Electronics Engineers date-published: '2010-07-15' end: 3980 identifiers: - type: doi value: '10.1109/ROBOT.2010.5509580' isbn: '978-1-4244-5038-1' issn: '1050-4729' keywords: - 'collision avoidance' - 'mobile robots' - 'motion planning' - 'multi-robot systems' - navigation publisher: address: '3 Park Ave 17th Fl' city: 'New York' country: US name: 'Institute of Electrical and Electronics Engineers' post-code: 10016 region: NY languages: - en month: 5 pages: 6 start: 3974 title: 'Navigating Multiple Simple-Airplanes in 3D Workspace' type: 'conference-paper' url: 'https://gamma.cs.unc.edu/S-AIRPLANE/' year: 2010 repository-code: 'https://github.com/snape/RVO2-3D' title: 'Optimal Reciprocal Collision Avoidance in Three Dimensions' type: software url: 'https://gamma.cs.unc.edu/RVO2/' ================================================ FILE: CMakeLists.txt ================================================ # -*- mode: cmake; -*- # vi: set ft=cmake: # # CMakeLists.txt # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # cmake_minimum_required(VERSION 3.26) project(RVO3D VERSION 1.1.0 DESCRIPTION "Optimal Reciprocal Collision Avoidance in Three Dimensions" HOMEPAGE_URL https://gamma.cs.unc.edu/RVO2/ LANGUAGES CXX) if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) # cmake-lint: disable=C0301 set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build; options are Debug Release RelWithDebInfo MinSizeRel" FORCE) set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release RelWithDebInfo MinSizeRel) endif() option(ENABLE_CMAKE_EXPERIMENTAL_FEATURES "Enable CMake experimental features" OFF) include(CTest) if(WIN32) set(BUILD_SHARED_LIBS OFF) else() option(BUILD_SHARED_LIBS "Build all libraries as shared" ${PROJECT_IS_TOP_LEVEL}) endif() include(GNUInstallDirs) set(RVO3D_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) set(RVO3D_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) set(RVO3D_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}) set(RVO3D_LIBRARY RVO3D) set(RVO3D_NAME "RVO2-3D Library") set(CMAKE_CXX_STANDARD 98) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_POSITION_INDEPENDENT_CODE ON) option(BUILD_DOCUMENTATION "Build documentation" OFF) if(BUILD_DOCUMENTATION) find_package(Doxygen 1.9.1 MODULE OPTIONAL_COMPONENTS dot) endif() option(ENABLE_OPENMP "Enable OpenMP if available" OFF) if(ENABLE_OPENMP) find_package(OpenMP MODULE) endif() option(ENABLE_INTERPROCEDURAL_OPTIMIZATION "Enable interprocedural optimization if supported" OFF) if(ENABLE_INTERPROCEDURAL_OPTIMIZATION) include(CheckIPOSupported) check_ipo_supported(RESULT RVO3D_INTERPROCEDURAL_OPTIMIZATION_SUPPORTED LANGUAGES CXX) if(RVO3D_INTERPROCEDURAL_OPTIMIZATION_SUPPORTED) message(STATUS "Interprocedural optimization is supported") else() message(STATUS "Interprocedural optimization is NOT supported") endif() else() set(RVO3D_INTERPROCEDURAL_OPTIMIZATION_SUPPORTED) endif() include(CheckCXXCompilerFlag) include(CheckLinkerFlag) option(ENABLE_HARDENING "Enable hardening compiler and linker flags if supported" ON) if(ENABLE_HARDENING) if(MSVC) check_cxx_compiler_flag(/GS RVO3D_COMPILER_SUPPORTS_GS) check_cxx_compiler_flag(/guard:cf RVO3D_COMPILER_SUPPORTS_GUARD_CF) if(RVO3D_COMPILER_SUPPORTS_GS) add_compile_options(/GS) endif() check_linker_flag(CXX /DYNAMICBASE RVO3D_LINKER_SUPPORTS_DYNAMICBASE) check_linker_flag(CXX /GUARD:CF RVO3D_LINKER_SUPPORTS_GUARD_CF) check_linker_flag(CXX /NXCOMPAT RVO3D_LINKER_SUPPORTS_NXCOMPAT) if(RVO3D_COMPILER_SUPPORTS_GUARD_CF AND RVO3D_LINKER_SUPPORTS_DYNAMICBASE AND RVO3D_LINKER_SUPPORTS_GUARD_CF) add_compile_options(/guard:cf) add_link_options(/DYNAMICBASE /GUARD:CF) endif() if(RVO3D_LINKER_SUPPORTS_NXCOMPAT) add_link_options(/NXCOMPAT) endif() else() if(APPLE) set(RVO3D_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}") check_cxx_compiler_flag(-Werror=unused-command-line-argument RVO3D_COMPILER_SUPPORTS_WERROR_UNUSED_COMMAND_LINE_ARGUMENT) if(RVO3D_COMPILER_SUPPORTS_WERROR_UNUSED_COMMAND_LINE_ARGUMENT) set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror=unused-command-line-argument") endif() endif() check_cxx_compiler_flag(-D_FORTIFY_SOURCE=2 RVO3D_COMPILER_SUPPORTS_D_FORTIFY_SOURCE_2) check_cxx_compiler_flag(-fcf-protection RVO3D_COMPILER_SUPPORTS_FCF_PROTECTION) check_cxx_compiler_flag(-fno-common RVO3D_COMPILER_SUPPORTS_FNO_COMMON) check_cxx_compiler_flag(-fsanitize=safe-stack RVO3D_COMPILER_SUPPORTS_FSANITIZE_SAFE_STACK) check_cxx_compiler_flag(-fstack-clash-protection RVO3D_COMPILER_SUPPORTS_FSTACK_CLASH_PROTECTION) check_cxx_compiler_flag(-fstack-protector-strong RVO3D_COMPILER_SUPPORTS_FSTACK_PROTECTOR_STRONG) if(RVO3D_COMPILER_SUPPORTS_FSTACK_PROTECTOR_STRONG) set(RVO3D_COMPILER_SUPPORTS_FSTACK_PROTECTOR) else() check_cxx_compiler_flag(-fstack-protector RVO3D_COMPILER_SUPPORTS_FSTACK_PROTECTOR) endif() if(RVO3D_COMPILER_SUPPORTS_D_FORTIFY_SOURCE_2) add_compile_options($<$>:-D_FORTIFY_SOURCE=2>) endif() if(RVO3D_COMPILER_SUPPORTS_FCF_PROTECTION) add_compile_options(-fcf-protection) endif() if(RVO3D_COMPILER_SUPPORTS_FNO_COMMON) add_compile_options(-fno-common) endif() if(RVO3D_COMPILER_SUPPORTS_FSTACK_CLASH_PROTECTION) add_compile_options(-fstack-clash-protection) endif() if(RVO3D_COMPILER_SUPPORTS_FSTACK_PROTECTOR_STRONG) add_compile_options(-fstack-protector-strong) elseif(RVO3D_COMPILER_SUPPORTS_FSTACK_PROTECTOR) add_compile_options(-fstack-protector) endif() check_linker_flag(CXX -Wl,-Bsymbolic-functions RVO3D_LINKER_SUPPORTS_BSYMBOLIC_FUNCTIONS) check_linker_flag(CXX -fsanitize=safe-stack RVO3D_LINKER_SUPPORTS_FSANITIZE_SAFE_STACK) check_linker_flag(CXX -Wl,-z,defs RVO3D_LINKER_SUPPORTS_Z_DEFS) check_linker_flag(CXX -Wl,-z,noexecheap RVO3D_LINKER_SUPPORTS_Z_NOEXECHEAP) check_linker_flag(CXX -Wl,-z,noexecstack RVO3D_LINKER_SUPPORTS_Z_NOEXECSTACK) check_linker_flag(CXX -Wl,-z,now RVO3D_LINKER_SUPPORTS_Z_NOW) check_linker_flag(CXX -Wl,-z,relro RVO3D_LINKER_SUPPORTS_Z_RELRO) check_linker_flag(CXX -Wl,-z,separate-code RVO3D_LINKER_SUPPORTS_Z_SEPARATE_CODE) if(RVO3D_LINKER_SUPPORTS_BSYMBOLIC_FUNCTIONS) add_link_options($<$>:-Wl,-Bsymbolic-functions>) endif() if(RVO3D_COMPILER_SUPPORTS_FSANITIZE_SAFE_STACK AND RVO3D_LINKER_SUPPORTS_FSANITIZE_SAFE_STACK) add_compile_options($<$>:-fsanitize=safe-stack>) add_link_options($<$>:-fsanitize=safe-stack>) endif() if(RVO3D_LINKER_SUPPORTS_Z_DEFS) add_link_options(-Wl,-z,defs) endif() if(RVO3D_LINKER_SUPPORTS_Z_NOEXECHEAP) add_link_options(-Wl,-z,noexecheap) endif() if(RVO3D_LINKER_SUPPORTS_Z_NOEXECSTACK) add_link_options(-Wl,-z,noexecstack) endif() if(RVO3D_LINKER_SUPPORTS_Z_NOW) add_link_options(-Wl,-z,now) endif() if(RVO3D_LINKER_SUPPORTS_Z_RELRO) add_link_options(-Wl,-z,relro) endif() if(RVO3D_LINKER_SUPPORTS_Z_SEPARATE_CODE) add_link_options(-Wl,-z,separate-code) endif() if(APPLE) set(CMAKE_REQUIRED_FLAGS "${RVO3D_REQUIRED_FLAGS}") unset(RVO3D_REQUIRED_FLAGS) endif() endif() endif() if(MSVC) check_cxx_compiler_flag(/W4 RVO3D_COMPILER_SUPPORTS_W4) if(RVO3D_COMPILER_SUPPORTS_W4) add_compile_options(/W4) endif() else() check_cxx_compiler_flag(-Wall RVO3D_COMPILER_SUPPORTS_WALL) check_cxx_compiler_flag(-Wformat-security RVO3D_COMPILER_SUPPORTS_WFORMAT_SECURITY) check_cxx_compiler_flag(-Werror=format-security RVO3D_COMPILER_SUPPORTS_WERROR_FORMAT_SECURITY) if(RVO3D_COMPILER_SUPPORTS_WALL) add_compile_options(-Wall) endif() if(RVO3D_COMPILER_SUPPORTS_WFORMAT_SECURITY) add_compile_options(-Wformat-security) endif() if(RVO3D_COMPILER_SUPPORTS_WERROR_FORMAT_SECURITY) add_compile_options(-Werror=format-security) endif() endif() if(NOT MSVC) check_linker_flag(CXX -Wl,--as-needed RVO3D_LINKER_SUPPORTS__AS_NEEDED) if(RVO3D_LINKER_SUPPORTS__AS_NEEDED) add_link_options(-Wl,--as-needed) endif() endif() option(WARNINGS_AS_ERRORS "Turn compiler warnings into errors" OFF) if(WARNINGS_AS_ERRORS) if(MSVC) check_cxx_compiler_flag(/WX RVO3D_COMPILER_SUPPORTS_WX) if(RVO3D_COMPILER_SUPPORTS_WX) add_compile_options(/WX) endif() else() check_cxx_compiler_flag(-Werror RVO3D_COMPILER_SUPPORTS_WERROR) if(RVO3D_COMPILER_SUPPORTS_WERROR) add_compile_options(-Werror) endif() endif() endif() option(ENABLE_INSTALLATION "Enable installation" ${PROJECT_IS_TOP_LEVEL}) add_subdirectory(src) add_subdirectory(examples) add_subdirectory(doc) if(ENABLE_INSTALLATION) install(FILES LICENSE COMPONENT runtime TYPE DOC) include(CMakePackageConfigHelpers) configure_package_config_file( ${PROJECT_NAME}Config.cmake.in ${PROJECT_NAME}Config.cmake INSTALL_DESTINATION ${RVO3D_DIR} PATH_VARS RVO3D_INCLUDE_DIR RVO3D_LIBRARY_DIR) write_basic_package_version_file(${PROJECT_NAME}ConfigVersion.cmake COMPATIBILITY SameMajorVersion) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" COMPONENT development DESTINATION ${RVO3D_DIR}) find_package(PkgConfig MODULE) if(PkgConfig_FOUND) configure_file(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc" COMPONENT development DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) endif() endif() option(ENABLE_PACKAGING "Enable packaging" ${PROJECT_IS_TOP_LEVEL}) if(ENABLE_PACKAGING) include(InstallRequiredSystemLibraries) set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) set(CPACK_PACKAGE_CONTACT "Jamie Snape") set(CPACK_PACKAGE_VENDOR "University of North Carolina at Chapel Hill") set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set(CPACK_STRIP_FILES ON) set(CPACK_SOURCE_IGNORE_FILES _build/ \\\\.git/ \\\\.gitattributes \\\\.github/ \\\\.gitignore bazel- Brewfile) set(CPACK_SOURCE_STRIP_FILES ON) set(CPACK_DEBIAN_COMPRESSION_TYPE zstd) set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/triggers") set(CPACK_DEBIAN_PACKAGE_DEPENDS) set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${PROJECT_HOMEPAGE_URL}) set(CPACK_DEBIAN_PACKAGE_SECTION contrib/libdevel) set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) set(CPACK_FREEBSD_PACKAGE_DEPS) set(CPACK_FREEBSD_PACKAGE_LICENSE APACHE20) set(CPACK_FREEBSD_PACKAGE_WWW ${PROJECT_HOMEPAGE_URL}) set(CPACK_RPM_FILE_NAME RPM-DEFAULT) set(CPACK_RPM_PACKAGE_AUTOREQPROV ON) set(CPACK_RPM_PACKAGE_LICENSE "ASL 2.0") set(CPACK_RPM_PACKAGE_REQUIRES) set(CPACK_RPM_PACKAGE_URL ${PROJECT_HOMEPAGE_URL}) include(CPack) endif() ================================================ FILE: CMakePresets.json ================================================ { "version": 6, "cmakeMinimumRequired": { "major": 3, "minor": 26, "patch": 0 } } ================================================ FILE: CMakePresets.json.license ================================================ CMakePresets.json RVO2-3D Library SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Please send all bug reports to . The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: CPPLINT.cfg ================================================ # -*- mode: ini; -*- # vi: set ft=ini: # # CPPLINT.cfg # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # set noparent filter=-build/header_guard filter=-build/include_what_you_use filter=-whitespace/indent_namespace linelength=80 ================================================ FILE: CTestConfig.cmake ================================================ # # CTestConfig.cmake # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # set(CTEST_PROJECT_NAME RVO2-3D) set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") set(CTEST_DROP_METHOD https) set(CTEST_DROP_SITE my.cdash.org) set(CTEST_DROP_LOCATION "/submit.php?project=${CTEST_PROJECT_NAME}") set(CTEST_DROP_SITE_CDASH ON) ================================================ FILE: Dockerfile ================================================ # syntax=docker.io/docker/dockerfile:1 # # Dockerfile # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # FROM ubuntu:24.04 ARG TARGETARCH LABEL org.opencontainers.image.authors="Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha" LABEL org.opencontainers.image.base.name="docker.io/library/ubuntu:latest" LABEL org.opencontainers.image.description="Optimal Reciprocal Collision Avoidance in Three Dimensions" LABEL org.opencontainers.image.licenses="Apache-2.0" LABEL org.opencontainers.image.source="https://github.com/snape/RVO2-3D/" LABEL org.opencontainers.image.title="RVO2-3D Library" LABEL org.opencontainers.image.url="https://gamma.cs.unc.edu/RVO2/" LABEL org.opencontainers.image.vendor="University of North Carolina at Chapel Hill" LABEL org.opencontainers.image.version="1.1.0" ENV LANG=C.UTF-8 ENV LOGNAME=root ENV USER=root RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get update -qq \ && apt-get install --no-install-recommends -o Dpkg::Use-Pty=0 -qy \ ca-certificates \ clang \ clang-tidy \ cmake \ cmake-format \ cppcheck \ cpplint \ dirmngr \ doxygen \ dpkg-dev \ file \ g++ \ gdb \ git \ gnupg \ graphviz \ iwyu \ jsonlint \ lcov \ lldb \ make \ markdownlint \ nano \ netbase \ ninja-build \ openssh-client \ pkgconf \ python3 \ python3-click \ python3-dateutil \ python3-docopt \ python3-jsonschema \ python3-pip \ python3-pykwalify \ python3-requests \ python3-ruamel.yaml \ python3-venv \ reuse \ strace \ sudo \ valgrind \ yamllint \ && rm -rf /var/lib/apt/lists/* \ && wget -q https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-${TARGETARCH:-amd64}.deb \ && dpkg -i bazelisk-${TARGETARCH:-amd64}.deb \ && rm -rf bazelisk-${TARGETARCH:-amd64}.deb \ && wget -qO /usr/local/bin/buildifier \ https://github.com/bazelbuild/buildtools/releases/latest/download/buildifier-linux-${TARGETARCH:-amd64} \ && wget -qO /usr/local/bin/buildozer \ https://github.com/bazelbuild/buildtools/releases/latest/download/buildozer-linux-${TARGETARCH:-amd64} \ && chmod +x \ /usr/local/bin/buildifier \ /usr/local/bin/buildozer \ && python3 -m venv --system-site-packages /home/ubuntu/.venv \ && . /home/ubuntu/.venv/bin/activate \ && pip install --no-cache-dir -qq \ cffconvert \ && echo "ubuntu ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/ubuntu \ && chmod 0440 /etc/sudoers.d/ubuntu ENV LOGNAME=ubuntu ENV PATH="/home/ubuntu/.venv/bin:${PATH}" ENV SHELL=/bin/bash ENV USER=ubuntu ENV VIRTUAL_ENV=/home/ubuntu/.venv USER ubuntu WORKDIR /workspace ================================================ FILE: LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: LICENSES/Apache-2.0.txt ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: LICENSES/CC-BY-4.0.txt ================================================ Creative Commons Attribution 4.0 International Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors. Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason-for example, because of any applicable exception or limitation to copyright-then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public. Creative Commons Attribution 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 - Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 - Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: A. reproduce and Share the Licensed Material, in whole or in part; and B. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 5. Downstream recipients. A. Offer from the Licensor - Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 - License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: A. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. Section 4 - Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 - Disclaimer of Warranties and Limitation of Liability. a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 - Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 - Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 - Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. ================================================ FILE: LICENSES/CC-BY-SA-4.0.txt ================================================ Creative Commons Attribution-ShareAlike 4.0 International Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors. Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason-for example, because of any applicable exception or limitation to copyright-then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public. Creative Commons Attribution-ShareAlike 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 - Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. j. Licensor means the individual(s) or entity(ies) granting rights under this Public License. k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 - Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: A. reproduce and Share the Licensed Material, in whole or in part; and B. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 5. Downstream recipients. A. Offer from the Licensor - Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. B. Additional offer from the Licensor - Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter's License You apply. C. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 - License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: A. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. b. ShareAlike.In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. 1. The Adapter's License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. Section 4 - Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 - Disclaimer of Warranties and Limitation of Liability. a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 - Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 - Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 - Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. ================================================ FILE: LICENSES/CC0-1.0.txt ================================================ Creative Commons Legal Code CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. Statement of Purpose The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. 1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; ii. moral rights retained by the original author(s) and/or performer(s); iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; v. rights protecting the extraction, dissemination, use and reuse of data in a Work; vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. 2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. 3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. 4. Limitations and Disclaimers. a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. ================================================ FILE: MODULE.bazel ================================================ # -*- mode: bazel; -*- # vi: set ft=bazel: # # MODULE.bazel # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # module( name = "rvo_3d", version = "1.1.0", ) bazel_dep( name = "apple_support", version = "2.5.3", dev_dependency = True, repo_name = "build_bazel_apple_support", ) apple_cc_configure = use_extension( "@build_bazel_apple_support//crosstool:setup.bzl", "apple_cc_configure_extension", ) use_repo(apple_cc_configure, "local_config_apple_cc") bazel_dep(name = "rules_cc", version = "0.2.17") bazel_dep(name = "rules_license", version = "1.0.0") bazel_dep(name = "rules_python", version = "1.9.0", dev_dependency = True) python = use_extension( "@rules_python//python/extensions:python.bzl", "python", ) python.toolchain( ignore_root_user_error = True, is_default = True, python_version = "3.14", ) bazel_dep(name = "platforms", version = "1.0.0", dev_dependency = True) bazel_dep(name = "rules_pkg", version = "1.2.0", dev_dependency = True) ================================================ FILE: QUALITY_DECLARATION.md ================================================ # `RVO2-3D Library` Quality Declaration The package `RVO2-3D Library` claims to be in the **Quality Level 2** category. Below are the rationales, notes, and caveats for this claim, organized by each requirement listed in the Package Requirements for Quality Level 2 in [REP-2004](https://www.ros.org/reps/rep-2004.html). ## Version Policy [1] ### Version Scheme [1.i] `RVO2-3D Library` uses [Semantic Versioning 2.0.0](https://semver.org/), and is at version `1.1.0`. The version is declared in `CMakeLists.txt` and `MODULE.bazel`. ### Version Stability [1.ii] `RVO2-3D Library` is at a stable version (`1.1.0`), which is greater than `1.0.0`. ### Public API Declaration [1.iii] The public API of `RVO2-3D Library` is the set of symbols declared in [`src/RVO.h`](src/RVO.h). This header aggregates the public interfaces of `RVOSimulator`, `Vector3`, and `Plane`. Internal implementation details in `Agent` and `KdTree` are not part of the public API. ### API Stability Within a Released Version [1.iv] The public API is stable across patch and minor versions. Breaking API changes are only introduced in new major versions. ### ABI Stability Within a Released Version [1.v] ABI compatibility is maintained across patch versions within the same `major.minor` release series. New major or minor versions may introduce ABI-breaking changes. ## Change Control Process [2] ### Change Requests [2.i] All changes to `RVO2-3D Library` are submitted through pull requests on [GitHub](https://github.com/snape/RVO2-3D). Direct commits to the `main` branch are not permitted outside of automated tooling. ### Contributor Origin [2.ii] All contributors must sign off on their commits using the [Developer Certificate of Origin (DCO)](https://developercertificate.org/), enforced via the DCO GitHub App on every pull request. ### Peer Review Policy [2.iii] As a single-maintainer project, all changes are reviewed by the primary maintainer [@snape](https://github.com/snape) before merging. ### Continuous Integration [2.iv] CI is performed via GitHub Actions on every push and pull request to `main`, and on a daily schedule: - [`.github/workflows/ci.yml`](.github/workflows/ci.yml): builds and tests with both CMake and Bazel on AlmaLinux, Alpine, Arch Linux, Fedora, openSUSE, and Ubuntu (amd64 and arm64), and macOS (arm64). CMake builds enable `BUILD_TESTING`, `ENABLE_HARDENING`, `ENABLE_OPENMP`, and `WARNINGS_AS_ERRORS`. - [`.github/workflows/codeql.yml`](.github/workflows/codeql.yml): runs GitHub CodeQL semantic code analysis for C++ on a weekly schedule. ### Documentation Policy [2.v] Changes are documented through commit messages and pull request descriptions on GitHub. ## Documentation [3] ### Feature Documentation [3.i] All features of `RVO2-3D Library` are documented in the Doxygen markup within [`src/RVO.h`](src/RVO.h) and related headers, including a usage guide, parameter overview, and example code. One annotated example program ([`examples/Sphere.cc`](examples/Sphere.cc)) demonstrates typical usage patterns covering agents and step-wise simulation. ### Public API Documentation [3.ii] All public API elements are documented with Doxygen markup. HTML documentation is generated from the source headers using `cmake -DBUILD_DOCUMENTATION=ON` and installed with the library. ### License [3.iii] Source code is licensed under the [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0). Documentation is licensed under the [Creative Commons Attribution-ShareAlike 4.0 International (CC-BY-SA-4.0)](https://creativecommons.org/licenses/by-sa/4.0/) Public License. The project uses the [REUSE Specification](https://reuse.software/) for license compliance. Every source file contains machine-readable SPDX license and copyright headers, and license texts are provided in the [`LICENSES/`](LICENSES/) directory. License compliance is verified by the `reuse` pre-commit hook. ### Copyright Statement [3.iv] Copyright is held by the University of North Carolina at Chapel Hill. All source files include the SPDX copyright notice: ``` SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill ``` ### Quality Declaration [3.v] This document is the quality declaration for `RVO2-3D Library` and is linked from the project README. ## Testing [4] ### Feature Testing [4.i] One system-level simulation scenario forms the test suite, run via `ctest` (CMake) and `bazel test` (Bazel): - **Sphere**: 812 agents initially distributed evenly on a sphere moving to their antipodal positions. This scenario exercises all documented features of the library, including agent management, the k-D tree spatial index, and step-wise simulation. ### Public API Testing [4.ii] The simulation scenario exercises all major public API functions of `RVOSimulator`, `Vector3`, and `Plane`. Dedicated unit tests for individual API functions are not currently present. ### Coverage [4.iii] Code coverage is not currently tracked. The simulation scenario provides broad functional coverage of the library, but no formal coverage measurement or policy is in place. This is a known gap relative to Quality Level 2 requirements. ### Performance [4.iv] No formal performance regression tests are in place. The simulation scenario implicitly exercises performance characteristics of the library (e.g., the Sphere scenario with 812 agents), but no automated performance benchmarks are run in CI. ### Linters and Static Analysis [4.v] The following linters and static analysis tools are enforced, with all warnings treated as errors in CI: - **clang-format**: code formatting enforced via [`.clang-format`](.clang-format) (Google style with `PointerAlignment: Right`) - **clang-tidy**: static analysis via [`.clang-tidy`](.clang-tidy), enabling `bugprone-*`, `cert-*`, `clang-analyzer-*`, `cppcoreguidelines-*`, `google-*`, `performance-*`, `portability-*`, `readability-*`, and `openmp-*` checks, with `WarningsAsErrors: '*'` - **cpplint**: Google C++ style enforcement via [`CPPLINT.cfg`](CPPLINT.cfg) - **buildifier**: Bazel file formatting via [`.buildifier.json`](.buildifier.json) - **CodeQL**: GitHub's semantic code analysis for C++ via [`.github/workflows/codeql.yml`](.github/workflows/codeql.yml) - **pre-commit hooks**: `codespell` (spell checking), `yamllint`, `actionlint` (workflow validation), REUSE compliance, case-conflict detection, and trailing-whitespace removal via [`.pre-commit-config.yaml`](.pre-commit-config.yaml) ## Dependencies [5] ### Direct Runtime ROS Dependencies [5.i] None. ### Optional Direct Runtime ROS Dependencies [5.ii] None. ### Direct Runtime non-ROS Dependencies [5.iii] - **C++ Standard Library**: provided by the compiler toolchain (GCC, Clang, or MSVC). This is a de facto standard with no quality level concerns. - **OpenMP** (optional): a widely-adopted, ISO-standardized API for shared-memory parallel computing, available in all major compiler toolchains. Enabling OpenMP parallelizes simulation steps across available processors. ## Platform Support [6] `RVO2-3D Library` is built and tested continuously via GitHub Actions on the following platforms: | Platform | Architecture | Build System | |----------------|--------------|--------------| | AlmaLinux 10 | amd64 | CMake, Bazel | | Alpine Linux | amd64 | CMake, Bazel | | Arch Linux | amd64 | CMake, Bazel | | Fedora | amd64 | CMake, Bazel | | openSUSE Leap | amd64 | CMake, Bazel | | Ubuntu | amd64, arm64 | CMake, Bazel | | macOS | arm64 | CMake, Bazel | ## Security [7] ### Vulnerability Disclosure Policy [7.i] The security policy is documented in [`.github/SECURITY.md`](.github/SECURITY.md). Vulnerability reports should be sent to [geom@cs.unc.edu](mailto:geom@cs.unc.edu). The current release is supported with security updates when practical. ================================================ FILE: README.md ================================================ Optimal Reciprocal Collision Avoidance in Three Dimensions ========================================================== [![DOI](https://zenodo.org/badge/10955299.svg)](https://zenodo.org/badge/latestdoi/10955299) We present a formal approach to reciprocal collision avoidance, where multiple independent mobile robots or agents need to avoid collisions with each other without communication among agents while moving in a common workspace. Our formulation, optimal reciprocal collision avoidance (ORCA), provides sufficient conditions for collision-free motion by letting each agent take half of the responsibility of avoiding pairwise collisions. Selecting the optimal action for each agent is reduced to solving a low-dimensional linear program, and we prove that the resulting motions are smooth. We test our optimal reciprocal collision avoidance approach on several dense and complex simulation scenarios workspaces involving thousands of agents, and compute collision-free actions for all of them in only a few milliseconds. RVO2-3D Library is an open-source C++98 implementation of our algorithm in three dimensions. It has a simple API for third-party applications. The user specifies agents and their preferred velocities. The simulation is performed step-by-step via a simple call to the library. The simulation is fully accessible and manipulable during runtime. The library exploits multiple processors if they are available using OpenMP for efficient parallelization of the simulation. ![Build Status](https://github.com/snape/RVO2-3D/actions/workflows/ci.yml/badge.svg?branch=main) SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at    Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Please send all bug reports to [geom@cs.unc.edu](mailto:geom@cs.unc.edu). The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: RVO3D.pc.in ================================================ # # RVO3D.pc # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # prefix=@CMAKE_INSTALL_PREFIX@ exec_prefix=${prefix} libdir=${exec_prefix}/@RVO3D_LIBRARY_DIR@ includedir=${prefix}/@RVO3D_INCLUDE_DIR@ Name: @RVO3D_NAME@ Description: @PROJECT_DESCRIPTION@ URL: @PROJECT_HOMEPAGE_URL@ Version: @PROJECT_VERSION@ Libs: -L${libdir} -l@RVO3D_LIBRARY@ Cflags: -I${includedir} ================================================ FILE: RVO3DConfig.cmake.in ================================================ # -*- mode: cmake; -*- # vi: set ft=cmake: # # RVO3DConfig.cmake # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # @PACKAGE_INIT@ set(RVO3D_VERSION_MAJOR @PROJECT_VERSION_MAJOR@) set(RVO3D_VERSION_MINOR @PROJECT_VERSION_MINOR@) set(RVO3D_VERSION_PATCH @PROJECT_VERSION_PATCH@) set(RVO3D_VERSION @PROJECT_VERSION@) set_and_check(RVO3D_INCLUDE_DIRS "@PACKAGE_RVO3D_INCLUDE_DIR@") set_and_check(RVO3D_LIBRARY_DIRS "@PACKAGE_RVO3D_LIBRARY_DIR@") set(RVO3D_LIBRARIES @PROJECT_NAME@::@RVO3D_LIBRARY@) check_required_components(@PROJECT_NAME@) include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake") ================================================ FILE: compose.yaml ================================================ # # compose.yaml # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # --- services: dev: build: context: . dockerfile: Dockerfile volumes: - .:/workspace:cached ================================================ FILE: doc/CMakeLists.txt ================================================ # -*- mode: cmake; -*- # vi: set ft=cmake: # # doc/CMakeLists.txt # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # if(BUILD_DOCUMENTATION AND Doxygen_FOUND) set(DOXYGEN_PROJECT_NAME "${RVO3D_NAME}") set(DOXYGEN_PROJECT_NUMBER ${PROJECT_VERSION}) set(DOXYGEN_PROJECT_BRIEF "${PROJECT_DESCRIPTION}") set(DOXYGEN_STRIP_FROM_PATH "${PROJECT_BINARY_DIR}/src" "${PROJECT_SOURCE_DIR}/src") set(DOXYGEN_BUILTIN_STL_SUPPORT YES) set(DOXYGEN_EXTRACT_ALL YES) set(DOXYGEN_FILE_PATTERNS "*.h") set(DOXYGEN_EXAMPLE_PATH "${PROJECT_SOURCE_DIR}/examples") set(DOXYGEN_EXAMPLE_PATTERNS "*.cc") set(DOXYGEN_HTML_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/header.html") set(DOXYGEN_HTML_FOOTER "${CMAKE_CURRENT_SOURCE_DIR}/footer.html") set(DOXYGEN_HTML_EXTRA_STYLESHEET "${CMAKE_CURRENT_SOURCE_DIR}/stylesheet.css") set(DOXYGEN_SEARCHENGINE NO) set(DOXYGEN_DOT_IMAGE_FORMAT svg) set(DOXYGEN_INTERACTIVE_SVG YES) doxygen_add_docs(documentation "${PROJECT_BINARY_DIR}/src/Export.h" "${PROJECT_SOURCE_DIR}/src/Plane.h" "${PROJECT_SOURCE_DIR}/src/RVO.h" "${PROJECT_SOURCE_DIR}/src/RVOSimulator.h" "${PROJECT_SOURCE_DIR}/src/Vector3.h" ALL USE_STAMP_FILE) if(ENABLE_INSTALLATION) install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/html" COMPONENT documentation TYPE DOC) endif() endif() ================================================ FILE: doc/footer.html ================================================ ================================================ FILE: doc/footer.html.license ================================================ footer.html RVO2-3D Library SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill SPDX-License-Identifier: CC-BY-SA-4.0 Creative Commons Attribution-ShareAlike 4.0 International Public License You are free to: * Share -- copy and redistribute the material in any medium or format * ShareAlike -- If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original * Adapt -- remix, transform, and build upon the material for any purpose, even commercially. The licensor cannot revoke these freedoms as long as you follow the license terms. Under the following terms: * Attribution -- You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. * No additional restrictions -- You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. Notices: * You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation. * No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material. Please send all bug reports to . The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: doc/header.html ================================================ $projectname: $title $extrastylesheet
$projectname  $projectnumber
$projectbrief
================================================ FILE: doc/header.html.license ================================================ header.html RVO2-3D Library SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill SPDX-License-Identifier: CC-BY-SA-4.0 Creative Commons Attribution-ShareAlike 4.0 International Public License You are free to: * Share -- copy and redistribute the material in any medium or format * ShareAlike -- If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original * Adapt -- remix, transform, and build upon the material for any purpose, even commercially. The licensor cannot revoke these freedoms as long as you follow the license terms. Under the following terms: * Attribution -- You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use. * No additional restrictions -- You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. Notices: * You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation. * No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material. Please send all bug reports to . The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: doc/stylesheet.css ================================================ /* * stylesheet.css * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: CC-BY-SA-4.0 * * Creative Commons Attribution-ShareAlike 4.0 International Public License * * You are free to: * * * Share -- copy and redistribute the material in any medium or format * * * ShareAlike -- If you remix, transform, or build upon the material, you must * distribute your contributions under the same license as the original * * * Adapt -- remix, transform, and build upon the material for any purpose, * even commercially. * * The licensor cannot revoke these freedoms as long as you follow the license * terms. * * Under the following terms: * * * Attribution -- You must give appropriate credit, provide a link to the * license, and indicate if changes were made. You may do so in any * reasonable manner, but not in any way that suggests the licensor endorses * you or your use. * * * No additional restrictions -- You may not apply legal terms or * technological measures that legally restrict others from doing anything * the license permits. * * Notices: * * * You do not have to comply with the license for elements of the material in * the public domain or where your use is permitted by an applicable * exception or limitation. * * * No warranties are given. The license may not give you all of the * permissions necessary for your intended use. For example, other rights * such as publicity, privacy, or moral rights may limit how you use the * material. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ /* CSS for doxygen 1.8.13 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; } p.reference, p.definition { font: 400 14px/22px Roboto,sans-serif; } /* @group Heading Levels */ h1.groupheader { font-size: 150%; } .title { font: 400 14px/28px Roboto,sans-serif; font-size: 150%; font-weight: bold; margin: 10px 2px; } h2.groupheader { border-bottom: 1px solid #879ECB; color: #354C7B; font-size: 150%; font-weight: normal; margin-top: 1.75em; padding-top: 8px; padding-bottom: 4px; width: 100%; } h3.groupheader { font-size: 100%; } h1, h2, h3, h4, h5, h6 { -webkit-transition: text-shadow 0.5s linear; -moz-transition: text-shadow 0.5s linear; -ms-transition: text-shadow 0.5s linear; -o-transition: text-shadow 0.5s linear; transition: text-shadow 0.5s linear; margin-right: 15px; } h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { text-shadow: 0 0 15px cyan; } dt { font-weight: bold; } div.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; } p.startli, p.startdd { margin-top: 2px; } p.starttd { margin-top: 0px; } p.endli { margin-bottom: 0px; } p.enddd { margin-bottom: 4px; } p.endtd { margin-bottom: 2px; } /* @end */ caption { font-weight: bold; } span.legend { font-size: 70%; text-align: center; } h3.version { font-size: 90%; text-align: center; } div.qindex, div.navtab { background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; } div.qindex, div.navpath { width: 100%; line-height: 140%; } div.navtab { margin-right: 15px; } /* @group Link Styling */ a { color: #3D578C; font-weight: normal; text-decoration: none; } .contents a:visited { color: #4665A2; } a:hover { text-decoration: underline; } a.qindex { font-weight: bold; } a.qindexHL { font-weight: bold; background-color: #9CAFD4; color: #ffffff; border: 1px double #869DCA; } .contents a.qindexHL:visited { color: #ffffff; } a.el { font-weight: bold; } a.elRef { } a.code, a.code:visited, a.line, a.line:visited { color: #4665A2; } a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { color: #4665A2; } /* @end */ dl.el { margin-left: -1cm; } pre.fragment { border: 1px solid #C4CFE5; background-color: #FBFCFD; padding: 4px 6px; margin: 4px 8px 4px 2px; overflow: auto; word-wrap: break-word; font-size: 9pt; line-height: 125%; font-family: monospace, fixed; font-size: 105%; } div.fragment { padding: 0px; margin: 4px 8px 4px 2px; background-color: #FBFCFD; border: 1px solid #C4CFE5; } div.line { font-family: monospace, fixed; font-size: 13px; min-height: 13px; line-height: 1.0; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ text-indent: -53px; padding-left: 53px; padding-bottom: 0px; margin: 0px; -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } div.line:after { content:"\000A"; white-space: pre; } div.line.glow { background-color: cyan; box-shadow: 0 0 10px cyan; } span.lineno { padding-right: 4px; text-align: right; border-right: 2px solid #0F0; background-color: #E8E8E8; white-space: pre; } span.lineno a { background-color: #D8D8D8; } span.lineno a:hover { background-color: #C8C8C8; } .lineno { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } div.ah, span.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px; padding: 0.2em; border: solid thin #333; border-radius: 0.5em; -webkit-border-radius: .5em; -moz-border-radius: .5em; box-shadow: 2px 2px 3px #999; -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); } div.classindex ul { list-style: none; padding-left: 0; } div.classindex span.ai { display: inline-block; } div.groupHeader { margin-left: 16px; margin-top: 12px; font-weight: bold; } div.groupText { margin-left: 16px; font-style: italic; } body { background-color: white; color: black; margin: 0; } div.contents { margin-top: 10px; margin-left: 12px; margin-right: 8px; } td.indexkey { background-color: #EBEFF6; font-weight: bold; border: 1px solid #C4CFE5; margin: 2px 0px 2px 0; padding: 2px 10px; white-space: nowrap; vertical-align: top; } td.indexvalue { background-color: #EBEFF6; border: 1px solid #C4CFE5; padding: 2px 10px; margin: 2px 0px; } tr.memlist { background-color: #EEF1F7; } p.formulaDsp { text-align: center; } img.formulaDsp { } img.formulaInl { vertical-align: middle; } div.center { text-align: center; margin-top: 0px; margin-bottom: 0px; padding: 0px; } div.center img { border: 0px; } address.footer { text-align: right; padding-right: 12px; } img.footer { border: 0px; vertical-align: middle; } /* @group Code Colorization */ span.keyword { color: #008000 } span.keywordtype { color: #604020 } span.keywordflow { color: #e08000 } span.comment { color: #800000 } span.preprocessor { color: #806020 } span.stringliteral { color: #002080 } span.charliteral { color: #008080 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } blockquote { background-color: #F7F8FB; border-left: 2px solid #9CAFD4; margin: 0 24px 0 4px; padding: 0 12px 0 16px; } /* @end */ td.tiny { font-size: 75%; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #A3B4D7; } th.dirtab { background: #EBEFF6; font-weight: bold; } hr { height: 0px; border: none; border-top: 1px solid #4A6AAA; } hr.footer { height: 1px; } /* @group Member Descriptions */ table.memberdecls { border-spacing: 0px; padding: 0px; } .memberdecls td, .fieldtable tr { -webkit-transition-property: background-color, box-shadow; -webkit-transition-duration: 0.5s; -moz-transition-property: background-color, box-shadow; -moz-transition-duration: 0.5s; -ms-transition-property: background-color, box-shadow; -ms-transition-duration: 0.5s; -o-transition-property: background-color, box-shadow; -o-transition-duration: 0.5s; transition-property: background-color, box-shadow; transition-duration: 0.5s; } .memberdecls td.glow, .fieldtable tr.glow { background-color: cyan; box-shadow: 0 0 15px cyan; } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { background-color: #F9FAFC; border: none; margin: 4px; padding: 1px 0 0 8px; } .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; color: #555; } .memSeparator { border-bottom: 1px solid #DEE4F0; line-height: 1px; margin: 0px; padding: 0px; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } .memItemRight { width: 100%; } .memTemplParams { color: #4665A2; white-space: nowrap; font-size: 80%; } /* @end */ /* @group Member Details */ .memtitle { padding: 8px; border-top: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; border-top-right-radius: 4px; border-top-left-radius: 4px; margin-bottom: -1px; background-image: url('nav_f.png'); background-repeat: repeat-x; background-color: #E2E8F2; line-height: 1.25; font-weight: 300; float:left; } .permalink { font-size: 65%; display: inline-block; vertical-align: middle; } .memtemplate { font-size: 80%; color: #4665A2; font-weight: normal; margin-left: 9px; } .memnav { background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .mempage { width: 100%; } .memitem { padding: 0; margin-bottom: 10px; margin-right: 5px; -webkit-transition: box-shadow 0.5s linear; -moz-transition: box-shadow 0.5s linear; -ms-transition: box-shadow 0.5s linear; -o-transition: box-shadow 0.5s linear; transition: box-shadow 0.5s linear; display: table !important; width: 100%; } .memitem.glow { box-shadow: 0 0 15px cyan; } .memname { font-weight: 400; margin-left: 6px; } .memname td { vertical-align: bottom; } .memproto, dl.reflist dt { border-top: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 0px 6px 0px; color: #253555; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); background-color: #DFE5F1; /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 4px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 4px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 4px; } .overload { font-family: "courier new",courier,monospace; font-size: 65%; } .memdoc, dl.reflist dd { border-bottom: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 10px 2px 10px; background-color: #FBFCFD; border-top-width: 0; background-image: url('nav_g.png'); background-repeat: repeat-x; background-color: #FFFFFF; /* opera specific markup */ border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); /* firefox specific markup */ -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; /* webkit specific markup */ -webkit-border-bottom-left-radius: 4px; -webkit-border-bottom-right-radius: 4px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); } dl.reflist dt { padding: 5px; } dl.reflist dd { margin: 0px 0px 10px 0px; padding: 5px; } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; white-space: nowrap; } .paramname em { font-style: normal; } .paramname code { line-height: 14px; } .params, .retval, .exception, .tparams { margin-left: 0px; padding-left: 0px; } .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } .params .paramtype { font-style: italic; vertical-align: top; } .params .paramdir { font-family: "courier new",courier,monospace; vertical-align: top; } table.mlabels { border-spacing: 0px; } td.mlabels-left { width: 100%; padding: 0px; } td.mlabels-right { vertical-align: bottom; padding: 0px; white-space: nowrap; } span.mlabels { margin-left: 8px; } span.mlabel { background-color: #728DC1; border-top: 1px solid #5373B4; border-left: 1px solid #5373B4; border-right: 1px solid #C4CFE5; border-bottom: 1px solid #C4CFE5; text-shadow: none; color: white; margin-right: 4px; padding: 2px 3px; border-radius: 3px; font-size: 7pt; white-space: nowrap; vertical-align: middle; } /* @end */ /* these are for tree view inside a (index) page */ div.directory { margin: 10px 0px; border-top: 1px solid #9CAFD4; border-bottom: 1px solid #9CAFD4; width: 100%; } .directory table { border-collapse: collapse; } .directory td { margin: 0px; padding: 0px; vertical-align: top; } .directory td.entry { white-space: nowrap; padding-right: 6px; padding-top: 3px; } .directory td.entry a { outline: none; } .directory td.entry a img { border: none; } .directory td.desc { width: 100%; padding-left: 6px; padding-right: 6px; padding-top: 3px; border-left: 1px solid rgba(0,0,0,0.05); } .directory tr.even { padding-left: 6px; background-color: #F7F8FB; } .directory img { vertical-align: -30%; } .directory .levels { white-space: nowrap; width: 100%; text-align: right; font-size: 9pt; } .directory .levels span { cursor: pointer; padding-left: 2px; padding-right: 2px; color: #3D578C; } .arrow { color: #9CAFD4; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer; font-size: 80%; display: inline-block; width: 16px; height: 22px; } .icon { font-family: Arial, Helvetica; font-weight: bold; font-size: 12px; height: 14px; width: 16px; display: inline-block; background-color: #728DC1; color: white; text-align: center; border-radius: 4px; margin-left: 2px; margin-right: 2px; } .icona { width: 24px; height: 22px; display: inline-block; } .iconfopen { width: 24px; height: 18px; margin-bottom: 4px; background-image: url('folderopen.png'); background-position: 0px -4px; background-repeat: repeat-y; vertical-align: top; display: inline-block; } .iconfclosed { width: 24px; height: 18px; margin-bottom: 4px; background-image: url('folderclosed.png'); background-position: 0px -4px; background-repeat: repeat-y; vertical-align: top; display: inline-block; } .icondoc { width: 24px; height: 18px; margin-bottom: 4px; background-image: url('doc.png'); background-position: 0px -4px; background-repeat: repeat-y; vertical-align: top; display: inline-block; } table.directory { font: 400 14px Roboto,sans-serif; } /* @end */ div.dynheader { margin-top: 8px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } address { font-style: normal; color: #2A3D61; } table.doxtable caption { caption-side: top; } table.doxtable { border-collapse:collapse; margin-top: 4px; margin-bottom: 4px; } table.doxtable td, table.doxtable th { border: 1px solid #2D4068; padding: 3px 7px 2px; } table.doxtable th { background-color: #374F7F; color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; } table.fieldtable { margin-bottom: 10px; border: 1px solid #A8B8D9; border-spacing: 0px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); } .fieldtable td, .fieldtable th { padding: 3px 7px 2px; } .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; border-right: 1px solid #A8B8D9; border-bottom: 1px solid #A8B8D9; vertical-align: top; } .fieldtable td.fieldname { padding-top: 3px; } .fieldtable td.fielddoc { border-bottom: 1px solid #A8B8D9; } .fieldtable td.fielddoc p:first-child { margin-top: 0px; } .fieldtable td.fielddoc p:last-child { margin-bottom: 2px; } .fieldtable tr:last-child td { border-bottom: none; } .fieldtable th { background-image: url('nav_f.png'); background-repeat: repeat-x; background-color: #E2E8F2; font-size: 90%; color: #253555; padding-bottom: 4px; padding-top: 5px; text-align: left; font-weight: 400; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom: 1px solid #A8B8D9; } .tabsearch { top: 0px; left: 10px; height: 36px; background-image: url('tab_b.png'); z-index: 101; overflow: hidden; font-size: 13px; } .navpath ul { font-size: 11px; background-image:url('tab_b.png'); background-repeat:repeat-x; background-position: 0 -5px; height:30px; line-height:30px; color:#8AA0CC; border:solid 1px #C2CDE4; overflow:hidden; margin:0px; padding:0px; } .navpath li { list-style-type:none; float:left; padding-left:10px; padding-right:15px; background-image:url('bc_s.png'); background-repeat:no-repeat; background-position:right; color:#364D7C; } .navpath li.navelem a { height:32px; display:block; text-decoration: none; outline: none; color: #283A5D; font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-decoration: none; } .navpath li.navelem a:hover { color:#6884BD; } .navpath li.footer { list-style-type: none; float: right; padding-left: 10px; padding-right: 15px; background-image: none; background-repeat: no-repeat; background-position: right; color:#364D7C; font-size: 8pt; } div.summary { float: right; font-size: 8pt; padding-right: 5px; width: 50%; text-align: right; } div.summary a { white-space: nowrap; } table.classindex { margin: 10px; white-space: nowrap; margin-left: 3%; margin-right: 3%; width: 94%; border: 0; border-spacing: 0; padding: 0; } div.ingroups { font-size: 8pt; width: 50%; text-align: left; } div.ingroups a { white-space: nowrap; } div.header { background-image: url('nav_h.png'); background-repeat: repeat-x; background-color: #F9FAFC; margin: 0px; border-bottom: 1px solid #C4CFE5; } div.headertitle { padding: 5px 5px 5px 10px; } dl { padding: 0 0 0 10px; } dl.section { margin-left: 0px; padding-left: 0px; } dl.note { margin-left:-7px; padding-left: 3px; border-left: 4px solid; border-color: #D0C000; } dl.warning, dl.attention { margin-left:-7px; padding-left: 3px; border-left: 4px solid; border-color: #FF0000; } dl.pre, dl.post, dl.invariant { margin-left:-7px; padding-left: 3px; border-left: 4px solid; border-color: #00D000; } dl.deprecated { margin-left:-7px; padding-left: 3px; border-left: 4px solid; border-color: #505050; } dl.todo { margin-left:-7px; padding-left: 3px; border-left: 4px solid; border-color: #00C0E0; } dl.test { margin-left:-7px; padding-left: 3px; border-left: 4px solid; border-color: #3030E0; } dl.bug { margin-left:-7px; padding-left: 3px; border-left: 4px solid; border-color: #C08050; } dl.section dd { margin-bottom: 6px; } #projectlogo { text-align: center; vertical-align: bottom; border-collapse: separate; } #projectlogo img { border: 0px none; } #projectalign { vertical-align: middle; } #projectname { font: 300% Tahoma, Arial,sans-serif; margin: 0px; padding: 2px 0px; } #projectbrief { font: 120% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #projectnumber { font: 50% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #titlearea { padding: 0px; margin: 0px; width: 100%; border-bottom: 1px solid #5373B4; } .image { text-align: center; } .dotgraph { text-align: center; } .mscgraph { text-align: center; } .plantumlgraph { text-align: center; } .diagraph { text-align: center; } .caption { font-weight: bold; } div.zoom { border: 1px solid #90A5CE; } dl.citelist { margin-bottom: 50px; } dl.citelist dt { color:#334975; float: left; font-weight: bold; margin-right: 10px; padding: 5px; } dl.citelist dd { margin: 2px 0; padding: 5px 0; } div.toc { padding: 14px 25px; background-color: #F4F6FA; border: 1px solid #D8DFEE; border-radius: 7px 7px 7px 7px; float: right; height: auto; margin: 0 8px 10px 10px; width: 200px; } div.toc li { background: url("bdwn.png") no-repeat scroll 0 5px transparent; font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; margin-top: 5px; padding-left: 10px; padding-top: 2px; } div.toc h3 { font: bold 12px/1.2 Arial,FreeSans,sans-serif; color: #4665A2; border-bottom: 0 none; margin: 0; } div.toc ul { list-style: none outside none; border: medium none; padding: 0px; } div.toc li.level1 { margin-left: 0px; } div.toc li.level2 { margin-left: 15px; } div.toc li.level3 { margin-left: 30px; } div.toc li.level4 { margin-left: 45px; } .inherit_header { font-weight: bold; color: gray; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .inherit_header td { padding: 6px 0px 2px 5px; } .inherit { display: none; } tr.heading h2 { margin-top: 12px; margin-bottom: 4px; } /* tooltip related style info */ .ttc { position: absolute; display: none; } #powerTip { cursor: default; white-space: nowrap; background-color: white; border: 1px solid gray; border-radius: 4px 4px 4px 4px; box-shadow: 1px 1px 7px gray; display: none; font-size: smaller; max-width: 80%; opacity: 0.9; padding: 1ex 1em 1em; position: absolute; z-index: 2147483647; } #powerTip div.ttdoc { color: grey; font-style: italic; } #powerTip div.ttname a { font-weight: bold; } #powerTip div.ttname { font-weight: bold; } #powerTip div.ttdeci { color: #006318; } #powerTip div { margin: 0px; padding: 0px; font: 12px/16px Roboto,sans-serif; } #powerTip:before, #powerTip:after { content: ""; position: absolute; margin: 0px; } #powerTip.n:after, #powerTip.n:before, #powerTip.s:after, #powerTip.s:before, #powerTip.w:after, #powerTip.w:before, #powerTip.e:after, #powerTip.e:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.se:after, #powerTip.se:before, #powerTip.nw:after, #powerTip.nw:before, #powerTip.sw:after, #powerTip.sw:before { border: solid transparent; content: " "; height: 0; width: 0; position: absolute; } #powerTip.n:after, #powerTip.s:after, #powerTip.w:after, #powerTip.e:after, #powerTip.nw:after, #powerTip.ne:after, #powerTip.sw:after, #powerTip.se:after { border-color: rgba(255, 255, 255, 0); } #powerTip.n:before, #powerTip.s:before, #powerTip.w:before, #powerTip.e:before, #powerTip.nw:before, #powerTip.ne:before, #powerTip.sw:before, #powerTip.se:before { border-color: rgba(128, 128, 128, 0); } #powerTip.n:after, #powerTip.n:before, #powerTip.ne:after, #powerTip.ne:before, #powerTip.nw:after, #powerTip.nw:before { top: 100%; } #powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { border-top-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.n:before { border-top-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.n:after, #powerTip.n:before { left: 50%; } #powerTip.nw:after, #powerTip.nw:before { right: 14px; } #powerTip.ne:after, #powerTip.ne:before { left: 14px; } #powerTip.s:after, #powerTip.s:before, #powerTip.se:after, #powerTip.se:before, #powerTip.sw:after, #powerTip.sw:before { bottom: 100%; } #powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { border-bottom-color: #ffffff; border-width: 10px; margin: 0px -10px; } #powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { border-bottom-color: #808080; border-width: 11px; margin: 0px -11px; } #powerTip.s:after, #powerTip.s:before { left: 50%; } #powerTip.sw:after, #powerTip.sw:before { right: 14px; } #powerTip.se:after, #powerTip.se:before { left: 14px; } #powerTip.e:after, #powerTip.e:before { left: 100%; } #powerTip.e:after { border-left-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.e:before { border-left-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } #powerTip.w:after, #powerTip.w:before { right: 100%; } #powerTip.w:after { border-right-color: #ffffff; border-width: 10px; top: 50%; margin-top: -10px; } #powerTip.w:before { border-right-color: #808080; border-width: 11px; top: 50%; margin-top: -11px; } @media print { #top { display: none; } #side-nav { display: none; } #nav-path { display: none; } body { overflow: visible; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } .summary { display: none; } .memitem { page-break-inside: avoid; } #doc-content { margin-left: 0 !important; height: auto !important; width: auto !important; overflow: inherit; display: inline; } } /* @group Markdown */ table.markdownTable { border-collapse:collapse; margin-top: 4px; margin-bottom: 4px; } table.markdownTable td, table.markdownTable th { border: 1px solid #2D4068; padding: 3px 7px 2px; } table.markdownTable tr { } th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { background-color: #374F7F; color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; } th.markdownTableHeadLeft, td.markdownTableBodyLeft { text-align: left } th.markdownTableHeadRight, td.markdownTableBodyRight { text-align: right } th.markdownTableHeadCenter, td.markdownTableBodyCenter { text-align: center } /* @end */ ================================================ FILE: examples/BUILD.bazel ================================================ # -*- mode: bazel; -*- # vi: set ft=bazel: # # examples/BUILD.bazel # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # load("@rules_cc//cc:defs.bzl", "cc_test") package(default_package_metadata = [ "//:license", "//:package_info", ]) cc_test( name = "Sphere", size = "medium", timeout = "short", srcs = ["Sphere.cc"], copts = select({ "@platforms//os:windows": ["/W4"], "//conditions:default": [ "-Wall", "-Werror=format-security", ], }), defines = ["RVO3D_OUTPUT_TIME_AND_POSITIONS=0"], tags = ["block-network"], deps = ["//src:RVO3D"], ) ================================================ FILE: examples/CMakeLists.txt ================================================ # -*- mode: cmake; -*- # vi: set ft=cmake: # # examples/CMakeLists.txt # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # option(BUILD_EXAMPLES "Build examples" ${PROJECT_IS_TOP_LEVEL}) if(BUILD_EXAMPLES) option(OUTPUT_TIME_AND_POSITIONS "Output time and positions" ON) if(OUTPUT_TIME_AND_POSITIONS) set(RVO3D_EXAMPLES_COMPILE_DEFINITIONS RVO3D_OUTPUT_TIME_AND_POSITIONS=1) else() set(RVO3D_EXAMPLES_COMPILE_DEFINITIONS RVO3D_OUTPUT_TIME_AND_POSITIONS=0) endif() if(ENABLE_INTERPROCEDURAL_OPTIMIZATION AND RVO3D_INTERPROCEDURAL_OPTIMIZATION_SUPPORTED) set(RVO3D_EXAMPLES_INTERPROCEDURAL_OPTIMIZATION ON) else() set(RVO3D_EXAMPLES_INTERPROCEDURAL_OPTIMIZATION OFF) endif() include(CheckPIESupported) check_pie_supported() add_executable(Sphere Sphere.cc) target_compile_definitions(Sphere PRIVATE ${RVO3D_EXAMPLES_COMPILE_DEFINITIONS}) target_link_libraries(Sphere PRIVATE ${RVO3D_LIBRARY}) if(ENABLE_OPENMP AND OpenMP_FOUND) target_link_libraries(Sphere PRIVATE OpenMP::OpenMP_CXX) endif() set_target_properties(Sphere PROPERTIES INTERPROCEDURAL_OPTIMIZATION ${RVO3D_EXAMPLES_INTERPROCEDURAL_OPTIMIZATION}) if(CMAKE_VERSION VERSION_GREATER_EQUAL 4.1) set_target_properties(Sphere PROPERTIES SPDX_LICENSE Apache-2.0) endif() add_test(NAME Sphere COMMAND Sphere) set_tests_properties(Sphere PROPERTIES LABELS medium TIMEOUT 60) endif() ================================================ FILE: examples/Sphere.cc ================================================ /* * Sphere.cc * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ /** * @file Sphere.cc * @brief Example file showing a demo with 812 agents initially positioned * evenly distributed on a sphere attempting to move to the antipodal * position on the sphere. */ #ifndef RVO3D_OUTPUT_TIME_AND_POSITIONS #define RVO3D_OUTPUT_TIME_AND_POSITIONS 1 #endif #include #include #include #if RVO3D_OUTPUT_TIME_AND_POSITIONS #include #endif /* RVO3D_OUTPUT_TIME_AND_POSITIONS */ #include namespace { const float RVO3D_TWO_PI = 6.28318530717958647692F; void setupScenario( RVO::RVOSimulator *sim, std::vector &goals) { /* NOLINT(runtime/references) */ /* Specify the global time step of the simulation. */ sim->setTimeStep(0.125F); /* Specify the default parameters for agents that are subsequently added. */ sim->setAgentDefaults(15.0F, 10U, 10.0F, 1.5F, 2.0F); /* Add agents, specifying their start position, and store their goals on the * opposite side of the environment. */ for (std::size_t i = 0U; i < 5.0F * RVO3D_TWO_PI; ++i) { const float z = 100.0F * std::cos(i / 10.0F); const float r = 100.0F * std::sin(i / 10.0F); for (std::size_t j = 0U; j < r / 2.5F; ++j) { const float x = r * std::cos(j * RVO3D_TWO_PI / (r / 2.5F)); const float y = r * std::sin(j * RVO3D_TWO_PI / (r / 2.5F)); sim->addAgent(RVO::Vector3(x, y, z)); goals.push_back(-sim->getAgentPosition(sim->getNumAgents() - 1U)); } } } #if RVO3D_OUTPUT_TIME_AND_POSITIONS void updateVisualization(RVO::RVOSimulator *sim) { /* Output the current global time. */ std::cout << sim->getGlobalTime(); /* Output the position for all the agents. */ for (std::size_t i = 0U; i < sim->getNumAgents(); ++i) { std::cout << " " << sim->getAgentPosition(i); } std::cout << std::endl; } #endif /* RVO3D_OUTPUT_TIME_AND_POSITIONS */ } /* namespace */ void setPreferredVelocities(RVO::RVOSimulator *sim, const std::vector &goals) { /* Set the preferred velocity to be a vector of unit magnitude (speed) in the * direction of the goal. */ for (std::size_t i = 0U; i < sim->getNumAgents(); ++i) { RVO::Vector3 goalVector = goals[i] - sim->getAgentPosition(i); if (RVO::absSq(goalVector) > 1.0F) { goalVector = RVO::normalize(goalVector); } sim->setAgentPrefVelocity(i, goalVector); } } bool reachedGoal(RVO::RVOSimulator *sim, const std::vector &goals) { /* Check if all agents have reached their goals. */ for (std::size_t i = 0U; i < sim->getNumAgents(); ++i) { if (RVO::absSq(sim->getAgentPosition(i) - goals[i]) > 4.0F * sim->getAgentRadius(i) * sim->getAgentRadius(i)) { return false; } } return true; } int main() { /* Create a new simulator instance. */ RVO::RVOSimulator *sim = new RVO::RVOSimulator(); /* Store the goals of the agents. */ std::vector goals; /* Set up the scenario. */ setupScenario(sim, goals); /* Perform (and manipulate) the simulation. */ do { #if RVO3D_OUTPUT_TIME_AND_POSITIONS updateVisualization(sim); #endif /* RVO3D_OUTPUT_TIME_AND_POSITIONS */ setPreferredVelocities(sim, goals); sim->doStep(); } while (!reachedGoal(sim, goals)); delete sim; return 0; } ================================================ FILE: include-what-you-use.imp ================================================ [ { "include": ["@<__algorithm/.*>", "private", "", "public"] }, { "include": ["@<__utility/.*>", "private", "", "public"] } ] ================================================ FILE: include-what-you-use.imp.license ================================================ include-what-you-use.imp RVO2-3D Library SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Please send all bug reports to . The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: package.xml ================================================ rvo2_3d 1.1.0 Optimal Reciprocal Collision Avoidance in Three Dimensions Jamie Snape Apache-2.0 https://gamma.cs.unc.edu/RVO2/ https://github.com/snape/RVO2-3D Jur van den Berg Stephen J. Guy Jamie Snape Ming C. Lin Dinesh Manocha cmake cmake ================================================ FILE: renovate.json ================================================ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:recommended" ] } ================================================ FILE: renovate.json.license ================================================ renovate.json RVO2-3D Library SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill SPDX-License-Identifier: Apache-2.0 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Please send all bug reports to . The authors may be contacted via: Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha Dept. of Computer Science 201 S. Columbia St. Frederick P. Brooks, Jr. Computer Science Bldg. Chapel Hill, N.C. 27599-3175 United States of America ================================================ FILE: requirements.txt ================================================ # # requirements.txt # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # cffconvert cmakelang cpplint reuse ================================================ FILE: src/Agent.cc ================================================ /* * Agent.cc * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #include "Agent.h" #include #include #include "KdTree.h" #include "RVOSimulator.h" namespace RVO { namespace { /** * @brief A sufficiently small positive number. */ const float RVO3D_EPSILON = 0.00001F; /** * @brief Defines a directed line. */ class Line { public: /** * @brief Constructs a directed line.`` */ Line(); /** * @brief The direction of the directed line. */ Vector3 direction; /** * @brief A point on the directed line. */ Vector3 point; }; Line::Line() {} /** * @brief Solves a one-dimensional linear program on a specified line * subject to linear constraints defined by planes and a spherical * constraint. * @param[in] planes Planes defining the linear constraints. * @param[in] planeNo The plane on which the line lies. * @param[in] line The line on which the one-dimensional linear program * is solved. * @param[in] radius The radius of the spherical constraint. * @param[in] optVelocity The optimization velocity. * @param[in] directionOpt True if the direction should be optimized. * @param[in] result A reference to the result of the linear program. * @return True if successful. */ bool linearProgram1(const std::vector &planes, std::size_t planeNo, const Line &line, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result) { /* NOLINT(runtime/references) */ const float dotProduct = line.point * line.direction; const float discriminant = dotProduct * dotProduct + radius * radius - absSq(line.point); if (discriminant < 0.0F) { /* Max speed sphere fully invalidates line. */ return false; } const float sqrtDiscriminant = std::sqrt(discriminant); float tLeft = -dotProduct - sqrtDiscriminant; float tRight = -dotProduct + sqrtDiscriminant; for (std::size_t i = 0U; i < planeNo; ++i) { const float numerator = (planes[i].point - line.point) * planes[i].normal; const float denominator = line.direction * planes[i].normal; if (denominator * denominator <= RVO3D_EPSILON) { /* Lines line is (almost) parallel to plane i. */ if (numerator > 0.0F) { return false; } continue; } const float t = numerator / denominator; if (denominator >= 0.0F) { /* Plane i bounds line on the left. */ tLeft = std::max(tLeft, t); } else { /* Plane i bounds line on the right. */ tRight = std::min(tRight, t); } if (tLeft > tRight) { return false; } } if (directionOpt) { /* Optimize direction. */ if (optVelocity * line.direction > 0.0F) { /* Take right extreme. */ result = line.point + tRight * line.direction; } else { /* Take left extreme. */ result = line.point + tLeft * line.direction; } } else { /* Optimize closest point. */ const float t = line.direction * (optVelocity - line.point); if (t < tLeft) { result = line.point + tLeft * line.direction; } else if (t > tRight) { result = line.point + tRight * line.direction; } else { result = line.point + t * line.direction; } } return true; } /** * @brief Solves a two-dimensional linear program on a specified plane * subject to linear constraints defined by planes and a spherical * constraint. * @param[in] planes Planes defining the linear constraints. * @param[in] planeNo The plane on which the two-dimensional linear * program is solved. * @param[in] radius The radius of the spherical constraint. * @param[in] optVelocity The optimization velocity. * @param[in] directionOpt True if the direction should be optimized. * @param[out] result A reference to the result of the linear program. * @return True if successful. */ bool linearProgram2(const std::vector &planes, std::size_t planeNo, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result) { /* NOLINT(runtime/references) */ const float planeDist = planes[planeNo].point * planes[planeNo].normal; const float planeDistSq = planeDist * planeDist; const float radiusSq = radius * radius; if (planeDistSq > radiusSq) { /* Max speed sphere fully invalidates plane planeNo. */ return false; } const float planeRadiusSq = radiusSq - planeDistSq; const Vector3 planeCenter = planeDist * planes[planeNo].normal; if (directionOpt) { /* Project direction optVelocity on plane planeNo. */ const Vector3 planeOptVelocity = optVelocity - (optVelocity * planes[planeNo].normal) * planes[planeNo].normal; const float planeOptVelocityLengthSq = absSq(planeOptVelocity); if (planeOptVelocityLengthSq <= RVO3D_EPSILON) { result = planeCenter; } else { result = planeCenter + std::sqrt(planeRadiusSq / planeOptVelocityLengthSq) * planeOptVelocity; } } else { /* Project point optVelocity on plane planeNo. */ result = optVelocity + ((planes[planeNo].point - optVelocity) * planes[planeNo].normal) * planes[planeNo].normal; /* If outside planeCircle, project on planeCircle. */ if (absSq(result) > radiusSq) { const Vector3 planeResult = result - planeCenter; const float planeResultLengthSq = absSq(planeResult); result = planeCenter + std::sqrt(planeRadiusSq / planeResultLengthSq) * planeResult; } } for (std::size_t i = 0U; i < planeNo; ++i) { if (planes[i].normal * (planes[i].point - result) > 0.0F) { /* Result does not satisfy constraint i. Compute new optimal result. * Compute intersection line of plane i and plane planeNo. */ Vector3 crossProduct = cross(planes[i].normal, planes[planeNo].normal); if (absSq(crossProduct) <= RVO3D_EPSILON) { /* Planes planeNo and i are (almost) parallel, and plane i fully * invalidates plane planeNo. */ return false; } Line line; line.direction = normalize(crossProduct); const Vector3 lineNormal = cross(line.direction, planes[planeNo].normal); line.point = planes[planeNo].point + (((planes[i].point - planes[planeNo].point) * planes[i].normal) / (lineNormal * planes[i].normal)) * lineNormal; if (!linearProgram1(planes, i, line, radius, optVelocity, directionOpt, result)) { return false; } } } return true; } /** * @brief Solves a three-dimensional linear program subject to linear * constraints defined by planes and a spherical constraint. * @param[in] planes Planes defining the linear constraints. * @param[in] radius The radius of the spherical constraint. * @param[in] optVelocity The optimization velocity. * @param[in] directionOpt True if the direction should be optimized. * @param[out] result A reference to the result of the linear program. * @return The number of the plane it fails on, and the number of planes if * successful. */ std::size_t linearProgram3(const std::vector &planes, float radius, const Vector3 &optVelocity, bool directionOpt, Vector3 &result) { /* NOLINT(runtime/references) */ if (directionOpt) { /* Optimize direction. Note that the optimization velocity is of unit length * in this case. */ result = optVelocity * radius; } else if (absSq(optVelocity) > radius * radius) { /* Optimize closest point and outside circle. */ result = normalize(optVelocity) * radius; } else { /* Optimize closest point and inside circle. */ result = optVelocity; } for (std::size_t i = 0U; i < planes.size(); ++i) { if (planes[i].normal * (planes[i].point - result) > 0.0F) { /* Result does not satisfy constraint i. Compute new optimal result. */ const Vector3 tempResult = result; if (!linearProgram2(planes, i, radius, optVelocity, directionOpt, result)) { result = tempResult; return i; } } } return planes.size(); } /** * @brief Solves a four-dimensional linear program subject to linear * constraints defined by planes and a spherical constraint. * @param[in] planes Planes defining the linear constraints. * @param[in] beginPlane The plane on which the three-dimensional linear * program failed. * @param[in] radius The radius of the spherical constraint. * @param[out] result A reference to the result of the linear program. */ void linearProgram4(const std::vector &planes, std::size_t beginPlane, float radius, Vector3 &result) { /* NOLINT(runtime/references) */ float distance = 0.0F; for (std::size_t i = beginPlane; i < planes.size(); ++i) { if (planes[i].normal * (planes[i].point - result) > distance) { /* Result does not satisfy constraint of plane i. */ std::vector projPlanes; for (std::size_t j = 0U; j < i; ++j) { Plane plane; const Vector3 crossProduct = cross(planes[j].normal, planes[i].normal); if (absSq(crossProduct) <= RVO3D_EPSILON) { /* Plane i and plane j are (almost) parallel. */ if (planes[i].normal * planes[j].normal > 0.0F) { /* Plane i and plane j point in the same direction. */ continue; } /* Plane i and plane j point in opposite direction. */ plane.point = 0.5F * (planes[i].point + planes[j].point); } else { /* Plane.point is point on line of intersection between plane i and * plane j. */ const Vector3 lineNormal = cross(crossProduct, planes[i].normal); plane.point = planes[i].point + (((planes[j].point - planes[i].point) * planes[j].normal) / (lineNormal * planes[j].normal)) * lineNormal; } plane.normal = normalize(planes[j].normal - planes[i].normal); projPlanes.push_back(plane); } const Vector3 tempResult = result; if (linearProgram3(projPlanes, radius, planes[i].normal, true, result) < projPlanes.size()) { /* This should in principle not happen. The result is by definition * already in the feasible region of this linear program. If it fails, * it is due to small floating point error, and the current result is * kept. */ result = tempResult; } distance = planes[i].normal * (planes[i].point - result); } } } } /* namespace */ Agent::Agent(RVOSimulator *sim) : sim_(sim), id_(0U), maxNeighbors_(0U), maxSpeed_(0.0F), neighborDist_(0.0F), radius_(0.0F), timeHorizon_(0.0F) {} Agent::~Agent() {} void Agent::computeNeighbors() { agentNeighbors_.clear(); if (maxNeighbors_ > 0U) { sim_->kdTree_->computeAgentNeighbors(this, neighborDist_ * neighborDist_); } } void Agent::computeNewVelocity() { orcaPlanes_.clear(); const float invTimeHorizon = 1.0F / timeHorizon_; /* Create agent ORCA planes. */ for (std::size_t i = 0U; i < agentNeighbors_.size(); ++i) { const Agent *const other = agentNeighbors_[i].second; const Vector3 relativePosition = other->position_ - position_; const Vector3 relativeVelocity = velocity_ - other->velocity_; const float distSq = absSq(relativePosition); const float combinedRadius = radius_ + other->radius_; const float combinedRadiusSq = combinedRadius * combinedRadius; Plane plane; Vector3 u; if (distSq > combinedRadiusSq) { /* No collision. */ const Vector3 w = relativeVelocity - invTimeHorizon * relativePosition; /* Vector from cutoff center to relative velocity. */ const float wLengthSq = absSq(w); const float dotProduct = w * relativePosition; if (dotProduct < 0.0F && dotProduct * dotProduct > combinedRadiusSq * wLengthSq) { /* Project on cut-off circle. */ const float wLength = std::sqrt(wLengthSq); const Vector3 unitW = w / wLength; plane.normal = unitW; u = (combinedRadius * invTimeHorizon - wLength) * unitW; } else { /* Project on cone. */ const float a = distSq; const float b = relativePosition * relativeVelocity; const float c = absSq(relativeVelocity) - absSq(cross(relativePosition, relativeVelocity)) / (distSq - combinedRadiusSq); const float t = (b + std::sqrt(b * b - a * c)) / a; const Vector3 ww = relativeVelocity - t * relativePosition; const float wwLength = abs(ww); const Vector3 unitWW = ww / wwLength; plane.normal = unitWW; u = (combinedRadius * t - wwLength) * unitWW; } } else { /* Collision. */ const float invTimeStep = 1.0F / sim_->timeStep_; const Vector3 w = relativeVelocity - invTimeStep * relativePosition; const float wLength = abs(w); const Vector3 unitW = w / wLength; plane.normal = unitW; u = (combinedRadius * invTimeStep - wLength) * unitW; } plane.point = velocity_ + 0.5F * u; orcaPlanes_.push_back(plane); } const std::size_t planeFail = linearProgram3( orcaPlanes_, maxSpeed_, prefVelocity_, false, newVelocity_); if (planeFail < orcaPlanes_.size()) { linearProgram4(orcaPlanes_, planeFail, maxSpeed_, newVelocity_); } } void Agent::insertAgentNeighbor(const Agent *agent, float &rangeSq) { if (this != agent) { const float distSq = absSq(position_ - agent->position_); if (distSq < rangeSq) { if (agentNeighbors_.size() < maxNeighbors_) { agentNeighbors_.push_back(std::make_pair(distSq, agent)); } std::size_t i = agentNeighbors_.size() - 1U; while (i != 0U && distSq < agentNeighbors_[i - 1U].first) { agentNeighbors_[i] = agentNeighbors_[i - 1U]; --i; } agentNeighbors_[i] = std::make_pair(distSq, agent); if (agentNeighbors_.size() == maxNeighbors_) { rangeSq = agentNeighbors_.back().first; } } } } void Agent::update() { velocity_ = newVelocity_; position_ += velocity_ * sim_->timeStep_; } } /* namespace RVO */ ================================================ FILE: src/Agent.h ================================================ /* * Agent.h * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #ifndef RVO3D_AGENT_H_ #define RVO3D_AGENT_H_ /** * @file Agent.h * @brief Contains the Agent class. */ #include #include #include #include "Plane.h" #include "Vector3.h" namespace RVO { class RVOSimulator; /** * @brief Defines an agent in the simulation. */ class Agent { private: /** * @brief Constructs an agent instance. * @param[in] sim The simulator instance. */ explicit Agent(RVOSimulator *sim); /** * @brief Destroys this agent instance. */ ~Agent(); /** * @brief Computes the neighbors of this agent. */ void computeNeighbors(); /** * @brief Computes the new velocity of this agent. */ void computeNewVelocity(); /** * @brief Inserts an agent neighbor into the set of neighbors of this * agent. * @param[in] agent A pointer to the agent to be inserted. * @param[in] rangeSq The squared range around this agent. */ void insertAgentNeighbor(const Agent *agent, float &rangeSq); /* NOLINT(runtime/references) */ /** * @brief Updates the three-dimensional position and three-dimensional * velocity of this agent. */ void update(); /* Not implemented. */ Agent(const Agent &other); /* Not implemented. */ Agent &operator=(const Agent &other); Vector3 newVelocity_; Vector3 position_; Vector3 prefVelocity_; Vector3 velocity_; RVOSimulator *sim_; std::size_t id_; std::size_t maxNeighbors_; float maxSpeed_; float neighborDist_; float radius_; float timeHorizon_; std::vector > agentNeighbors_; std::vector orcaPlanes_; friend class KdTree; friend class RVOSimulator; }; } /* namespace RVO */ #endif /* RVO3D_AGENT_H_ */ ================================================ FILE: src/BUILD.bazel ================================================ # -*- mode: bazel; -*- # vi: set ft=bazel: # # src/BUILD.bazel # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # load("@rules_cc//cc:defs.bzl", "cc_library") load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files") package(default_package_metadata = [ "//:license", "//:package_info", ]) # REUSE-IgnoreStart genrule( name = "export", outs = ["Export.h"], cmd = """ cat << 'EOF' > $@ /* * Export.h * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #ifndef RVO3D_EXPORT_H_ #define RVO3D_EXPORT_H_ #ifdef RVO3D_STATIC_DEFINE #define RVO3D_EXPORT #else #ifdef _WIN32 #ifdef RVO3D_EXPORTS #define RVO3D_EXPORT __declspec(dllexport) #else #define RVO3D_EXPORT __declspec(dllimport) #endif #else #define RVO3D_EXPORT __attribute__((visibility("default"))) #endif #endif #endif /* RVO3D_EXPORT_H_ */ EOF """, ) # REUSE-IgnoreEnd filegroup( name = "hdrs", srcs = [ "Export.h", "Plane.h", "RVO.h", "RVOSimulator.h", "Vector3.h", ], ) cc_library( name = "RVO3D", srcs = [ "Agent.cc", "Agent.h", "KdTree.cc", "KdTree.h", "Plane.cc", "RVOSimulator.cc", "Vector3.cc", ], hdrs = [":hdrs"], copts = select({ "@platforms//os:windows": ["/W4"], "//conditions:default": [ "-fvisibility-inlines-hidden", "-fvisibility=hidden", "-Wall", "-Werror=format-security", ], }), local_defines = select({ "@platforms//os:windows": ["RVO_EXPORTS"], "//conditions:default": [], }), strip_include_prefix = "/src", visibility = ["//visibility:public"], ) pkg_files( name = "include", srcs = [":hdrs"], attributes = pkg_attributes(mode = "0644"), prefix = "usr/include/RVO3D", visibility = ["//:__pkg__"], ) ================================================ FILE: src/CMakeLists.txt ================================================ # -*- mode: cmake; -*- # vi: set ft=cmake: # # src/CMakeLists.txt # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # add_library(${RVO3D_LIBRARY}) include(GenerateExportHeader) generate_export_header(${RVO3D_LIBRARY} EXPORT_FILE_NAME Export.h) target_sources(${RVO3D_LIBRARY} PUBLIC FILE_SET HEADERS BASE_DIRS "${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}" FILES "${CMAKE_CURRENT_BINARY_DIR}/Export.h" Plane.h RVO.h RVOSimulator.h Vector3.h PRIVATE Agent.cc Agent.h KdTree.cc KdTree.h Plane.cc RVOSimulator.cc Vector3.cc) set_target_properties(${RVO3D_LIBRARY} PROPERTIES CXX_VISIBILITY_PRESET hidden SOVERSION ${PROJECT_VERSION_MAJOR} VERSION ${PROJECT_VERSION} VISIBILITY_INLINES_HIDDEN ON) if(ENABLE_INTERPROCEDURAL_OPTIMIZATION AND RVO3D_INTERPROCEDURAL_OPTIMIZATION_SUPPORTED) set_target_properties(${RVO3D_LIBRARY} PROPERTIES INTERPROCEDURAL_OPTIMIZATION ON) endif() if(CMAKE_VERSION VERSION_GREATER_EQUAL 4.1) set_target_properties(${RVO3D_LIBRARY} PROPERTIES SPDX_LICENSE Apache-2.0) endif() if(WIN32) target_compile_definitions(${RVO3D_LIBRARY} PUBLIC NOMINMAX) endif() if(ENABLE_OPENMP AND OpenMP_FOUND) target_link_libraries(${RVO3D_LIBRARY} PRIVATE OpenMP::OpenMP_CXX) endif() add_library(${PROJECT_NAME}::${RVO3D_LIBRARY} ALIAS ${RVO3D_LIBRARY}) export(TARGETS ${RVO3D_LIBRARY} NAMESPACE ${PROJECT_NAME}:: FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake") if(ENABLE_INSTALLATION) install(TARGETS ${RVO3D_LIBRARY} EXPORT ${PROJECT_NAME}Targets ARCHIVE COMPONENT development FILE_SET HEADERS COMPONENT development DESTINATION ${RVO3D_INCLUDE_DIR} LIBRARY COMPONENT runtime NAMELINK_COMPONENT development RUNTIME COMPONENT runtime INCLUDES DESTINATION ${RVO3D_INCLUDE_DIR}) install(EXPORT ${PROJECT_NAME}Targets COMPONENT development DESTINATION ${RVO3D_DIR} NAMESPACE ${PROJECT_NAME}::) if(CMAKE_VERSION VERSION_GREATER_EQUAL 4.3) install(PACKAGE_INFO ${RVO3D_LIBRARY} EXPORT ${PROJECT_NAME}Targets COMPONENT development VERSION ${PROJECT_VERSION} COMPAT_VERSION ${PROJECT_VERSION_MAJOR} VERSION_SCHEMA simple DEFAULT_TARGETS ${RVO3D_LIBRARY} LICENSE Apache-2.0) export(PACKAGE_INFO ${RVO3D_LIBRARY} EXPORT ${PROJECT_NAME}Targets VERSION ${PROJECT_VERSION} COMPAT_VERSION ${PROJECT_VERSION_MAJOR} VERSION_SCHEMA simple DEFAULT_TARGETS ${RVO3D_LIBRARY} LICENSE Apache-2.0) if(ENABLE_CMAKE_EXPERIMENTAL_FEATURES) set(CMAKE_EXPERIMENTAL_GENERATE_SBOM ca494ed3-b261-4205-a01f-603c95e4cae0) install(SBOM ${RVO3D_LIBRARY} EXPORT ${PROJECT_NAME}Targets COMPONENT development LICENSE Apache-2.0) export(SBOM ${RVO3D_LIBRARY} EXPORT ${PROJECT_NAME}Targets LICENSE Apache-2.0) endif() endif() endif() ================================================ FILE: src/KdTree.cc ================================================ /* * KdTree.cc * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #include "KdTree.h" #include #include #include "Agent.h" #include "RVOSimulator.h" #include "Vector3.h" namespace RVO { namespace { /** * @brief The maximum size of a k-D leaf node. */ const std::size_t RVO3D_MAX_LEAF_SIZE = 10U; } /* namespace */ /** * @brief Defines an agent k-D tree node. */ class KdTree::AgentTreeNode { public: /** * @brief Constructs an agent k-D tree node. */ AgentTreeNode(); /** * @brief The beginning node number. */ std::size_t begin; /** * @brief The ending node number. */ std::size_t end; /** * @brief The left node number. */ std::size_t left; /** * @brief The right node number. */ std::size_t right; /** * @brief The maximum coordinates. */ Vector3 maxCoord; /** * @brief The minimum coordinates. */ Vector3 minCoord; }; KdTree::AgentTreeNode::AgentTreeNode() : begin(0U), end(0U), left(0U), right(0U) {} KdTree::KdTree(RVOSimulator *sim) : sim_(sim) {} KdTree::~KdTree() {} void KdTree::buildAgentTree() { agents_ = sim_->agents_; if (!agents_.empty()) { agentTree_.resize(2U * agents_.size() - 1U); buildAgentTreeRecursive(0U, agents_.size(), 0U); } } void KdTree::buildAgentTreeRecursive(std::size_t begin, std::size_t end, std::size_t node) { agentTree_[node].begin = begin; agentTree_[node].end = end; agentTree_[node].minCoord = agents_[begin]->position_; agentTree_[node].maxCoord = agents_[begin]->position_; for (std::size_t i = begin + 1U; i < end; ++i) { agentTree_[node].maxCoord[0] = std::max(agentTree_[node].maxCoord[0], agents_[i]->position_.x()); agentTree_[node].minCoord[0] = std::min(agentTree_[node].minCoord[0], agents_[i]->position_.x()); agentTree_[node].maxCoord[1] = std::max(agentTree_[node].maxCoord[1], agents_[i]->position_.y()); agentTree_[node].minCoord[1] = std::min(agentTree_[node].minCoord[1], agents_[i]->position_.y()); agentTree_[node].maxCoord[2] = std::max(agentTree_[node].maxCoord[2], agents_[i]->position_.z()); agentTree_[node].minCoord[2] = std::min(agentTree_[node].minCoord[2], agents_[i]->position_.z()); } if (end - begin > RVO3D_MAX_LEAF_SIZE) { /* No leaf node. */ std::size_t coord = 0U; if (agentTree_[node].maxCoord[0] - agentTree_[node].minCoord[0] > agentTree_[node].maxCoord[1] - agentTree_[node].minCoord[1] && agentTree_[node].maxCoord[0] - agentTree_[node].minCoord[0] > agentTree_[node].maxCoord[2] - agentTree_[node].minCoord[2]) { coord = 0U; } else if (agentTree_[node].maxCoord[1] - agentTree_[node].minCoord[1] > agentTree_[node].maxCoord[2] - agentTree_[node].minCoord[2]) { coord = 1U; } else { coord = 2U; } const float splitValue = 0.5F * (agentTree_[node].maxCoord[coord] + agentTree_[node].minCoord[coord]); std::size_t left = begin; std::size_t right = end; while (left < right) { while (left < right && agents_[left]->position_[coord] < splitValue) { ++left; } while (right > left && agents_[right - 1U]->position_[coord] >= splitValue) { --right; } if (left < right) { std::swap(agents_[left], agents_[right - 1U]); ++left; --right; } } std::size_t leftSize = left - begin; if (leftSize == 0U) { ++leftSize; ++left; } agentTree_[node].left = node + 1U; agentTree_[node].right = node + 2U * leftSize; buildAgentTreeRecursive(begin, left, agentTree_[node].left); buildAgentTreeRecursive(left, end, agentTree_[node].right); } } void KdTree::computeAgentNeighbors(Agent *agent, float rangeSq) const { queryAgentTreeRecursive(agent, rangeSq, 0U); } void KdTree::queryAgentTreeRecursive(Agent *agent, float &rangeSq, std::size_t node) const { if (agentTree_[node].end - agentTree_[node].begin <= RVO3D_MAX_LEAF_SIZE) { for (std::size_t i = agentTree_[node].begin; i < agentTree_[node].end; ++i) { agent->insertAgentNeighbor(agents_[i], rangeSq); } } else { const float distSqLeftMinX = std::max(0.0F, agentTree_[agentTree_[node].left].minCoord[0] - agent->position_.x()); const float distSqLeftMaxX = std::max(0.0F, agent->position_.x() - agentTree_[agentTree_[node].left].maxCoord[0]); const float distSqLeftMinY = std::max(0.0F, agentTree_[agentTree_[node].left].minCoord[1] - agent->position_.y()); const float distSqLeftMaxY = std::max(0.0F, agent->position_.y() - agentTree_[agentTree_[node].left].maxCoord[1]); const float distSqLeftMinZ = std::max(0.0F, agentTree_[agentTree_[node].left].minCoord[2] - agent->position_.z()); const float distSqLeftMaxZ = std::max(0.0F, agent->position_.z() - agentTree_[agentTree_[node].left].maxCoord[2]); const float distSqLeft = distSqLeftMinX * distSqLeftMinX + distSqLeftMaxX * distSqLeftMaxX + distSqLeftMinY * distSqLeftMinY + distSqLeftMaxY * distSqLeftMaxY + distSqLeftMinZ * distSqLeftMinZ + distSqLeftMaxZ * distSqLeftMaxZ; const float distSqRightMinX = std::max(0.0F, agentTree_[agentTree_[node].right].minCoord[0] - agent->position_.x()); const float distSqRightMaxX = std::max(0.0F, agent->position_.x() - agentTree_[agentTree_[node].right].maxCoord[0]); const float distSqRightMinY = std::max(0.0F, agentTree_[agentTree_[node].right].minCoord[1] - agent->position_.y()); const float distSqRightMaxY = std::max(0.0F, agent->position_.y() - agentTree_[agentTree_[node].right].maxCoord[1]); const float distSqRightMinZ = std::max(0.0F, agentTree_[agentTree_[node].right].minCoord[2] - agent->position_.z()); const float distSqRightMaxZ = std::max(0.0F, agent->position_.z() - agentTree_[agentTree_[node].right].maxCoord[2]); const float distSqRight = distSqRightMinX * distSqRightMinX + distSqRightMaxX * distSqRightMaxX + distSqRightMinY * distSqRightMinY + distSqRightMaxY * distSqRightMaxY + distSqRightMinZ * distSqRightMinZ + distSqRightMaxZ * distSqRightMaxZ; if (distSqLeft < distSqRight) { if (distSqLeft < rangeSq) { queryAgentTreeRecursive(agent, rangeSq, agentTree_[node].left); if (distSqRight < rangeSq) { queryAgentTreeRecursive(agent, rangeSq, agentTree_[node].right); } } } else { if (distSqRight < rangeSq) { queryAgentTreeRecursive(agent, rangeSq, agentTree_[node].right); if (distSqLeft < rangeSq) { queryAgentTreeRecursive(agent, rangeSq, agentTree_[node].left); } } } } } } /* namespace RVO */ ================================================ FILE: src/KdTree.h ================================================ /* * KdTree.h * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #ifndef RVO3D_KD_TREE_H_ #define RVO3D_KD_TREE_H_ /** * @file KdTree.h * @brief Contains the KdTree class. */ #include #include namespace RVO { class Agent; class RVOSimulator; /** * @brief Defines a k-D tree for agents in the simulation. */ class KdTree { private: class AgentTreeNode; /** * @brief Constructs a k-D tree instance. * @param[in] sim The simulator instance. */ explicit KdTree(RVOSimulator *sim); /** * @brief Destroys this k-D tree instance. */ ~KdTree(); /** * @brief Builds an agent k-D tree. */ void buildAgentTree(); /** * @brief Recursive function to build a k-D tree. * @param[in] begin The beginning k-D tree node. * @param[in] end The ending k-D tree node. * @param[in] node The current k-D tree node. */ void buildAgentTreeRecursive(std::size_t begin, std::size_t end, std::size_t node); /** * @brief Computes the agent neighbors of the specified agent. * @param[in] agent A pointer to the agent for which agent neighbors are to * be computed. * @param[in] rangeSq The squared range around the agent. */ void computeAgentNeighbors(Agent *agent, float rangeSq) const; /** * @brief Recursive function to compute the neighbors of the specified * agent. * @param[in] agent A pointer to the agent for which neighbors are to be * computed. * @param[in,out] rangeSq The squared range around the agent. * @param[in] node The current k-D tree node. */ void queryAgentTreeRecursive(Agent *agent, float &rangeSq, /* NOLINT(runtime/references) */ std::size_t node) const; /* Not implemented. */ KdTree(const KdTree &other); /* Not implemented. */ KdTree &operator=(const KdTree &other); std::vector agents_; std::vector agentTree_; RVOSimulator *sim_; friend class Agent; friend class RVOSimulator; }; } /* namespace RVO */ #endif /* RVO3D_KD_TREE_H_ */ ================================================ FILE: src/Plane.cc ================================================ /* * Plane.cc * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #include "Plane.h" namespace RVO { Plane::Plane() {} } /* namespace RVO */ ================================================ FILE: src/Plane.h ================================================ /* * Plane.h * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #ifndef RVO3D_PLANE_H_ #define RVO3D_PLANE_H_ /** * @file Plane.h * @brief Contains the Plane class. */ #include "Export.h" #include "Vector3.h" namespace RVO { /** * @brief Defines a plane. */ class RVO3D_EXPORT Plane { public: /** * @brief Constructs a plane. */ Plane(); /** * @brief A point on the plane. */ Vector3 point; /** * @brief The normal to the plane. */ Vector3 normal; }; } /* namespace RVO */ #endif /* RVO3D_PLANE_H_ */ ================================================ FILE: src/RVO.h ================================================ /* * RVO.h * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #ifndef RVO3D_RVO_H_ #define RVO3D_RVO_H_ /* IWYU pragma: begin_exports */ #include "Export.h" #include "Plane.h" #include "RVOSimulator.h" #include "Vector3.h" /* IWYU pragma: end_exports */ /** @file RVO.h @brief Includes all public headers in the library. @namespace RVO @brief Contains all classes, functions, and constants used in the library. @mainpage RVO2-3D Library @author Jur van den Berg @author Stephen J. Guy @author Jamie Snape @author Ming C. Lin @author Dinesh Manocha @copyright 2008 University of North Carolina at Chapel Hill RVO2-3D Library is an easy-to-use C++ implementation of the Optimal Reciprocal Collision Avoidance (ORCA) formulation for multi-agent simulation in three dimensions. RVO2-3D Library automatically uses parallelism for computing the motion of the agents if your machine has multiple processors and your compiler supports OpenMP. Please follow the following steps to install and use RVO2-3D Library. @li @subpage whatsnew @li @subpage building @li @subpage using @li @subpage params See the documentation of the RVO::RVOSimulator class for an exhaustive list of public functions of RVO2-3D Library. RVO2-3D Library, accompanying example code, and this documentation is released under the following @subpage terms "terms and conditions". @page whatsnew What Is New in RVO2-3D Library @section localca Three Dimensions In contrast to RVO2 Library, RVO2-3D Library operates in three-dimensional workspaces. It uses a three-dimensional implementation of Optimal Reciprocal Collision Avoidance (ORCA) for local collision avoidance. RVO2-3D Library does not replace RVO2 Library; for two-dimensional applications, RVO2 Library should be used. @section structure Structure of RVO2-3D Library The structure of RVO2-3D Library is similar to that of RVO2 Library. Users familiar with RVO2 Library should find little trouble in using RVO2-3D Library. RVO2-3D Library currently does not support static obstacles. @page building Building RVO2-3D Library We assume that you have downloaded RVO2-3D Library and unpacked the ZIP archive to a path $RVO3D_ROOT. @section cmake CMake Create and switch to your chosen build directory, e.g., $RVO3D_ROOT/build. Run cmake inside the build directory on the source directory, e.g., cmake $RVO3D_ROOT/src. Build files for the default generator for your platform will be generated in the build directory. @page using Using RVO2-3D Library @section structure Structure A program performing an RVO2-3D Library simulation has the following global structure. @code{.cpp} #include #include int main() { // Create a new simulator instance. RVO::RVOSimulator *sim = new RVO::RVOSimulator(); // Store the goals of the agents. std::vector goals; // Set up the scenario. setupScenario(sim, goals); // Perform (and manipulate) the simulation. do { updateVisualization(sim); setPreferredVelocities(sim, goals); sim->doStep(); } while (!reachedGoal(sim, goals)); delete sim; return 0; } @endcode In order to use RVO2-3D Library, the user needs to include RVO.h. The first step is then to create an instance of RVO::RVOSimulator. Then, the process consists of two stages. The first stage is specifying the simulation scenario and its parameters. In the above example program, this is done in the method setupScenario(...), which we will discuss below. The second stage is the actual performing of the simulation. In the above example program, simulation steps are taken until all the agents have reached some predefined goals. Prior to each simulation step, we set the preferred velocity for each agent, i.e., the velocity the agent would have taken if there were no other agents around, in the method setPreferredVelocities(...). The simulator computes the actual velocities of the agents and attempts to follow the preferred velocities as closely as possible while guaranteeing collision avoidance at the same time. During the simulation, the user may want to retrieve information from the simulation for instance to visualize the simulation. In the above example program, this is done in the method updateVisualization(...), which we will discuss below. It is also possible to manipulate the simulation during the simulation, for instance by changing positions, radii, velocities, etc. of the agents. @section spec Setting up the Simulation Scenario A scenario that is to be simulated can be set up as follows. A scenario consists of a set of agents that can be manually specified. Agents may be added anytime before or during the simulation. The user may also want to define goal positions of the agents, or a roadmap to guide the agents around obstacles. This is not done in RVO2-3D Library, but needs to be taken care of in the user's external application. The following example creates a scenario with eight agents exchanging positions. @code{.cpp} void setupScenario(RVO::RVOSimulator *sim, std::vector &goals) { // Specify global time step of the simulation. sim->setTimeStep(0.25F); // Specify default parameters for agents that are subsequently added. sim->setAgentDefaults(15.0F, 10U, 10.0F, 2.0F, 2.0F); // Add agents, specifying their start position. sim->addAgent(RVO::Vector3(-50.0F, -50.0F, -50.0F)); sim->addAgent(RVO::Vector3(50.0F, -50.0F, -50.0F)); sim->addAgent(RVO::Vector3(50.0F, 50.0F, -50.0F)); sim->addAgent(RVO::Vector3(-50.0F, 50.0F, -50.0F)); sim->addAgent(RVO::Vector3(-50.0F, -50.0F, 50.0F)); sim->addAgent(RVO::Vector3(50.0F, -50.0F, 50.0F)); sim->addAgent(RVO::Vector3(50.0F, 50.0F, 50.0F)); sim->addAgent(RVO::Vector3(-50.0F, 50.0F, 50.0F)); // Create goals (simulator is unaware of these). for (std::size_t i = 0U; i < sim->getNumAgents(); ++i) { goals.push_back(-sim->getAgentPosition(i)); } } @endcode See the documentation on RVO::RVOSimulator for a full overview of the functionality to specify scenarios. @section ret Retrieving Information from the Simulation During the simulation, the user can extract information from the simulation for instance for visualization purposes, or to determine termination conditions of the simulation. In the example program above, visualization is done in the updateVisualization(...) method. Below we give an example that simply writes the positions of each agent in each time step to the standard output. The termination condition is checked in the reachedGoal(...) method. Here we give an example that returns true if all agents are within one radius of their goals. @code{.cpp} #include void updateVisualization(RVO::RVOSimulator *sim) { // Output the current global time. std::cout << sim->getGlobalTime() << " "; // Output the position for all the agents. for (std::size_t i = 0U; i < sim->getNumAgents(); ++i) { std::cout << sim->getAgentPosition(i) << " "; } std::cout << std::endl; } @endcode @code{.cpp} bool reachedGoal(RVO::RVOSimulator *sim, const std::vector &goals) { // Check whether all agents have arrived at their goals. for (std::size_t i = 0U; i < sim->getNumAgents(); ++i) { if (absSq(goals[i] - sim->getAgentPosition(i)) > sim->getAgentRadius(i) * sim->getAgentRadius(i)) { // Agent is further away from its goal than one radius. return false; } } return true; } @endcode Using similar functions as the ones used in this example, the user can access information about other parameters of the agents, as well as the global parameters, and the obstacles. See the documentation of the class RVO::RVOSimulator for an exhaustive list of public functions for retrieving simulation information. @section manip Manipulating the Simulation During the simulation, the user can manipulate the simulation, for instance by changing the global parameters, or changing the parameters of the agents (potentially causing abrupt different behavior). It is also possible to give the agents a new position, which make them jump through the scene. New agents can be added to the simulation at any time. See the documentation of the class RVO::RVOSimulator for an exhaustive list of public functions for manipulating the simulation. To provide global guidance to the agents, the preferred velocities of the agents can be changed ahead of each simulation step. In the above example program, this happens in the method setPreferredVelocities(...). Here we give an example that simply sets the preferred velocity to the unit vector towards the agent's goal for each agent (i.e., the preferred speed is 1.0). @code{.cpp} void setPreferredVelocities(RVO::RVOSimulator *sim, const std::vector &goals) { // Set the preferred velocity for each agent. for (std::size_t i = 0U; i < sim->getNumAgents(); ++i) { if (absSq(goals[i] - sim->getAgentPosition(i)) < sim->getAgentRadius(i) * sim->getAgentRadius(i) ) { // Agent is within one radius of its goal, set preferred velocity to zero. sim->setAgentPrefVelocity(i, RVO::Vector3()); } else { // Agent is far away from its goal, set preferred velocity as unit vector // towards agent's goal. sim->setAgentPrefVelocity(i, normalize(goals[i] - sim->getAgentPosition(i))); } } } @endcode @section example Example Program RVO2-3D Library is accompanied by one example program, which can be found in the $RVO3D_ROOT/examples directory. The example is named Sphere, and contains the following demonstration scenario:
Sphere A scenario in which 812 agents, initially positioned evenly distributed on a sphere, move to the antipodal position on the sphere.
@page params Parameter Overview @section globalp Global Parameters
Parameter Type (unit) Meaning
timeStep float (time) The time step of the simulation. Must be positive.
@section agent Agent Parameters
Parameter Type (unit) Meaning
maxNeighbors std::size_t The maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe.
maxSpeed float (distance/time) The maximum speed of the agent. Must be non-negative.
neighborDist float (distance) The maximum distance (center point to center point) to other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. Must be non-negative.
position RVO::Vector3 (distance, distance) The current position of the agent.
prefVelocity RVO::Vector3 (distance/time, distance/time) The current preferred velocity of the agent. This is the velocity the agent would take if no other agents or obstacles were around. The simulator computes an actual velocity for the agent that follows the preferred velocity as closely as possible, but at the same time guarantees collision avoidance.
radius float (distance) The radius of the agent. Must be non-negative.
timeHorizon float (time) The minimum amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom the agent has in choosing its velocities. Must be positive.
velocity RVO::Vector3 (distance/time, distance/time) The (current) velocity of the agent.
@page terms Terms and Conditions RVO2-3D Library Copyright 2008 University of North Carolina at Chapel Hill Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ #endif /* RVO3D_RVO_H_ */ ================================================ FILE: src/RVOSimulator.cc ================================================ /* * RVOSimulator.cc * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #include "RVOSimulator.h" #include #ifdef _OPENMP #include #endif /* _OPENMP */ #include "Agent.h" #include "KdTree.h" #include "Plane.h" namespace RVO { RVOSimulator::RVOSimulator() : defaultAgent_(NULL), kdTree_(new KdTree(this)), globalTime_(0.0F), timeStep_(0.0F) {} RVOSimulator::RVOSimulator(float timeStep, float neighborDist, std::size_t maxNeighbors, float timeHorizon, float radius, float maxSpeed, const Vector3 &velocity) : defaultAgent_(new Agent(this)), kdTree_(new KdTree(this)), globalTime_(0.0F), timeStep_(timeStep) { defaultAgent_->maxNeighbors_ = maxNeighbors; defaultAgent_->maxSpeed_ = maxSpeed; defaultAgent_->neighborDist_ = neighborDist; defaultAgent_->radius_ = radius; defaultAgent_->timeHorizon_ = timeHorizon; defaultAgent_->velocity_ = velocity; } RVOSimulator::~RVOSimulator() { delete defaultAgent_; delete kdTree_; for (std::size_t i = 0U; i < agents_.size(); ++i) { delete agents_[i]; } } std::size_t RVOSimulator::getAgentNumAgentNeighbors(std::size_t agentNo) const { return agents_[agentNo]->agentNeighbors_.size(); } std::size_t RVOSimulator::getAgentAgentNeighbor(std::size_t agentNo, std::size_t neighborNo) const { return agents_[agentNo]->agentNeighbors_[neighborNo].second->id_; } std::size_t RVOSimulator::getAgentNumORCAPlanes(std::size_t agentNo) const { return agents_[agentNo]->orcaPlanes_.size(); } const Plane &RVOSimulator::getAgentORCAPlane(std::size_t agentNo, std::size_t planeNo) const { return agents_[agentNo]->orcaPlanes_[planeNo]; } void RVOSimulator::removeAgent(std::size_t agentNo) { delete agents_[agentNo]; agents_[agentNo] = agents_.back(); agents_.pop_back(); } std::size_t RVOSimulator::addAgent(const Vector3 &position) { if (defaultAgent_ == NULL) { return RVO3D_ERROR; } Agent *agent = new Agent(this); agent->position_ = position; agent->maxNeighbors_ = defaultAgent_->maxNeighbors_; agent->maxSpeed_ = defaultAgent_->maxSpeed_; agent->neighborDist_ = defaultAgent_->neighborDist_; agent->radius_ = defaultAgent_->radius_; agent->timeHorizon_ = defaultAgent_->timeHorizon_; agent->velocity_ = defaultAgent_->velocity_; agent->id_ = agents_.size(); agents_.push_back(agent); return agents_.size() - 1U; } std::size_t RVOSimulator::addAgent(const Vector3 &position, float neighborDist, std::size_t maxNeighbors, float timeHorizon, float radius, float maxSpeed, const Vector3 &velocity) { Agent *agent = new Agent(this); agent->position_ = position; agent->maxNeighbors_ = maxNeighbors; agent->maxSpeed_ = maxSpeed; agent->neighborDist_ = neighborDist; agent->radius_ = radius; agent->timeHorizon_ = timeHorizon; agent->velocity_ = velocity; agent->id_ = agents_.size(); agents_.push_back(agent); return agents_.size() - 1U; } void RVOSimulator::doStep() { kdTree_->buildAgentTree(); #ifdef _OPENMP #pragma omp parallel for #endif /* _OPENMP */ for (int i = 0; i < static_cast(agents_.size()); ++i) { agents_[i]->computeNeighbors(); agents_[i]->computeNewVelocity(); } #ifdef _OPENMP #pragma omp parallel for #endif /* _OPENMP */ for (int i = 0; i < static_cast(agents_.size()); ++i) { agents_[i]->update(); } globalTime_ += timeStep_; } std::size_t RVOSimulator::getAgentMaxNeighbors(std::size_t agentNo) const { return agents_[agentNo]->maxNeighbors_; } float RVOSimulator::getAgentMaxSpeed(std::size_t agentNo) const { return agents_[agentNo]->maxSpeed_; } float RVOSimulator::getAgentNeighborDist(std::size_t agentNo) const { return agents_[agentNo]->neighborDist_; } const Vector3 &RVOSimulator::getAgentPosition(std::size_t agentNo) const { return agents_[agentNo]->position_; } const Vector3 &RVOSimulator::getAgentPrefVelocity(std::size_t agentNo) const { return agents_[agentNo]->prefVelocity_; } float RVOSimulator::getAgentRadius(std::size_t agentNo) const { return agents_[agentNo]->radius_; } float RVOSimulator::getAgentTimeHorizon(std::size_t agentNo) const { return agents_[agentNo]->timeHorizon_; } const Vector3 &RVOSimulator::getAgentVelocity(std::size_t agentNo) const { return agents_[agentNo]->velocity_; } void RVOSimulator::setAgentDefaults(float neighborDist, std::size_t maxNeighbors, float timeHorizon, float radius, float maxSpeed, const Vector3 &velocity) { if (defaultAgent_ == NULL) { defaultAgent_ = new Agent(this); } defaultAgent_->maxNeighbors_ = maxNeighbors; defaultAgent_->maxSpeed_ = maxSpeed; defaultAgent_->neighborDist_ = neighborDist; defaultAgent_->radius_ = radius; defaultAgent_->timeHorizon_ = timeHorizon; defaultAgent_->velocity_ = velocity; } void RVOSimulator::setAgentMaxNeighbors(std::size_t agentNo, std::size_t maxNeighbors) { agents_[agentNo]->maxNeighbors_ = maxNeighbors; } void RVOSimulator::setAgentMaxSpeed(std::size_t agentNo, float maxSpeed) { agents_[agentNo]->maxSpeed_ = maxSpeed; } void RVOSimulator::setAgentNeighborDist(std::size_t agentNo, float neighborDist) { agents_[agentNo]->neighborDist_ = neighborDist; } void RVOSimulator::setAgentPosition(std::size_t agentNo, const Vector3 &position) { agents_[agentNo]->position_ = position; } void RVOSimulator::setAgentPrefVelocity(std::size_t agentNo, const Vector3 &prefVelocity) { agents_[agentNo]->prefVelocity_ = prefVelocity; } void RVOSimulator::setAgentRadius(std::size_t agentNo, float radius) { agents_[agentNo]->radius_ = radius; } void RVOSimulator::setAgentTimeHorizon(std::size_t agentNo, float timeHorizon) { agents_[agentNo]->timeHorizon_ = timeHorizon; } void RVOSimulator::setAgentVelocity(std::size_t agentNo, const Vector3 &velocity) { agents_[agentNo]->velocity_ = velocity; } } /* namespace RVO */ ================================================ FILE: src/RVOSimulator.h ================================================ /* * RVOSimulator.h * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #ifndef RVO3D_RVO_SIMULATOR_H_ #define RVO3D_RVO_SIMULATOR_H_ /** * @file RVOSimulator.h * @brief Contains the RVOSimulator class. */ #include #include #include #include "Export.h" #include "Vector3.h" namespace RVO { class Agent; class KdTree; class Plane; /** * @brief Error value. A value equal to the largest unsigned integer, which is * returned in case of an error by functions in RVO::RVOSimulator. */ const std::size_t RVO3D_ERROR = std::numeric_limits::max(); /** * @brief Defines the simulation. The main class of the library that contains * all simulation functionality. */ class RVO3D_EXPORT RVOSimulator { public: /** * @brief Constructs a simulator instance. */ RVOSimulator(); /** * @brief Constructs a simulator instance and sets the default properties * for any new agent that is added. * @param[in] timeStep The time step of the simulation. Must be positive. * @param[in] neighborDist The default maximum distance (center point to * center point) to other agents a new agent takes * into account in the navigation. The larger this * number, the longer the running time of the * simulation. If the number is too low, the * simulation will not be safe. Must be non-negative. * @param[in] maxNeighbors The default maximum number of other agents a new * agent takes into account in the navigation. The * larger this number, the longer the running time of * the simulation. If the number is too low, the * simulation will not be safe. * @param[in] timeHorizon The default minimum amount of time for which a new * agent's velocities that are computed by the * simulation are safe with respect to other agents. * The larger this number, the sooner an agent will * respond to the presence of other agents, but the * less freedom the agent has in choosing its * velocities. Must be positive. * @param[in] radius The default radius of a new agent. Must be * non-negative. * @param[in] maxSpeed The default maximum speed of a new agent. Must be * non-negative. * @param[in] velocity The default initial three-dimensional linear * velocity of a new agent (optional). */ RVOSimulator(float timeStep, float neighborDist, std::size_t maxNeighbors, float timeHorizon, float radius, float maxSpeed, const Vector3 &velocity = Vector3()); /** * @brief Destroys this simulator instance. */ ~RVOSimulator(); /** * @brief Adds a new agent with default properties to the simulation. * @param[in] position The three-dimensional starting position of this agent. * @return The number of the agent or RVO::RVO3D_ERROR when the agent * defaults have not been set. */ std::size_t addAgent(const Vector3 &position); /** * @brief Adds a new agent to the simulation. * @param[in] position The three-dimensional starting position of this * agent. * @param[in] neighborDist The maximum distance (center point to center * point) to other agents this agent takes into * account in the navigation. The larger this number, * the longer the running time of the simulation. If * the number is too low, the simulation will not be * safe. Must be non-negative. * @param[in] maxNeighbors The maximum number of other agents this agent takes * into account in the navigation. The larger this * number, the longer the running time of the * simulation. If the number is too low, the * simulation will not be safe. * @param[in] timeHorizon The minimum amount of time for which this agent's * velocities that are computed by the simulation are * safe with respect to other agents. The larger this * number, the sooner this agent will respond to the * presence of other agents, but the less freedom this * agent has in choosing its velocities. Must be * positive. * @param[in] radius The radius of this agent. Must be non-negative. * @param[in] maxSpeed The maximum speed of this agent. Must be * non-negative. * @param[in] velocity The initial three-dimensional linear velocity of * this agent (optional). * @return The number of the agent. */ std::size_t addAgent(const Vector3 &position, float neighborDist, std::size_t maxNeighbors, float timeHorizon, float radius, float maxSpeed, const Vector3 &velocity = Vector3()); /** * @brief Lets the simulator perform a simulation step and updates the * three-dimensional position and three-dimensional velocity of each * agent. */ void doStep(); /** * @brief Returns the specified agent neighbor of the specified agent. * @param[in] agentNo The number of the agent whose agent neighbor is to * be retrieved. * @param[in] neighborNo The number of the agent neighbor to be retrieved. * @return The number of the neighboring agent. */ std::size_t getAgentAgentNeighbor(std::size_t agentNo, std::size_t neighborNo) const; /** * @brief Returns the maximum neighbor count of a specified agent. * @param[in] agentNo The number of the agent whose maximum neighbor count is * to be retrieved. * @return The present maximum neighbor count of the agent. */ std::size_t getAgentMaxNeighbors(std::size_t agentNo) const; /** * @brief Returns the maximum speed of a specified agent. * @param[in] agentNo The number of the agent whose maximum speed is to be * retrieved. * @return The present maximum speed of the agent. */ float getAgentMaxSpeed(std::size_t agentNo) const; /** * @brief Returns the maximum neighbor distance of a specified agent. * @param[in] agentNo The number of the agent whose maximum neighbor distance * is to be retrieved. * @return The present maximum neighbor distance of the agent. */ float getAgentNeighborDist(std::size_t agentNo) const; /** * @brief Returns the count of agent neighbors taken into account to * compute the current velocity for the specified agent. * @param[in] agentNo The number of the agent whose count of agent neighbors * is to be retrieved. * @return The count of agent neighbors taken into account to compute the * current velocity for the specified agent. */ std::size_t getAgentNumAgentNeighbors(std::size_t agentNo) const; /** * @brief Returns the count of ORCA constraints used to compute the * current velocity for the specified agent. * @param[in] agentNo The number of the agent whose count of ORCA constraints * i to be retrieved. * @return The count of ORCA constraints used to compute the current * velocity for the specified agent. */ std::size_t getAgentNumORCAPlanes(std::size_t agentNo) const; /** * @brief Returns the specified ORCA constraint of the specified agent. * @param[in] agentNo The number of the agent whose ORCA constraint is to be * retrieved. * @param[in] planeNo The number of the ORCA constraint to be retrieved. * @return A plane representing the specified ORCA constraint. * @note The halfspace to which the normal of the plane points is the * region of permissible velocities with respect to the specified * ORCA constraint. */ const Plane &getAgentORCAPlane(std::size_t agentNo, std::size_t planeNo) const; /** * @brief Returns the three-dimensional position of a specified agent. * @param[in] agentNo The number of the agent whose three-dimensional position * is to be retrieved. * @return The present three-dimensional position of the (center of the) * agent. */ const Vector3 &getAgentPosition(std::size_t agentNo) const; /** * @brief Returns the three-dimensional preferred velocity of a specified * agent. * @param[in] agentNo The number of the agent whose three-dimensional * preferred velocity is to be retrieved. * @return The present three-dimensional preferred velocity of the agent. */ const Vector3 &getAgentPrefVelocity(std::size_t agentNo) const; /** * @brief Returns the radius of a specified agent. * @param[in] agentNo The number of the agent whose radius is to be retrieved. * @return The present radius of the agent. */ float getAgentRadius(std::size_t agentNo) const; /** * @brief Returns the time horizon of a specified agent. * @param[in] agentNo The number of the agent whose time horizon is to be * retrieved. * @return The present time horizon of the agent. */ float getAgentTimeHorizon(std::size_t agentNo) const; /** * @brief Returns the three-dimensional linear velocity of a specified * agent. * @param[in] agentNo The number of the agent whose three-dimensional linear * velocity is to be retrieved. * @return The present three-dimensional linear velocity of the agent. */ const Vector3 &getAgentVelocity(std::size_t agentNo) const; /** * @brief Returns the global time of the simulation. * @return The present global time of the simulation (zero initially). */ float getGlobalTime() const { return globalTime_; } /** * @brief Returns the count of agents in the simulation. * @return The count of agents in the simulation. */ std::size_t getNumAgents() const { return agents_.size(); } /** * @brief Returns the time step of the simulation. * @return The present time step of the simulation. */ float getTimeStep() const { return timeStep_; } /** * @brief Removes an agent from the simulation. * @param[in] agentNo The number of the agent that is to be removed. * @note After the removal of the agent, the agent that previously had * number getNumAgents() - 1 will now have number agentNo. */ void removeAgent(std::size_t agentNo); /** * @brief Sets the default properties for any new agent that is added. * @param[in] neighborDist The default maximum distance (center point to * center point) to other agents a new agent takes * into account in the navigation. The larger this * number, the longer he running time of the * simulation. If the number is too low, the * simulation will not be safe. Must be non-negative. * @param[in] maxNeighbors The default maximum number of other agents a new * agent takes into account in the navigation. The * larger this number, the longer the running time of * the simulation. If the number is too low, the * simulation will not be safe. * @param[in] timeHorizon The default minimum amount of time for which a new * agent's velocities that are computed by the * simulation are safe with respect to other agents. * The larger this number, the sooner an agent will * respond to the presence of other agents, but the * less freedom the agent has in choosing its * velocities. Must be positive. * @param[in] radius The default radius of a new agent. Must be * non-negative. * @param[in] maxSpeed The default maximum speed of a new agent. Must be * non-negative. * @param[in] velocity The default initial three-dimensional linear * velocity of a new agent (optional). */ void setAgentDefaults(float neighborDist, std::size_t maxNeighbors, float timeHorizon, float radius, float maxSpeed, const Vector3 &velocity = Vector3()); /** * @brief Sets the maximum neighbor count of a specified agent. * @param[in] agentNo The number of the agent whose maximum neighbor * count is to be modified. * @param[in] maxNeighbors The replacement maximum neighbor count. */ void setAgentMaxNeighbors(std::size_t agentNo, std::size_t maxNeighbors); /** * @brief Sets the maximum speed of a specified agent. * @param[in] agentNo The number of the agent whose maximum speed is to be * modified. * @param[in] maxSpeed The replacement maximum speed. Must be non-negative. */ void setAgentMaxSpeed(std::size_t agentNo, float maxSpeed); /** * @brief Sets the maximum neighbor distance of a specified agent. * @param[in] agentNo The number of the agent whose maximum neighbor * distance is to be modified. * @param[in] neighborDist The replacement maximum neighbor distance. Must be * non-negative. */ void setAgentNeighborDist(std::size_t agentNo, float neighborDist); /** * @brief Sets the three-dimensional position of a specified agent. * @param[in] agentNo The number of the agent whose three-dimensional * position is to be modified. * @param[in] position The replacement of the three-dimensional position. */ void setAgentPosition(std::size_t agentNo, const Vector3 &position); /** * @brief Sets the three-dimensional preferred velocity of a specified * agent. * @param[in] agentNo The number of the agent whose three-dimensional * preferred velocity is to be modified. * @param[in] prefVelocity The replacement of the three-dimensional preferred * velocity. */ void setAgentPrefVelocity(std::size_t agentNo, const Vector3 &prefVelocity); /** * @brief Sets the radius of a specified agent. * @param[in] agentNo The number of the agent whose radius is to be modified. * @param[in] radius The replacement radius. Must be non-negative. */ void setAgentRadius(std::size_t agentNo, float radius); /** * @brief Sets the time horizon of a specified agent with respect to other * agents. * @param[in] agentNo The number of the agent whose time horizon is to be * modified. * @param[in] timeHorizon The replacement time horizon with respect to other * agents. Must be positive. */ void setAgentTimeHorizon(std::size_t agentNo, float timeHorizon); /** * @brief Sets the three-dimensional linear velocity of a specified agent. * @param[in] agentNo The number of the agent whose three-dimensional linear * velocity is to be modified. * @param[in] velocity The replacement three-dimensional linear velocity. */ void setAgentVelocity(std::size_t agentNo, const Vector3 &velocity); /** * @brief Sets the time step of the simulation. * @param[in] timeStep The time step of the simulation. Must be positive. */ void setTimeStep(float timeStep) { timeStep_ = timeStep; } private: /* Not implemented. */ RVOSimulator(const RVOSimulator &other); /* Not implemented. */ RVOSimulator &operator=(const RVOSimulator &other); Agent *defaultAgent_; KdTree *kdTree_; float globalTime_; float timeStep_; std::vector agents_; friend class Agent; friend class KdTree; }; } /* namespace RVO */ #endif /* RVO3D_RVO_SIMULATOR_H_ */ ================================================ FILE: src/Vector3.cc ================================================ /* * Vector3.cc * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #include "Vector3.h" #include #include namespace RVO { Vector3::Vector3() : val_() { val_[0] = 0.0F; val_[1] = 0.0F; val_[2] = 0.0F; } Vector3::Vector3(const Vector3 &vector) : val_() { val_[0] = vector[0]; val_[1] = vector[1]; val_[2] = vector[2]; } Vector3::Vector3(const float val[3]) : val_() { val_[0] = val[0]; val_[1] = val[1]; val_[2] = val[2]; } Vector3::Vector3(float x, float y, float z) : val_() { val_[0] = x; val_[1] = y; val_[2] = z; } Vector3::~Vector3() {} Vector3 &Vector3::operator=(const Vector3 &vector) { if (this != &vector) { val_[0] = vector[0]; val_[1] = vector[1]; val_[2] = vector[2]; } return *this; } float Vector3::operator[](std::size_t i) const { return val_[i]; } float &Vector3::operator[](std::size_t i) { return val_[i]; } Vector3 Vector3::operator-() const { return Vector3(-val_[0], -val_[1], -val_[2]); } float Vector3::operator*(const Vector3 &vector) const { return val_[0] * vector[0] + val_[1] * vector[1] + val_[2] * vector[2]; } Vector3 Vector3::operator*(float scalar) const { return Vector3(val_[0] * scalar, val_[1] * scalar, val_[2] * scalar); } Vector3 Vector3::operator/(float scalar) const { const float invScalar = 1.0F / scalar; return Vector3(val_[0] * invScalar, val_[1] * invScalar, val_[2] * invScalar); } Vector3 Vector3::operator+(const Vector3 &vector) const { return Vector3(val_[0] + vector[0], val_[1] + vector[1], val_[2] + vector[2]); } Vector3 Vector3::operator-(const Vector3 &vector) const { return Vector3(val_[0] - vector[0], val_[1] - vector[1], val_[2] - vector[2]); } bool Vector3::operator==(const Vector3 &vector) const { return val_[0] == vector[0] && val_[1] == vector[1] && val_[2] == vector[2]; } bool Vector3::operator!=(const Vector3 &vector) const { return val_[0] != vector[0] || val_[1] != vector[1] || val_[2] != vector[2]; } Vector3 &Vector3::operator*=(float scalar) { val_[0] *= scalar; val_[1] *= scalar; val_[2] *= scalar; return *this; } Vector3 &Vector3::operator/=(float scalar) { const float invScalar = 1.0F / scalar; val_[0] *= invScalar; val_[1] *= invScalar; val_[2] *= invScalar; return *this; } Vector3 &Vector3::operator+=(const Vector3 &vector) { val_[0] += vector[0]; val_[1] += vector[1]; val_[2] += vector[2]; return *this; } Vector3 &Vector3::operator-=(const Vector3 &vector) { val_[0] -= vector[0]; val_[1] -= vector[1]; val_[2] -= vector[2]; return *this; } Vector3 operator*(float scalar, const Vector3 &vector) { return Vector3(scalar * vector[0], scalar * vector[1], scalar * vector[2]); } std::ostream &operator<<(std::ostream &stream, const Vector3 &vector) { stream << "(" << vector[0] << "," << vector[1] << "," << vector[2] << ")"; return stream; } float abs(const Vector3 &vector) { return std::sqrt(vector * vector); } float absSq(const Vector3 &vector) { return vector * vector; } Vector3 cross(const Vector3 &vector1, const Vector3 &vector2) { return Vector3(vector1[1] * vector2[2] - vector1[2] * vector2[1], vector1[2] * vector2[0] - vector1[0] * vector2[2], vector1[0] * vector2[1] - vector1[1] * vector2[0]); } Vector3 normalize(const Vector3 &vector) { return vector / abs(vector); } } /* namespace RVO */ ================================================ FILE: src/Vector3.h ================================================ /* * Vector3.h * RVO2-3D Library * * SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Please send all bug reports to . * * The authors may be contacted via: * * Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha * Dept. of Computer Science * 201 S. Columbia St. * Frederick P. Brooks, Jr. Computer Science Bldg. * Chapel Hill, N.C. 27599-3175 * United States of America * * */ #ifndef RVO3D_VECTOR3_H_ #define RVO3D_VECTOR3_H_ /** * @file Vector3.h * @brief Contains the Vector3 class. */ #include #include #include "Export.h" namespace RVO { /** * @brief Defines a three-dimensional vector. */ class RVO3D_EXPORT Vector3 { public: /** * @brief Constructs and initializes a three-dimensional vector instance to * zero. */ Vector3(); /** * @brief Constructs and initializes a three-dimensional vector from the * specified three-dimensional vector. * @param[in] vector The three-dimensional vector containing the * xyz-coordinates. */ Vector3(const Vector3 &vector); /** * @brief Constructs and initializes a three-dimensional vector from the * specified three-element array. * @param[in] val The three-element array containing the xyz-coordinates. */ explicit Vector3(const float val[3]); /** * @brief Constructs and initializes a three-dimensional vector from the * specified xyz-coordinates. * @param[in] x The x-coordinate of the three-dimensional vector. * @param[in] y The y-coordinate of the three-dimensional vector. * @param[in] z The z-coordinate of the three-dimensional vector. */ Vector3(float x, float y, float z); /** * @brief Destroys this three-dimensional vector instance. */ ~Vector3(); /** * @brief Returns the x-coordinate of this three-dimensional vector. * @return The x-coordinate of the three-dimensional vector. */ float x() const { return val_[0]; } /** * @brief Returns the y-coordinate of this three-dimensional vector. * @return The y-coordinate of the three-dimensional vector. */ float y() const { return val_[1]; } /** * @brief Returns the z-coordinate of this three-dimensional vector. * @return The z-coordinate of the three-dimensional vector. */ float z() const { return val_[2]; } /** * @brief Assigns a copy of the specified three-dimensional vector to * this three-dimensional vector instance. * @param[in] vector The three-dimensional vector containing the * xyz-coordinates. * @return A reference to this three-dimensional vector instance. */ Vector3 &operator=(const Vector3 &vector); /** * @brief Returns the specified coordinate of this three-dimensional * vector. * @param[in] i The coordinate that should be returned (0 <= i < 3). * @return The specified coordinate of the three-dimensional vector. */ float operator[](std::size_t i) const; /** * @brief Returns a reference to the specified coordinate of this * three-dimensional vector. * @param[in] i The coordinate to which a reference should be returned * (0 <= i < 3). * @return A reference to the specified coordinate of the three-dimensional * vector. */ float &operator[](std::size_t i); /** * @brief Computes the negation of this three-dimensional vector. * @return The negation of this three-dimensional vector. */ Vector3 operator-() const; /** * @brief Computes the dot product of this three-dimensional vector with * the specified three-dimensional vector. * @param[in] vector The three-dimensional vector with which the dot product * should be computed. * @return The dot product of this three-dimensional vector with a * specified three-dimensional vector. */ float operator*(const Vector3 &vector) const; /** * @brief Computes the scalar multiplication of this three-dimensional * vector with the specified scalar value. * @param[in] scalar The scalar value with which the scalar multiplication * should be computed. * @return The scalar multiplication of this three-dimensional vector with * a specified scalar value. */ Vector3 operator*(float scalar) const; /** * @brief Computes the scalar division of this three-dimensional vector * with the specified scalar value. * @param[in] scalar The scalar value with which the scalar division should be * computed. * @return The scalar division of this three-dimensional vector with a * specified scalar value. */ Vector3 operator/(float scalar) const; /** * @brief Computes the vector sum of this three-dimensional vector with * the specified three-dimensional vector. * @param[in] vector The three-dimensional vector with which the vector sum * should be computed. * @return The vector sum of this three-dimensional vector with a specified * three-dimensional vector. */ Vector3 operator+(const Vector3 &vector) const; /** * @brief Computes the vector difference of this three-dimensional vector * with the specified three-dimensional vector. * @param[in] vector The three-dimensional vector with which the vector * difference should be computed. * @return The vector difference of this three-dimensional vector with a * specified three-dimensional vector. */ Vector3 operator-(const Vector3 &vector) const; /** * @brief Tests this three-dimensional vector for equality with the * specified three-dimensional vector. * @param[in] vector The three-dimensional vector with which to test for * equality. * @return True if the three-dimensional vectors are equal. */ bool operator==(const Vector3 &vector) const; /** * @brief Tests this three-dimensional vector for inequality with the * specified three-dimensional vector * @param[in] vector The three-dimensional vector with which to test for * inequality. * @return True if the three-dimensional vectors are not equal. */ bool operator!=(const Vector3 &vector) const; /** * @brief Sets the value of this three-dimensional vector to the scalar * multiplication of itself with the specified scalar value. * @param[in] scalar The scalar value with which the scalar multiplication * should be computed. * @return A reference to this three-dimensional vector. */ Vector3 &operator*=(float scalar); /** * @brief Sets the value of this three-dimensional vector to the scalar * division of itself with the specified scalar value. * @param[in] scalar The scalar value with which the scalar division should be * computed. * @return A reference to this three-dimensional vector. */ Vector3 &operator/=(float scalar); /** * @brief Sets the value of this three-dimensional vector to the vector * sum of itself with the specified three-dimensional vector. * @param[in] vector The three-dimensional vector with which the vector sum * should be computed. * @return A reference to this three-dimensional vector. */ Vector3 &operator+=(const Vector3 &vector); /** * @brief Sets the value of this three-dimensional vector to the vector * difference of itself with the specified three-dimensional * vector. * @param[in] vector The three-dimensional vector with which the vector * difference should be computed. * @return A reference to this three-dimensional vector. */ Vector3 &operator-=(const Vector3 &vector); private: float val_[3]; }; /** * @relates Vector3 * @brief Computes the scalar multiplication of the specified * three-dimensional vector with the specified scalar value. * @param[in] scalar The scalar value with which the scalar multiplication * should be computed. * @param[in] vector The three-dimensional vector with which the scalar * multiplication should be computed. * @return The scalar multiplication of the three-dimensional vector with the * scalar value. */ RVO3D_EXPORT Vector3 operator*(float scalar, const Vector3 &vector); /** * @relates Vector3 * @brief Inserts the specified three-dimensional vector into the * specified output stream. * @param[in,out] os The output stream into which the three-dimensional * vector should be inserted. * @param[in] vector The three-dimensional vector which to insert into the * output stream. * @return A reference to the output stream. */ RVO3D_EXPORT std::ostream &operator<<(std::ostream &stream, const Vector3 &vector); /** * @relates Vector3 * @brief Computes the length of a specified three-dimensional vector. * @param[in] vector The three-dimensional vector whose length is to be * computed. * @return The length of the three-dimensional vector. */ RVO3D_EXPORT float abs(const Vector3 &vector); /** * @relates Vector3 * @brief Computes the squared length of a specified three-dimensional * vector. * @param[in] vector The three-dimensional vector whose squared length is to be * computed. * @return The squared length of the three-dimensional vector. */ RVO3D_EXPORT float absSq(const Vector3 &vector); /** * @relates Vector3 * @brief Computes the cross product of the specified three-dimensional * vectors. * @param[in] vector1 The first vector with which the cross product should be * computed. * @param[in] vector2 The second vector with which the cross product should be * computed. * @return The cross product of the two specified vectors. */ RVO3D_EXPORT Vector3 cross(const Vector3 &vector1, const Vector3 &vector2); /** * @relates Vector3 * @brief Computes the normalization of the specified three-dimensiona * vector. * @param[in] vector The three-dimensional vector whose normalization is to be * computed. * @return The normalization of the three-dimensional vector. */ RVO3D_EXPORT Vector3 normalize(const Vector3 &vector); } /* namespace RVO */ #endif /* RVO3D_VECTOR3_H_ */ ================================================ FILE: triggers ================================================ # # triggers # RVO2-3D Library # # SPDX-FileCopyrightText: 2008 University of North Carolina at Chapel Hill # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Please send all bug reports to . # # The authors may be contacted via: # # Jur van den Berg, Stephen J. Guy, Jamie Snape, Ming C. Lin, Dinesh Manocha # Dept. of Computer Science # 201 S. Columbia St. # Frederick P. Brooks, Jr. Computer Science Bldg. # Chapel Hill, N.C. 27599-3175 # United States of America # # # interest-await ldconfig