diff --git a/.travis.yml b/.travis.yml index 86221ab..68eaaaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,5 +10,5 @@ os: script: - mkdir _build - cd _build - - cmake .. + - cmake -DCMAKE_CXX_FLAGS=-DHRVO_OUTPUT_TIME_AND_POSITIONS=0 .. - ctest --extra-verbose --dashboard Experimental . diff --git a/CMakeLists.txt b/CMakeLists.txt index 1796c52..5eb1159 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,43 +2,19 @@ # CMakeLists.txt # HRVO Library # -# Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. -# All rights reserved. -# -# Permission to use, copy, modify, and distribute this software and its -# documentation for educational, non-commercial research, and non-profit -# purposes, without fee, and without a written agreement is hereby granted, -# provided that the above copyright notice, this paragraph, and the following -# four paragraphs appear in all copies. -# -# Permission to incorporate this software into commercial products may be -# obtained by contacting the authors or the Office of -# Technology Development at the University of North Carolina at Chapel Hill -# . -# -# This software program and documentation are copyrighted by the University of -# North Carolina at Chapel Hill. The software program and documentation are -# supplied as is, without any accompanying services from the University of -# North Carolina at Chapel Hill or the authors. The University of North Carolina -# at Chapel Hill and the authors do not warrant that the operation of the -# program will be uninterrupted or error-free. The end-user understands that the -# program was developed for research purposes and is advised not to rely -# exclusively on the program for any reason. -# -# IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE -# AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR -# CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS -# SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT -# CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH -# DAMAGE. -# -# THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY -# DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY STATUTORY -# WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON AN AS IS -# BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS -# HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR -# MODIFICATIONS. +# Copyright 2009 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 +# +# 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. # # Please send all bug reports to . # diff --git a/COPYING b/COPYING deleted file mode 100644 index 7bc9ee2..0000000 --- a/COPYING +++ /dev/null @@ -1,37 +0,0 @@ -HRVO Library - -Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. -All rights reserved. - -Permission to use, copy, modify, and distribute this software and its -documentation for educational, non-commercial research, and non-profit purposes, -without fee, and without a written agreement is hereby granted, provided that -the above copyright notice, this paragraph, and the following four paragraphs -appear in all copies. - -Permission to incorporate this software into commercial products may be obtained -by contacting the authors or the Office of Technology -Development at the University of North Carolina at Chapel Hill . - -This software program and documentation are copyrighted by the University of -North Carolina at Chapel Hill. The software program and documentation are -supplied "as is," without any accompanying services from the University of North -Carolina at Chapel Hill or the authors. The University of North Carolina at -Chapel Hill and the authors do not warrant that the operation of the program -will be uninterrupted or error-free. The end-user understands that the program -was developed for research purposes and is advised not to rely exclusively on -the program for any reason. - -IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE AUTHORS -BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR -CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS -SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT -CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY -DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY STATUTORY -WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" -BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS HAVE -NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR -MODIFICATIONS. diff --git a/CTestConfig.cmake b/CTestConfig.cmake index aaff675..accf3cc 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -2,43 +2,19 @@ # CTestConfig.cmake # HRVO Library # -# Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. -# All rights reserved. -# -# Permission to use, copy, modify, and distribute this software and its -# documentation for educational, non-commercial research, and non-profit -# purposes, without fee, and without a written agreement is hereby granted, -# provided that the above copyright notice, this paragraph, and the following -# four paragraphs appear in all copies. -# -# Permission to incorporate this software into commercial products may be -# obtained by contacting the authors or the Office of -# Technology Development at the University of North Carolina at Chapel Hill -# . -# -# This software program and documentation are copyrighted by the University of -# North Carolina at Chapel Hill. The software program and documentation are -# supplied as is, without any accompanying services from the University of -# North Carolina at Chapel Hill or the authors. The University of North Carolina -# at Chapel Hill and the authors do not warrant that the operation of the -# program will be uninterrupted or error-free. The end-user understands that the -# program was developed for research purposes and is advised not to rely -# exclusively on the program for any reason. -# -# IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE -# AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR -# CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS -# SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT -# CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH -# DAMAGE. -# -# THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY -# DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY STATUTORY -# WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON AN AS IS -# BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS -# HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR -# MODIFICATIONS. +# Copyright 2009 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 +# +# 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. # # Please send all bug reports to . # diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + 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. diff --git a/README.md b/README.md index 1618c51..b881538 100644 --- a/README.md +++ b/README.md @@ -3,56 +3,34 @@ The Hybrid Reciprocal Velocity Obstacle -Copyright © 2009-2015 University of North Carolina at Chapel Hill. All -rights reserved. +We present the hybrid reciprocal velocity obstacle for collision-free and +oscillation-free navigation of multiple mobile robots or virtual agents. +Each robot senses its surroundings and acts independently without central +coordination or communication with other robots. Our approach uses both +the current position and the velocity of other robots to compute their +future trajectories in order to avoid collisions. Moreover, our approach +is reciprocal and avoids oscillations by explicitly taking into account +that the other robots also sense their surroundings and change their +trajectories accordingly. We apply hybrid reciprocal velocity obstacles +to iRobot Create mobile robots and demonstrate direct, collision-free, +and oscillation-free navigation. [![Build Status](https://travis-ci.org/snape/HRVO.svg?branch=master)](https://travis-ci.org/snape/HRVO) [![Build status](https://ci.appveyor.com/api/projects/status/ordfo2c7kpsmdp7r/branch/master?svg=true)](https://ci.appveyor.com/project/snape/hrvo/branch/master) -We present the hybrid reciprocal velocity obstacle for collision-free and -oscillation-free navigation of multiple mobile robots or virtual agents. Each -robot senses its surroundings and acts independently without central -coordination or communication with other robots. Our approach uses both the -current position and the velocity of other robots to compute their future -trajectories in order to avoid collisions. Moreover, our approach is reciprocal -and avoids oscillations by explicitly taking into account that the other robots -also sense their surroundings and change their trajectories accordingly. We -apply hybrid reciprocal velocity obstacles to iRobot Create mobile robots and -demonstrate direct, collision-free, and oscillation-free navigation. - -Permission to use, copy, modify, and distribute this software and its -documentation for educational, non-commercial research, and non-profit purposes, -without fee, and without a written agreement is hereby granted, provided that -the above copyright notice, this paragraph, and the following four paragraphs -appear in all copies. - -Permission to incorporate this software into commercial products may be obtained -by contacting the authors ([geom@cs.unc.edu](mailto:geom@cs.unc.edu)) or the -Office of Technology Development at the University of North Carolina at Chapel -Hill ([otd@unc.edu](mailto:otd@unc.edu)). +Copyright 2009 University of North Carolina at Chapel Hill -This software program and documentation are copyrighted by the University of -North Carolina at Chapel Hill. The software program and documentation are -supplied "as is," without any accompanying services from the University of North -Carolina at Chapel Hill or the authors. The University of North Carolina at -Chapel Hill and the authors do not warrant that the operation of the program -will be uninterrupted or error-free. The end-user understands that the program -was developed for research purposes and is advised not to rely exclusively on -the program for any reason. +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 -IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE AUTHORS -BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR -CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS -SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT -CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + -THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY -DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY STATUTORY -WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" -BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS HAVE -NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR -MODIFICATIONS. +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). diff --git a/appveyor.yml b/appveyor.yml index d8df2ee..e74757f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,11 +1,11 @@ --- -version: 1.0.{build} +version: 1.0.1.{build} os: - Visual Studio 2013 - Visual Studio 2015 build_script: - md _build - cd _build - - cmake -A x64 .. + - cmake -A x64 -DCMAKE_CXX_FLAGS=/DHRVO_OUTPUT_TIME_AND_POSITIONS=0 .. - ctest --build-config Release --extra-verbose --dashboard Experimental . test: off diff --git a/doc/Doxyfile b/doc/Doxyfile index f07115b..773d6e8 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -1,11 +1,11 @@ -# Doxyfile 1.8.10 +# Doxyfile 1.8.11 #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = "HRVO Library" -PROJECT_NUMBER = +PROJECT_NUMBER = 1.0.1 PROJECT_BRIEF = "The Hybrid Reciprocal Velocity Obstacle" PROJECT_LOGO = OUTPUT_DIRECTORY = @@ -95,6 +95,7 @@ WARNINGS = YES WARN_IF_UNDOCUMENTED = YES WARN_IF_DOC_ERROR = YES WARN_NO_PARAMDOC = NO +WARN_AS_ERROR = NO WARN_FORMAT = "$file:$line: $text" WARN_LOGFILE = #--------------------------------------------------------------------------- @@ -102,7 +103,8 @@ WARN_LOGFILE = #--------------------------------------------------------------------------- INPUT = ../src INPUT_ENCODING = UTF-8 -FILE_PATTERNS = *.h *.cpp +FILE_PATTERNS = *.h \ + *.cpp RECURSIVE = NO EXCLUDE = EXCLUDE_SYMLINKS = NO @@ -129,6 +131,8 @@ REFERENCES_LINK_SOURCE = YES SOURCE_TOOLTIPS = YES USE_HTAGS = NO VERBATIM_HEADERS = YES +CLANG_ASSISTED_PARSING = NO +CLANG_OPTIONS = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- @@ -213,6 +217,7 @@ LATEX_BATCHMODE = NO LATEX_HIDE_INDICES = NO LATEX_SOURCE_CODE = NO LATEX_BIB_STYLE = plain +LATEX_TIMESTAMP = NO #--------------------------------------------------------------------------- # Configuration options related to the RTF output #--------------------------------------------------------------------------- diff --git a/doc/footer.html b/doc/footer.html index 18fdf80..88e31f9 100644 --- a/doc/footer.html +++ b/doc/footer.html @@ -1,7 +1,7 @@ - + diff --git a/doc/header.html b/doc/header.html index 6907f24..0d1cf00 100644 --- a/doc/header.html +++ b/doc/header.html @@ -1,12 +1,11 @@ - + -$projectname: $title -$title +$projectname: $title diff --git a/doc/stylesheet.css b/doc/stylesheet.css index 3c05c7d..b476073 100644 --- a/doc/stylesheet.css +++ b/doc/stylesheet.css @@ -1,4 +1,4 @@ -/* The standard CSS for doxygen 1.8.10 */ +/* The standard CSS for doxygen 1.8.11 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; @@ -206,6 +206,11 @@ div.line { transition-duration: 0.5s; } +div.line:after { + content:"\000A"; + white-space: pre; +} + div.line.glow { background-color: cyan; box-shadow: 0 0 10px cyan; @@ -242,7 +247,7 @@ div.ah, span.ah { -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); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); } div.classindex ul { @@ -832,6 +837,10 @@ address { color: #2A3D61; } +table.doxtable caption { + caption-side: top; +} + table.doxtable { border-collapse:collapse; margin-top: 4px; @@ -997,6 +1006,18 @@ 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; @@ -1196,7 +1217,7 @@ div.toc { border-radius: 7px 7px 7px 7px; float: right; height: auto; - margin: 0 20px 10px 10px; + margin: 0 8px 10px 10px; width: 200px; } diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index c16acac..615a7d9 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -2,43 +2,19 @@ # examples/CMakeLists.txt # HRVO Library # -# Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. -# All rights reserved. -# -# Permission to use, copy, modify, and distribute this software and its -# documentation for educational, non-commercial research, and non-profit -# purposes, without fee, and without a written agreement is hereby granted, -# provided that the above copyright notice, this paragraph, and the following -# four paragraphs appear in all copies. -# -# Permission to incorporate this software into commercial products may be -# obtained by contacting the authors or the Office of -# Technology Development at the University of North Carolina at Chapel Hill -# . -# -# This software program and documentation are copyrighted by the University of -# North Carolina at Chapel Hill. The software program and documentation are -# supplied as is, without any accompanying services from the University of -# North Carolina at Chapel Hill or the authors. The University of North Carolina -# at Chapel Hill and the authors do not warrant that the operation of the -# program will be uninterrupted or error-free. The end-user understands that the -# program was developed for research purposes and is advised not to rely -# exclusively on the program for any reason. -# -# IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE -# AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR -# CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS -# SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT -# CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH -# DAMAGE. -# -# THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY -# DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY STATUTORY -# WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON AN AS IS -# BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS -# HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR -# MODIFICATIONS. +# Copyright 2009 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 +# +# 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. # # Please send all bug reports to . # diff --git a/examples/Circle.cpp b/examples/Circle.cpp index 9e18896..ebc80ba 100644 --- a/examples/Circle.cpp +++ b/examples/Circle.cpp @@ -2,43 +2,19 @@ * Circle.cpp * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * @@ -59,7 +35,9 @@ * \brief Example with 250 agents navigating through a circular environment. */ -#define HRVO_OUTPUT_TIME_AND_POSITIONS 0 +#ifndef HRVO_OUTPUT_TIME_AND_POSITIONS +#define HRVO_OUTPUT_TIME_AND_POSITIONS 1 +#endif #include diff --git a/src/API.h b/src/API.h new file mode 100644 index 0000000..3fdc435 --- /dev/null +++ b/src/API.h @@ -0,0 +1,67 @@ +/* + * API.h + * HRVO Library + * + * Copyright 2009 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 + * + * 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. + * + * Please send all bug reports to . + * + * The authors may be contacted via: + * + * Jamie Snape, Jur van den Berg, Stephen J. Guy, and 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 API.h + * \brief Defines macros related to Microsoft Windows. + */ + +#ifndef HRVO_API_H_ +#define HRVO_API_H_ + +#ifdef _WIN32 +#include +#define WIN32_LEAN_AND_MEAN +#define NOCOMM +#define NOIMAGE +#define NOIME +#define NOKANJI +#define NOMCX +#define NOMINMAX +#define NOPROXYSTUB +#define NOSERVICE +#define NOSOUND +#define NOTAPE +#define NORPC +#define _USE_MATH_DEFINES +#include +#endif + +#ifdef HRVO_EXPORTS +#define HRVO_API __declspec(dllexport) +#elif defined(HRVO_IMPORTS) +#define HRVO_API __declspec(dllimport) +#else +#define HRVO_API +#endif + +#endif /* HRVO_API_H_ */ diff --git a/src/Agent.cpp b/src/Agent.cpp index 0f1d219..c4fd251 100644 --- a/src/Agent.cpp +++ b/src/Agent.cpp @@ -2,43 +2,19 @@ * Agent.cpp * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * diff --git a/src/Agent.h b/src/Agent.h index c409826..33743ee 100644 --- a/src/Agent.h +++ b/src/Agent.h @@ -2,43 +2,19 @@ * Agent.h * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * @@ -62,6 +38,10 @@ #ifndef HRVO_AGENT_H_ #define HRVO_AGENT_H_ +#ifndef HRVO_API_H_ +#include "API.h" +#endif + #include #include #include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8b5c3a4..4f13635 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,43 +2,19 @@ # src/CMakeLists.txt # HRVO Library # -# Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. -# All rights reserved. +# Copyright 2009 University of North Carolina at Chapel Hill # -# Permission to use, copy, modify, and distribute this software and its -# documentation for educational, non-commercial research, and non-profit -# purposes, without fee, and without a written agreement is hereby granted, -# provided that the above copyright notice, this paragraph, and the following -# four paragraphs appear in all copies. +# 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 # -# Permission to incorporate this software into commercial products may be -# obtained by contacting the authors or the Office of -# Technology Development at the University of North Carolina at Chapel Hill -# . +# http://www.apache.org/licenses/LICENSE-2.0 # -# This software program and documentation are copyrighted by the University of -# North Carolina at Chapel Hill. The software program and documentation are -# supplied as is, without any accompanying services from the University of -# North Carolina at Chapel Hill or the authors. The University of North Carolina -# at Chapel Hill and the authors do not warrant that the operation of the -# program will be uninterrupted or error-free. The end-user understands that the -# program was developed for research purposes and is advised not to rely -# exclusively on the program for any reason. -# -# IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE -# AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR -# CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS -# SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT -# CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH -# DAMAGE. -# -# THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY -# DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY STATUTORY -# WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON AN AS IS -# BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS -# HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR -# MODIFICATIONS. +# 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 . # @@ -55,6 +31,7 @@ # set(HRVO_HEADERS + API.h HRVO.h Simulator.h Vector2.h) diff --git a/src/Definitions.h b/src/Definitions.h index 991591b..04d5744 100644 --- a/src/Definitions.h +++ b/src/Definitions.h @@ -2,43 +2,19 @@ * Definitions.h * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * @@ -62,6 +38,10 @@ #ifndef HRVO_DEFINITIONS_H_ #define HRVO_DEFINITIONS_H_ +#ifndef HRVO_API_H_ +#include "API.h" +#endif + namespace hrvo { /** * \brief A sufficiently small positive float. diff --git a/src/Goal.cpp b/src/Goal.cpp index 3d4c61e..76f3bf7 100644 --- a/src/Goal.cpp +++ b/src/Goal.cpp @@ -2,43 +2,19 @@ * Goal.cpp * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * diff --git a/src/Goal.h b/src/Goal.h index 4619ae8..f069df3 100644 --- a/src/Goal.h +++ b/src/Goal.h @@ -2,43 +2,19 @@ * Goal.h * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * @@ -62,6 +38,9 @@ #ifndef HRVO_GOAL_H_ #define HRVO_GOAL_H_ +#ifndef HRVO_API_H_ +#include "API.h" +#endif #ifndef HRVO_VECTOR2_H_ #include "Vector2.h" #endif diff --git a/src/HRVO.h b/src/HRVO.h index ceb4eef..dab615c 100644 --- a/src/HRVO.h +++ b/src/HRVO.h @@ -2,43 +2,19 @@ * HRVO.h * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * @@ -70,10 +46,13 @@ /** * \mainpage HRVO Library Documentation * \authors Jamie Snape, Jur van den Berg, Stephen J. Guy, and Dinesh Manocha - * \copyright 2009-2015 University of North Carolina at Chapel Hill. All rights reserved. + * \copyright 2009 University of North Carolina at Chapel Hill * \details We present the hybrid reciprocal velocity obstacle for collision-free and oscillation-free navigation of multiple mobile robots or virtual agents. Each robot or virtual agents senses its surroundings and acts independently without central coordination or communication with other robots or virtual agents. Our approach uses both the current position and the velocity of other robots or virtual agents to compute their future trajectories in order to avoid collisions. Moreover, our approach is reciprocal and avoids oscillations by explicitly taking into account that the other robots or virtual agents also sense their surroundings and change their trajectories accordingly. */ +#ifndef HRVO_API_H_ +#include "API.h" +#endif #ifndef HRVO_SIMULATOR_H_ #include "Simulator.h" #endif diff --git a/src/KdTree.cpp b/src/KdTree.cpp index 98240f9..246e165 100644 --- a/src/KdTree.cpp +++ b/src/KdTree.cpp @@ -2,43 +2,19 @@ * KdTree.cpp * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * diff --git a/src/KdTree.h b/src/KdTree.h index c79b908..1744936 100644 --- a/src/KdTree.h +++ b/src/KdTree.h @@ -2,43 +2,19 @@ * KdTree.h * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * @@ -62,6 +38,10 @@ #ifndef HRVO_KD_TREE_H_ #define HRVO_KD_TREE_H_ +#ifndef HRVO_API_H_ +#include "API.h" +#endif + #include #include diff --git a/src/Simulator.cpp b/src/Simulator.cpp index ec921ec..bfa7bbc 100644 --- a/src/Simulator.cpp +++ b/src/Simulator.cpp @@ -2,43 +2,19 @@ * Simulator.cpp * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * diff --git a/src/Simulator.h b/src/Simulator.h index 9aa0889..881c29e 100644 --- a/src/Simulator.h +++ b/src/Simulator.h @@ -2,43 +2,19 @@ * Simulator.h * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * @@ -62,6 +38,10 @@ #ifndef HRVO_SIMULATOR_H_ #define HRVO_SIMULATOR_H_ +#ifndef HRVO_API_H_ +#include "API.h" +#endif + #include #include @@ -83,7 +63,7 @@ namespace hrvo { * \class Simulator * \brief The simulation. */ - class Simulator { + class HRVO_API Simulator { public: /** * \brief Constructor. diff --git a/src/Vector2.cpp b/src/Vector2.cpp index 0d9a31d..438d8a0 100644 --- a/src/Vector2.cpp +++ b/src/Vector2.cpp @@ -2,43 +2,19 @@ * Vector2.cpp * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * diff --git a/src/Vector2.h b/src/Vector2.h index fd38777..e3a6ab2 100644 --- a/src/Vector2.h +++ b/src/Vector2.h @@ -2,43 +2,19 @@ * Vector2.h * HRVO Library * - * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill. - * All rights reserved. + * Copyright 2009 University of North Carolina at Chapel Hill * - * Permission to use, copy, modify, and distribute this software and its - * documentation for educational, non-commercial research, and non-profit - * purposes, without fee, and without a written agreement is hereby granted, - * provided that the above copyright notice, this paragraph, and the following - * four paragraphs appear in all copies. + * 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 * - * Permission to incorporate this software into commercial products may be - * obtained by contacting the authors or the Office of - * Technology Development at the University of North Carolina at Chapel Hill - * . + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software program and documentation are copyrighted by the University of - * North Carolina at Chapel Hill. The software program and documentation are - * supplied "as is," without any accompanying services from the University of - * North Carolina at Chapel Hill or the authors. The University of North - * Carolina at Chapel Hill and the authors do not warrant that the operation of - * the program will be uninterrupted or error-free. The end-user understands - * that the program was developed for research purposes and is advised not to - * rely exclusively on the program for any reason. - * - * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE - * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR - * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS - * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT - * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH - * DAMAGE. - * - * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY - * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY - * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON - * AN "AS IS" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE - * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, - * ENHANCEMENTS, OR MODIFICATIONS. + * 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 . * @@ -62,6 +38,10 @@ #ifndef HRVO_VECTOR2_H_ #define HRVO_VECTOR2_H_ +#ifndef HRVO_API_H_ +#include "API.h" +#endif + #include #include @@ -70,7 +50,7 @@ namespace hrvo { * \class Vector2 * \brief A vector in two dimensions. */ - class Vector2 { + class HRVO_API Vector2 { public: /** * \brief Constructor. @@ -254,7 +234,7 @@ namespace hrvo { * \param[in] vector The vector whose length is to be computed. * \return The length of the vector. */ - inline float abs(const Vector2 &vector) + HRVO_API inline float abs(const Vector2 &vector) { return std::sqrt(vector * vector); } @@ -265,7 +245,7 @@ namespace hrvo { * \param[in] vector The vector whose squared length is to be calculated. * \return The squared length of the vector. */ - inline float absSq(const Vector2 &vector) + HRVO_API inline float absSq(const Vector2 &vector) { return vector * vector; } @@ -276,7 +256,7 @@ namespace hrvo { * \param[in] vector The vector whose angle with the positive x-axis is to be calculated. * \return The angle in radians between the vector and the positive x-axis in the range [-PI, PI]. */ - inline float atan(const Vector2 &vector) + HRVO_API inline float atan(const Vector2 &vector) { return std::atan2(vector.getY(), vector.getX()); } @@ -288,7 +268,7 @@ namespace hrvo { * \param[in] vector2 The bottom row of the square matrix. * \return The determinant of the square matrix. */ - inline float det(const Vector2 &vector1, const Vector2 &vector2) + HRVO_API inline float det(const Vector2 &vector1, const Vector2 &vector2) { return vector1.getX() * vector2.getY() - vector1.getY() * vector2.getX(); } @@ -299,7 +279,7 @@ namespace hrvo { * \param[in] vector The vector whose normalization is to be calculated. * \return The normalization of the vector. */ - inline Vector2 normalize(const Vector2 &vector) + HRVO_API inline Vector2 normalize(const Vector2 &vector) { return vector / abs(vector); } @@ -311,7 +291,7 @@ namespace hrvo { * \param[in] vector2 The second end point of the line segment. * \return The normal vector of the line segment. */ - inline Vector2 normal(const Vector2 &vector1, const Vector2 &vector2) + HRVO_API inline Vector2 normal(const Vector2 &vector1, const Vector2 &vector2) { return normalize(Vector2(vector2.getY() - vector1.getY(), vector1.getX() - vector2.getX())); } @@ -323,7 +303,7 @@ namespace hrvo { * \param[in] vector The vector with which the scalar multiplication should be computed. * \return The scalar multiplication of the vector with the scalar value. */ - inline Vector2 operator*(float scalar, const Vector2 &vector) + HRVO_API inline Vector2 operator*(float scalar, const Vector2 &vector) { return Vector2(scalar * vector.getX(), scalar * vector.getY()); } @@ -335,7 +315,7 @@ namespace hrvo { * \param[in] vector The two-dimensional vector which to insert into the output stream. * \return A reference to the output stream. */ - std::ostream &operator<<(std::ostream &stream, const Vector2 &vector); + HRVO_API std::ostream &operator<<(std::ostream &stream, const Vector2 &vector); } #endif /* HRVO_VECTOR2_H_ */