├── .clang-format ├── .gitmodules ├── CMakeLists.txt ├── CONTRIBUTING.md ├── EnableExtraCompilerWarnings.cmake ├── FindMarkdown.cmake ├── LICENSE ├── NOTICE ├── OSGMathInterop.h ├── OSVRContext.cpp ├── OSVRContext.h ├── OSVRInterfaceData.cpp ├── OSVRInterfaceData.h ├── OSVRTrackerView.cpp ├── OSVRUpdateCallback.cpp ├── OSVRUpdateCallback.h ├── README.md ├── RPAxes.osg ├── RPAxes.osg.h ├── RPAxes.skp ├── UseMarkdown.cmake ├── ci-postbuild.cmd ├── ci-postbuild.ps1 ├── osvr-tracker-view-icon.svg ├── osvr_tracker_view.ico ├── osvr_tracker_view.rc └── redist ├── OpenSceneGraph-LICENSE.txt └── README-components-and-licenses.txt /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: LLVM 4 | Standard: Auto 5 | IndentWidth: 4 6 | TabWidth: 4 7 | UseTab: Never 8 | NamespaceIndentation: Inner 9 | 10 | # AccessModifierOffset: -2 11 | # ConstructorInitializerIndentWidth: 4 12 | # AlignEscapedNewlinesLeft: false 13 | # AlignTrailingComments: true 14 | # AllowAllParametersOfDeclarationOnNextLine: true 15 | # AllowShortBlocksOnASingleLine: false 16 | # AllowShortCaseLabelsOnASingleLine: false 17 | # AllowShortIfStatementsOnASingleLine: false 18 | # AllowShortLoopsOnASingleLine: false 19 | # AllowShortFunctionsOnASingleLine: All 20 | # AlwaysBreakAfterDefinitionReturnType: false 21 | # AlwaysBreakTemplateDeclarations: false 22 | # AlwaysBreakBeforeMultilineStrings: false 23 | # BreakBeforeBinaryOperators: None 24 | # BreakBeforeTernaryOperators: true 25 | # BreakConstructorInitializersBeforeComma: false 26 | # BinPackParameters: true 27 | # ColumnLimit: 80 28 | # ConstructorInitializerAllOnOneLineOrOnePerLine: false 29 | # DerivePointerAlignment: false 30 | # ExperimentalAutoDetectBinPacking: false 31 | # IndentCaseLabels: false 32 | # IndentWrappedFunctionNames: false 33 | # IndentFunctionDeclarationAfterType: false 34 | # MaxEmptyLinesToKeep: 1 35 | # KeepEmptyLinesAtTheStartOfBlocks: true 36 | # NamespaceIndentation: None 37 | # ObjCSpaceAfterProperty: false 38 | # ObjCSpaceBeforeProtocolList: true 39 | # PenaltyBreakBeforeFirstCallParameter: 19 40 | # PenaltyBreakComment: 300 41 | # PenaltyBreakString: 1000 42 | # PenaltyBreakFirstLessLess: 120 43 | # PenaltyExcessCharacter: 1000000 44 | # PenaltyReturnTypeOnItsOwnLine: 60 45 | # PointerAlignment: Right 46 | # SpacesBeforeTrailingComments: 1 47 | # Cpp11BracedListStyle: true 48 | # Standard: Cpp11 49 | # IndentWidth: 2 50 | # TabWidth: 8 51 | # UseTab: Never 52 | # BreakBeforeBraces: Attach 53 | # SpacesInParentheses: false 54 | # SpacesInSquareBrackets: false 55 | # SpacesInAngles: false 56 | # SpaceInEmptyParentheses: false 57 | # SpacesInCStyleCastParentheses: false 58 | # SpaceAfterCStyleCast: false 59 | # SpacesInContainerLiterals: true 60 | # SpaceBeforeAssignmentOperators: true 61 | # ContinuationIndentWidth: 4 62 | # CommentPragmas: '^ IWYU pragma:' 63 | # ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] 64 | # SpaceBeforeParens: ControlStatements 65 | # DisableFormat: false 66 | # ... 67 | 68 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vendor/discount-windows-bins"] 2 | path = vendor/discount-windows-bins 3 | url = https://github.com/OSVR/discount.git 4 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8.12) 2 | project(OSVRTrackerView) 3 | 4 | list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) 5 | 6 | include(EnableExtraCompilerWarnings) 7 | globally_enable_extra_compiler_warnings() 8 | 9 | find_package(osvr REQUIRED) 10 | find_package(Boost REQUIRED) 11 | find_package(OpenSceneGraph COMPONENTS OpenThreads osgDB osgViewer osgGA osgUtil REQUIRED) 12 | 13 | include_directories(SYSTEM ${Boost_INCLUDE_DIR} ${OPENSCENEGRAPH_INCLUDE_DIRS}) 14 | 15 | if(WIN32) 16 | set(TRACKER_VIEW_RESOURCE osvr_tracker_view.rc) 17 | else() 18 | set(TRACKER_VIEW_RESOURCE) 19 | endif() 20 | 21 | add_executable(OSVRTrackerView 22 | ${TRACKER_VIEW_RESOURCE} 23 | OSGMathInterop.h 24 | OSVRContext.cpp 25 | OSVRContext.h 26 | OSVRInterfaceData.cpp 27 | OSVRInterfaceData.h 28 | OSVRUpdateCallback.cpp 29 | OSVRUpdateCallback.h 30 | OSVRTrackerView.cpp 31 | RPAxes.osg.h) 32 | target_link_libraries(OSVRTrackerView osvr::osvrClientKitCpp ${OPENSCENEGRAPH_LIBRARIES}) 33 | 34 | set(CMAKE_INSTALL_BINDIR .) 35 | set(CMAKE_INSTALL_DOCDIR .) 36 | 37 | install(TARGETS OSVRTrackerView 38 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime) 39 | 40 | 41 | # For generating documentation in HTML 42 | if(WIN32) 43 | list(APPEND CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/vendor/discount-windows-bins") 44 | endif() 45 | find_package(Markdown) 46 | 47 | ### 48 | # Docs 49 | ### 50 | # Convert the README to HTML if we can 51 | set(MARKDOWN_INPUT README.md CONTRIBUTING.md) 52 | if(MARKDOWN_FOUND) 53 | include(UseMarkdown) 54 | add_markdown_target(markdown_docs "${CMAKE_CURRENT_BINARY_DIR}" ${MARKDOWN_INPUT}) 55 | 56 | install_markdown_target(markdown_docs DESTINATION ${CMAKE_INSTALL_DOCDIR}) 57 | else() 58 | install(FILES ${MARKDOWN_INPUT} DESTINATION ${CMAKE_INSTALL_DOCDIR}) 59 | endif() 60 | 61 | install(FILES LICENSE NOTICE DESTINATION ${CMAKE_INSTALL_DOCDIR}) -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Issues, pull requests, and other contributions are welcomed! 4 | 5 | A few tips: 6 | 7 | ## Is `OSVR-Tracker-View` the right repository? 8 | 9 | The OSVR system consists of a number of repositories, many of which are in the [OSVR organization on GitHub][osvr-org]. 10 | 11 | The `OSVR-Tracker-View` repo consists of an OpenSceneGraph-based tool that visualizes the tracker data available through the OSVR libraries. 12 | 13 | - If you've got an issue to report, a bug fix, or a feature addition to this tool: **yes**, you're in the right spot! 14 | - If the tracker viewer shows the orientation of a device incorrectly: **you're close** - see the [org page][osvr-org] for a listing of repositories to find the one for your device (if not listed separately, it is in OSVR-Core). This could be a plugin problem or a configuration problem. If you think it's configuration, you'll probably have better luck filing a support ticket, see below. 15 | - If you have a hardware or software issue related to OSVR but aren't sure exactly where it fits: **let us know with a support ticket at ** 16 | 17 | [osvr-org]: https://github.com/osvr 18 | 19 | ## Getting ready 20 | 21 | When making pull requests, please fork the project and create a topic branch off of the `master` branch. 22 | (This is what GitHub does by default if you start editing with your web browser.) 23 | 24 | When developing, make small commits that are nevertheless "whole": small enough to review, but each containing a logical single change in its entirety. 25 | (If you don't understand what we mean by this, that's OK, we'll work it out.) 26 | 27 | It's OK to rebase your topic branch to make the history more clear. 28 | Avoid merging from master into your topic branch: if you need a change from master, rebase; otherwise, try to keep topic branches short-lived enough that we can get your code in to the mainline before much else changes! 29 | 30 | Try to develop code that is portable (not particularly tied to a single operating system/compiler/etc) - OSVR runs on a number of platforms, and while we don't expect you to have all of them to test on, it's good to keep in mind. Our continuous integration server will be able to help with this. 31 | 32 | If you're adding something reasonably testable, please also add a test. 33 | If you're touching code that already has tests, make sure they didn't break. 34 | 35 | This repo follows the same code style guidelines as OSVR-Core. 36 | The main points are to match code surrounding what you're edited, and to be sure to use `clang-format`. 37 | These help ensure that your changes are not artificially large because of whitespace, etc, that it's easy to review your changes, and that your code will be maintainable in the future. 38 | 39 | ## License 40 | 41 | No formal copyright assignment is required. If you're adding a new file, make sure it has the appropriate license header. Any contributions intentionally sent to the project are considered to be offered under the license of the project they're sent to. 42 | 43 | -------------------------------------------------------------------------------- /EnableExtraCompilerWarnings.cmake: -------------------------------------------------------------------------------- 1 | # - Add flags to compile with extra warnings 2 | # 3 | # enable_extra_compiler_warnings() 4 | # globally_enable_extra_compiler_warnings() - to modify CMAKE_CXX_FLAGS, etc 5 | # to change for all targets declared after the command, instead of per-command 6 | # 7 | # 8 | # Original Author: 9 | # 2010 Ryan Pavlik 10 | # http://academic.cleardefinition.com 11 | # Iowa State University - HCI Graduate Program/VRAC 12 | # 13 | # Additional Author: 14 | # 2013 Kevin M. Godby 15 | # http://kevin.godby.org/ 16 | # Iowa State University - HCI Graduate Program/VRAC 17 | # 18 | # Copyright Iowa State University 2009-2010. 19 | # Distributed under the Boost Software License, Version 1.0. 20 | # (See accompanying file LICENSE_1_0.txt or copy at 21 | # http://www.boost.org/LICENSE_1_0.txt) 22 | 23 | if(__enable_extra_compiler_warnings) 24 | return() 25 | endif() 26 | set(__enable_extra_compiler_warnings YES) 27 | 28 | macro(_check_warning_flag _flag _flags) 29 | include(CheckCXXCompilerFlag) 30 | string(REGEX REPLACE "[^A-Za-z0-9]" "" _flagvar "${_flag}") 31 | check_cxx_compiler_flag(${_flag} SUPPORTS_WARNING_${_flagvar}) 32 | if(SUPPORTS_WARNING_${_flagvar}) 33 | set(_flags "${_flags} ${_flag}") 34 | endif() 35 | endmacro() 36 | 37 | macro(_enable_extra_compiler_warnings_flags) 38 | set(_flags) 39 | if(MSVC) 40 | option(COMPILER_WARNINGS_EXTREME 41 | "Use compiler warnings that are probably overkill." 42 | off) 43 | mark_as_advanced(COMPILER_WARNINGS_EXTREME) 44 | set(_flags "/W4") 45 | if(COMPILER_WARNINGS_EXTREME) 46 | set(_flags "${_flags} /Wall /wd4619 /wd4668 /wd4820 /wd4571 /wd4710") 47 | endif() 48 | else() 49 | include(CheckCXXCompilerFlag) 50 | set(_flags) 51 | _check_warning_flag(-W "${_flags}") 52 | _check_warning_flag(-Wall "${_flags}") 53 | _check_warning_flag(-pedantic "${_flags}") 54 | _check_warning_flag(-Wbool-conversion "${_flags}") 55 | _check_warning_flag(-Wcast-align "${_flags}") 56 | _check_warning_flag(-Wchar-subscripts "${_flags}") 57 | _check_warning_flag(-Wconversion "${_flags}") 58 | _check_warning_flag(-Wdisabled-optimization "${_flags}") 59 | _check_warning_flag(-Wdocumentation "${_flags}") 60 | _check_warning_flag(-Weffc++ "${_flags}") 61 | _check_warning_flag(-Wempty-body "${_flags}") 62 | _check_warning_flag(-Wfloat-equal "${_flags}") 63 | _check_warning_flag(-Wformat=2 "${_flags}") 64 | _check_warning_flag(-Wformat-security "${_flags}") 65 | _check_warning_flag(-Wheader-guard "${_flags}") 66 | _check_warning_flag(-Wimplicit-fallthrough "${_flags}") 67 | _check_warning_flag(-Winit-self "${_flags}") 68 | _check_warning_flag(-Winline "${_flags}") 69 | _check_warning_flag(-Winvalid-pch "${_flags}") 70 | _check_warning_flag(-Wlogical-not-parentheses "${_flags}") 71 | _check_warning_flag(-Wloop-analysis "${_flags}") 72 | _check_warning_flag(-Wmissing-format-attribute "${_flags}") 73 | _check_warning_flag(-Wmissing-include-dirs "${_flags}") 74 | _check_warning_flag(-Wno-long-long "${_flags}") 75 | _check_warning_flag(-Wnon-virtual-dtor "${_flags}") 76 | _check_warning_flag(-Wold-style-cast "${_flags}") 77 | _check_warning_flag(-Wpacked "${_flags}") 78 | _check_warning_flag(-Wpointer-arith "${_flags}") 79 | _check_warning_flag(-Wredundant-decls "${_flags}") 80 | _check_warning_flag(-Wshadow "${_flags}") 81 | _check_warning_flag(-Wsizeof-array-argument "${_flags}") 82 | _check_warning_flag(-Wstrict-overflow=4 "${_flags}") 83 | _check_warning_flag(-Wstring-conversion "${_flags}") 84 | _check_warning_flag(-Wsuggest-attribute=const "${_flags}") 85 | _check_warning_flag(-Wswitch-enum "${_flags}") 86 | _check_warning_flag(-Wswitch "${_flags}") 87 | _check_warning_flag(-Wtrigraphs "${_flags}") 88 | _check_warning_flag(-Wundef "${_flags}") 89 | _check_warning_flag(-Wunique-enum "${_flags}") 90 | _check_warning_flag(-Wuninitialized "${_flags}") 91 | _check_warning_flag(-Wunknown-pragmas "${_flags}") 92 | _check_warning_flag(-Wunused "${_flags}") 93 | _check_warning_flag(-Wunused-label "${_flags}") 94 | _check_warning_flag(-Wunused-parameter "${_flags}") 95 | _check_warning_flag(-Wwrite-strings "${_flags}") 96 | endif() 97 | endmacro() 98 | 99 | function(enable_extra_compiler_warnings _target) 100 | _enable_extra_compiler_warnings_flags() 101 | get_target_property(_origflags ${_target} COMPILE_FLAGS) 102 | if(_origflags) 103 | set_property(TARGET 104 | ${_target} 105 | PROPERTY 106 | COMPILE_FLAGS 107 | "${_flags} ${_origflags}") 108 | else() 109 | set_property(TARGET 110 | ${_target} 111 | PROPERTY 112 | COMPILE_FLAGS 113 | "${_flags}") 114 | endif() 115 | 116 | endfunction() 117 | 118 | function(globally_enable_extra_compiler_warnings) 119 | _enable_extra_compiler_warnings_flags() 120 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flags}" PARENT_SCOPE) 121 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flags}" PARENT_SCOPE) 122 | endfunction() 123 | -------------------------------------------------------------------------------- /FindMarkdown.cmake: -------------------------------------------------------------------------------- 1 | # - try to find Markdown tool 2 | # 3 | # Cache Variables: 4 | # MARKDOWN_EXECUTABLE 5 | # 6 | # Non-cache variables you might use in your CMakeLists.txt: 7 | # MARKDOWN_FOUND 8 | # 9 | # Requires these CMake modules: 10 | # FindPackageHandleStandardArgs (known included with CMake >=2.6.2) 11 | # 12 | # Original Author: 13 | # 2011 Ryan Pavlik 14 | # http://academic.cleardefinition.com 15 | # Iowa State University HCI Graduate Program/VRAC 16 | # 17 | # Copyright Iowa State University 2011. 18 | # Distributed under the Boost Software License, Version 1.0. 19 | # (See accompanying file LICENSE_1_0.txt or copy at 20 | # http://www.boost.org/LICENSE_1_0.txt) 21 | 22 | file(TO_CMAKE_PATH "${MARKDOWN_ROOT_DIR}" MARKDOWN_ROOT_DIR) 23 | set(MARKDOWN_ROOT_DIR 24 | "${MARKDOWN_ROOT_DIR}" 25 | CACHE 26 | PATH 27 | "Path to search for Markdown") 28 | 29 | if(MARKDOWN_EXECUTABLE AND NOT EXISTS "${MARKDOWN_EXECUTABLE}") 30 | set(MARKDOWN_EXECUTABLE "notfound" CACHE PATH FORCE "") 31 | endif() 32 | 33 | # If we have a custom path, look there first. 34 | if(MARKDOWN_ROOT_DIR) 35 | find_program(MARKDOWN_EXECUTABLE 36 | NAMES 37 | markdown 38 | PATHS 39 | "${MARKDOWN_ROOT_DIR}" 40 | PATH_SUFFIXES 41 | bin 42 | NO_DEFAULT_PATH) 43 | endif() 44 | 45 | find_program(MARKDOWN_EXECUTABLE NAMES markdown) 46 | 47 | include(FindPackageHandleStandardArgs) 48 | find_package_handle_standard_args(Markdown 49 | DEFAULT_MSG 50 | MARKDOWN_EXECUTABLE) 51 | 52 | if(MARKDOWN_FOUND) 53 | mark_as_advanced(MARKDOWN_ROOT_DIR) 54 | endif() 55 | 56 | mark_as_advanced(MARKDOWN_EXECUTABLE) 57 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | OSVR Tracker Viewer 2 | Copyright 2014-2015 Sensics, Inc. 3 | -------------------------------------------------------------------------------- /OSGMathInterop.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | @brief Header 3 | 4 | @date 2014 5 | 6 | @author 7 | Sensics, Inc. 8 | 9 | */ 10 | 11 | // Copyright 2014 Sensics, Inc. 12 | // 13 | // Licensed under the Apache License, Version 2.0 (the "License"); 14 | // you may not use this file except in compliance with the License. 15 | // You may obtain a copy of the License at 16 | // 17 | // http://www.apache.org/licenses/LICENSE-2.0 18 | // 19 | // Unless required by applicable law or agreed to in writing, software 20 | // distributed under the License is distributed on an "AS IS" BASIS, 21 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | // See the License for the specific language governing permissions and 23 | // limitations under the License. 24 | 25 | #ifndef INCLUDED_OSGMathInterop_h_GUID_D4FC2A1C_6EFF_419D_18FF_EB4C4D3B3066 26 | #define INCLUDED_OSGMathInterop_h_GUID_D4FC2A1C_6EFF_419D_18FF_EB4C4D3B3066 27 | 28 | // Internal Includes 29 | // - none 30 | 31 | // Library/third-party includes 32 | #include 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | // Standard includes 39 | // - none 40 | 41 | inline osg::Vec3 toVec3(OSVR_Vec3 const &v) { 42 | return osg::Vec3(static_cast(v.data[0]), static_cast(v.data[1]), static_cast(v.data[2])); 43 | } 44 | 45 | inline osg::Quat toQuat(OSVR_Quaternion const &q) { 46 | return osg::Quat(osvrQuatGetX(&q), osvrQuatGetY(&q), osvrQuatGetZ(&q), 47 | osvrQuatGetW(&q)); 48 | } 49 | 50 | inline osg::Matrix toMatrix(OSVR_Pose3 const &pose) { 51 | osg::Matrix ret; 52 | ret.setRotate(toQuat(pose.rotation)); 53 | ret.setTrans(toVec3(pose.translation)); 54 | return ret; 55 | } 56 | 57 | #endif // INCLUDED_OSGMathInterop_h_GUID_D4FC2A1C_6EFF_419D_18FF_EB4C4D3B3066 58 | -------------------------------------------------------------------------------- /OSVRContext.cpp: -------------------------------------------------------------------------------- 1 | /** @file 2 | @brief Implementation 3 | 4 | @date 2014 5 | 6 | @author 7 | Sensics, Inc. 8 | 9 | */ 10 | 11 | // Copyright 2014 Sensics, Inc. 12 | // 13 | // Licensed under the Apache License, Version 2.0 (the "License"); 14 | // you may not use this file except in compliance with the License. 15 | // You may obtain a copy of the License at 16 | // 17 | // http://www.apache.org/licenses/LICENSE-2.0 18 | // 19 | // Unless required by applicable law or agreed to in writing, software 20 | // distributed under the License is distributed on an "AS IS" BASIS, 21 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | // See the License for the specific language governing permissions and 23 | // limitations under the License. 24 | 25 | // Internal Includes 26 | #include "OSVRContext.h" 27 | #include "OSVRInterfaceData.h" 28 | 29 | // Library/third-party includes 30 | #include 31 | 32 | // Standard includes 33 | // - none 34 | 35 | OSVRContext::OSVRContext(std::string const &appId) : m_ctx(appId.c_str()) {} 36 | 37 | osg::ref_ptr 38 | OSVRContext::getInterface(std::string const &path) { 39 | osg::ref_ptr data = new OSVRInterfaceData(*this, path); 40 | return data; 41 | } 42 | 43 | osvr::clientkit::ClientContext &OSVRContext::getContext() { return m_ctx; } 44 | 45 | void OSVRContext::update() { m_ctx.update(); } 46 | 47 | OSVRContext::~OSVRContext() {} 48 | -------------------------------------------------------------------------------- /OSVRContext.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | @brief Header 3 | 4 | @date 2014 5 | 6 | @author 7 | Sensics, Inc. 8 | 9 | */ 10 | 11 | // Copyright 2014 Sensics, Inc. 12 | // 13 | // Licensed under the Apache License, Version 2.0 (the "License"); 14 | // you may not use this file except in compliance with the License. 15 | // You may obtain a copy of the License at 16 | // 17 | // http://www.apache.org/licenses/LICENSE-2.0 18 | // 19 | // Unless required by applicable law or agreed to in writing, software 20 | // distributed under the License is distributed on an "AS IS" BASIS, 21 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | // See the License for the specific language governing permissions and 23 | // limitations under the License. 24 | 25 | #ifndef INCLUDED_OSVRContext_h_GUID_D82A13C3_E032_4E9A_24FA_1B4AF13B9A9F 26 | #define INCLUDED_OSVRContext_h_GUID_D82A13C3_E032_4E9A_24FA_1B4AF13B9A9F 27 | 28 | // Internal Includes 29 | // - none 30 | 31 | // Library/third-party includes 32 | #include 33 | #include 34 | 35 | #include 36 | 37 | // Standard includes 38 | // - none 39 | 40 | class OSVRInterfaceData; 41 | 42 | /// @brief Class to attach the lifetime of the context to the lifetime of a 43 | /// node. 44 | class OSVRContext : public osg::Referenced { 45 | public: 46 | OSVRContext(std::string const &appId); 47 | 48 | osg::ref_ptr getInterface(std::string const &path); 49 | osvr::clientkit::ClientContext &getContext(); 50 | void update(); 51 | 52 | protected: 53 | virtual ~OSVRContext(); 54 | 55 | private: 56 | osvr::clientkit::ClientContext m_ctx; 57 | }; 58 | 59 | #endif // INCLUDED_OSVRContext_h_GUID_D82A13C3_E032_4E9A_24FA_1B4AF13B9A9F 60 | -------------------------------------------------------------------------------- /OSVRInterfaceData.cpp: -------------------------------------------------------------------------------- 1 | /** @file 2 | @brief Implementation 3 | 4 | @date 2014 5 | 6 | @author 7 | Sensics, Inc. 8 | 9 | */ 10 | 11 | // Copyright 2014 Sensics, Inc. 12 | // 13 | // Licensed under the Apache License, Version 2.0 (the "License"); 14 | // you may not use this file except in compliance with the License. 15 | // You may obtain a copy of the License at 16 | // 17 | // http://www.apache.org/licenses/LICENSE-2.0 18 | // 19 | // Unless required by applicable law or agreed to in writing, software 20 | // distributed under the License is distributed on an "AS IS" BASIS, 21 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | // See the License for the specific language governing permissions and 23 | // limitations under the License. 24 | 25 | // Internal Includes 26 | #include "OSVRInterfaceData.h" 27 | #include "OSVRContext.h" 28 | 29 | // Library/third-party includes 30 | #include 31 | 32 | // Standard includes 33 | // - none 34 | 35 | OSVRInterfaceData::OSVRInterfaceData(OSVRContext &ctx, std::string const &path) 36 | : m_ctx(&ctx), m_iface(m_ctx->getContext().getInterface(path)), 37 | m_path(path) {} 38 | 39 | osvr::clientkit::Interface &OSVRInterfaceData::getInterface() { 40 | return m_iface; 41 | } 42 | 43 | std::string const &OSVRInterfaceData::getPath() const { return m_path; } 44 | 45 | OSVRInterfaceData::~OSVRInterfaceData() { 46 | /// Force freeing this interface. 47 | m_iface.free(); 48 | } 49 | -------------------------------------------------------------------------------- /OSVRInterfaceData.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | @brief Header 3 | 4 | @date 2014 5 | 6 | @author 7 | Sensics, Inc. 8 | 9 | */ 10 | 11 | // Copyright 2014 Sensics, Inc. 12 | // 13 | // Licensed under the Apache License, Version 2.0 (the "License"); 14 | // you may not use this file except in compliance with the License. 15 | // You may obtain a copy of the License at 16 | // 17 | // http://www.apache.org/licenses/LICENSE-2.0 18 | // 19 | // Unless required by applicable law or agreed to in writing, software 20 | // distributed under the License is distributed on an "AS IS" BASIS, 21 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | // See the License for the specific language governing permissions and 23 | // limitations under the License. 24 | 25 | #ifndef INCLUDED_OSVRInterfaceData_h_GUID_20F69D2D_747D_4D90_688E_B5F286B788ED 26 | #define INCLUDED_OSVRInterfaceData_h_GUID_20F69D2D_747D_4D90_688E_B5F286B788ED 27 | 28 | // Internal Includes 29 | // - none 30 | 31 | // Library/third-party includes 32 | #include 33 | #include 34 | 35 | #include 36 | 37 | // Standard includes 38 | #include 39 | 40 | class OSVRContext; 41 | 42 | /// @brief Class to track the lifetime of a node we're updating with a callback, 43 | /// so we can free the interface (and the callback) when the node is destroyed. 44 | class OSVRInterfaceData : public osg::Referenced { 45 | public: 46 | OSVRInterfaceData(OSVRContext &ctx, std::string const &path); 47 | osvr::clientkit::Interface &getInterface(); 48 | 49 | std::string const &getPath() const; 50 | 51 | protected: 52 | virtual ~OSVRInterfaceData(); 53 | 54 | private: 55 | /// Holding this ensures the context outlives us. 56 | osg::ref_ptr m_ctx; 57 | osvr::clientkit::Interface m_iface; 58 | std::string m_path; 59 | }; 60 | 61 | #endif // INCLUDED_OSVRInterfaceData_h_GUID_20F69D2D_747D_4D90_688E_B5F286B788ED 62 | -------------------------------------------------------------------------------- /OSVRTrackerView.cpp: -------------------------------------------------------------------------------- 1 | /** @file 2 | @brief Implementation 3 | 4 | @date 2014 5 | 6 | @author 7 | Sensics, Inc. 8 | 9 | */ 10 | 11 | // Copyright 2014 Sensics, Inc. 12 | // 13 | // Licensed under the Apache License, Version 2.0 (the "License"); 14 | // you may not use this file except in compliance with the License. 15 | // You may obtain a copy of the License at 16 | // 17 | // http://www.apache.org/licenses/LICENSE-2.0 18 | // 19 | // Unless required by applicable law or agreed to in writing, software 20 | // distributed under the License is distributed on an "AS IS" BASIS, 21 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | // See the License for the specific language governing permissions and 23 | // limitations under the License. 24 | 25 | // Internal Includes 26 | #include "OSVRUpdateCallback.h" 27 | #include "OSGMathInterop.h" 28 | #include "OSVRInterfaceData.h" 29 | #include "OSVRContext.h" 30 | 31 | #include "RPAxes.osg.h" // Header file generated from axes model 32 | 33 | // Library/third-party includes 34 | #include 35 | 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | 43 | #include 44 | 45 | #include 46 | #include 47 | 48 | #include 49 | 50 | // Standard includes 51 | #include 52 | #include // for floor 53 | 54 | 55 | static const char MESSAGE_PREFIX[] = "\n[TrackerViewer] "; 56 | 57 | osg::ref_ptr loadAxesModel() { 58 | std::string modelData(RPAxes_osg, RPAxes_osg_len); 59 | modelData += ".osgs"; // Load OSG format, where the filename is the data string. 60 | osg::ref_ptr axes = osgDB::readNodeFile(modelData); 61 | if (!axes) { 62 | std::cerr << MESSAGE_PREFIX 63 | << "Error: Could not read model from embedded string!" 64 | << std::endl; 65 | throw std::runtime_error("Could not load model"); 66 | } 67 | return axes; 68 | } 69 | 70 | /// A little utility class to draw a simple grid. 71 | class Grid : public osg::Group { 72 | public: 73 | Grid(unsigned int line_count = 49, float line_spacing = 1.0f, 74 | unsigned int bold_every_n = 0) { 75 | this->addChild(make_grid(line_count, line_spacing)); 76 | #if 0 77 | std::cout << "Regular: count = " << line_count 78 | << ", spacing = " << line_spacing << std::endl; 79 | #endif 80 | 81 | // Bold grid 82 | if (bold_every_n > 0) { 83 | line_count = static_cast( 84 | std::floor(line_count / bold_every_n)) + 85 | 1; 86 | line_spacing *= bold_every_n; 87 | 88 | #if 0 89 | std::cout << "Bold: count = " << line_count 90 | << ", spacing = " << line_spacing << std::endl; 91 | #endif 92 | osg::MatrixTransform *mt = make_grid(line_count, line_spacing); 93 | 94 | osg::StateSet *stateset = new osg::StateSet(); 95 | osg::LineWidth *linewidth = new osg::LineWidth(); 96 | linewidth->setWidth(2.0f); 97 | stateset->setAttributeAndModes(linewidth, osg::StateAttribute::ON); 98 | stateset->setMode(GL_LIGHTING, osg::StateAttribute::OFF); 99 | mt->setStateSet(stateset); 100 | 101 | this->addChild(mt); 102 | } 103 | 104 | // Heavy origin lines 105 | this->addChild(make_axes(line_count, line_spacing)); 106 | } 107 | 108 | osg::MatrixTransform *make_grid(const unsigned int line_count, 109 | const float line_spacing) { 110 | const unsigned int numVertices = 2 * 2 * line_count; 111 | osg::Vec3Array *vertices = new osg::Vec3Array(numVertices); 112 | float length = static_cast(line_count - 1) * line_spacing; 113 | osg::Vec3Array::size_type ptr = 0; 114 | 115 | for (unsigned int i = 0; i < line_count; ++i) { 116 | (*vertices)[ptr++].set(-length / 2.0f + i * line_spacing, 117 | length / 2.0f, 0.0f); 118 | (*vertices)[ptr++].set(-length / 2.0f + i * line_spacing, 119 | -length / 2.0f, 0.0f); 120 | } 121 | 122 | for (unsigned int i = 0; i < line_count; ++i) { 123 | (*vertices)[ptr++].set(length / 2.0f, 124 | -length / 2.0f + i * line_spacing, 0.0f); 125 | (*vertices)[ptr++].set(-length / 2.0f, 126 | -length / 2.0f + i * line_spacing, 0.0f); 127 | } 128 | 129 | osg::Geometry *geometry = new osg::Geometry; 130 | geometry->setVertexArray(vertices); 131 | geometry->addPrimitiveSet(new osg::DrawArrays( 132 | osg::PrimitiveSet::LINES, 0, static_cast(numVertices))); 133 | 134 | osg::Geode *geode = new osg::Geode; 135 | geode->addDrawable(geometry); 136 | geode->getOrCreateStateSet()->setMode(GL_LIGHTING, 0); 137 | 138 | osg::MatrixTransform *grid_transform = new osg::MatrixTransform; 139 | grid_transform->setMatrix(osg::Matrix::rotate(osg::PI_2, 1, 0, 0)); 140 | grid_transform->addChild(geode); 141 | 142 | return grid_transform; 143 | } 144 | 145 | osg::MatrixTransform *make_axes(const unsigned int line_count, 146 | const float line_spacing) { 147 | const float length = (line_count - 1) * line_spacing; 148 | const int num_vertices = 6; 149 | osg::Vec3Array *vertices = new osg::Vec3Array(num_vertices); 150 | (*vertices)[0].set(-length / 2.0f, 0.0f, 0.0f); 151 | (*vertices)[1].set(length / 2.0f, 0.0f, 0.0f); 152 | (*vertices)[2].set(0.0f, -length / 2.0f, 0.0f); 153 | (*vertices)[3].set(0.0f, length / 2.0f, 0.0f); 154 | (*vertices)[4].set(0.0f, 0.0f, -length / 2.0f); 155 | (*vertices)[5].set(0.0f, 0.0f, length / 2.0f); 156 | 157 | osg::Vec4Array *colors = new osg::Vec4Array(num_vertices); 158 | (*colors)[0].set(1.0, 0.0, 0.0, 1.0); 159 | (*colors)[1].set(1.0, 0.0, 0.0, 1.0); 160 | (*colors)[2].set(0.0, 0.0, 1.0, 1.0); 161 | (*colors)[3].set(0.0, 0.0, 1.0, 1.0); 162 | (*colors)[4].set(0.0, 1.0, 0.0, 1.0); 163 | (*colors)[5].set(0.0, 1.0, 0.0, 1.0); 164 | 165 | osg::Geometry *geometry = new osg::Geometry; 166 | geometry->setVertexArray(vertices); 167 | geometry->addPrimitiveSet( 168 | new osg::DrawArrays(osg::PrimitiveSet::LINES, 0, num_vertices)); 169 | #if OSG_VERSION_GREATER_THAN(3, 1, 7) 170 | geometry->setColorArray(colors, osg::Array::BIND_PER_VERTEX); 171 | #else 172 | geometry->setColorArray(colors); 173 | geometry->setColorBinding(osg::Geometry::BIND_PER_VERTEX); 174 | #endif 175 | 176 | osg::Geode *geode = new osg::Geode; 177 | geode->addDrawable(geometry); 178 | geode->getOrCreateStateSet()->setMode(GL_LIGHTING, 0); 179 | 180 | osg::MatrixTransform *grid_transform = new osg::MatrixTransform; 181 | grid_transform->setMatrix(osg::Matrix::rotate(osg::PI_2, 1, 0, 0)); 182 | grid_transform->addChild(geode); 183 | 184 | osg::StateSet *stateset = new osg::StateSet(); 185 | osg::LineWidth *linewidth = new osg::LineWidth(); 186 | linewidth->setWidth(4.0f); 187 | stateset->setAttributeAndModes(linewidth, osg::StateAttribute::ON); 188 | stateset->setMode(GL_LIGHTING, osg::StateAttribute::OFF); 189 | grid_transform->setStateSet(stateset); 190 | 191 | return grid_transform; 192 | } 193 | }; 194 | 195 | 196 | 197 | class TrackedSensor : public OSVRInterfaceData { 198 | public: 199 | TrackedSensor(OSVRContext &ctx, std::string const &path, 200 | osg::MatrixTransform &owningNode, osg::Node &child) 201 | : OSVRInterfaceData(ctx, path), enabledYet_(false) { 202 | 203 | // Create the switch: child of the transform we'll edit, parent of the 204 | // child passed to us. 205 | osg::ref_ptr switchNode = new osg::Switch; 206 | owningNode.addChild(switchNode.get()); 207 | switchNode->addChild(&child); 208 | // Start with switch off: don't display until we get data. 209 | switchNode->setAllChildrenOff(); 210 | 211 | // Keep a non-owning copy of the pointer for ourselves, now that someone 212 | // else is holding a reference to that node. 213 | switchNode_ = switchNode.get(); 214 | } 215 | 216 | /// Register this callback with the userdata being the MatrixTransform 217 | /// pointer 218 | static void poseCallback(void *userdata, 219 | const OSVR_TimeValue * /*timestamp*/, 220 | const OSVR_PoseReport *report) { 221 | invokeRealCallback(userdata, *report); 222 | } 223 | 224 | /// Register this callback with the userdata being the MatrixTransform 225 | /// pointer 226 | static void orientationCallback(void *userdata, 227 | const OSVR_TimeValue * /*timestamp*/, 228 | const OSVR_OrientationReport *report) { 229 | invokeRealCallback(userdata, *report); 230 | } 231 | 232 | private: 233 | template 234 | static void invokeRealCallback(void *userdata, const ReportType &report) { 235 | // Cast our userdata - should be the matrixtransform that owns us. 236 | osg::MatrixTransform &xform = 237 | *static_cast(userdata); 238 | 239 | // Now, extract ourselves from that transform 240 | TrackedSensor &self = 241 | *dynamic_cast(xform.getUserData()); 242 | 243 | // Handle first-time reports 244 | if (!self.enabledYet_) { 245 | std::cout << MESSAGE_PREFIX << self.getPath() 246 | << " - got first report, enabling display!\n\n" 247 | << std::endl; 248 | self.enabledYet_ = true; 249 | self.switchNode_->setAllChildrenOn(); 250 | } 251 | // Then, proceed to the work of the "real" callback. 252 | // (Overloaded on report type, so this common code can be shared) 253 | self.callbackReal(xform, report); 254 | } 255 | // Real pose callback 256 | void callbackReal(osg::MatrixTransform &xform, 257 | const OSVR_PoseReport &report) { 258 | xform.setMatrix(toMatrix(report.pose)); 259 | } 260 | // Real orientation callback 261 | void callbackReal(osg::MatrixTransform &xform, 262 | const OSVR_OrientationReport &report) { 263 | osg::Matrix mat = xform.getMatrix(); 264 | mat.setRotate(toQuat(report.rotation)); 265 | xform.setMatrix(mat); 266 | } 267 | bool enabledYet_; 268 | osg::Switch *switchNode_; 269 | }; 270 | 271 | class TrackerViewApp { 272 | public: 273 | static double worldAxesScale() { return 0.2; } 274 | static double trackerAxesScale() { return 0.1; } 275 | 276 | TrackerViewApp() 277 | : m_ctx(new OSVRContext( 278 | "org.osvr.trackerview")) /// Set up OSVR: making an OSG 279 | /// ref-counted object hold 280 | /// the context. 281 | , 282 | m_scene(new osg::PositionAttitudeTransform), 283 | m_smallAxes(new osg::MatrixTransform), m_numTrackers(0) { 284 | 285 | /// Transform into default OSVR coordinate system: z near. 286 | m_scene->setAttitude(osg::Quat(90, osg::Vec3(1, 0, 0))); 287 | 288 | /// Set the root node's update callback to run the OSVR update, 289 | /// and give it the context ref 290 | m_scene->setUpdateCallback(new OSVRUpdateCallback); 291 | m_scene->setUserData(m_ctx.get()); 292 | 293 | /// Load the basic model for axes 294 | osg::ref_ptr axes = loadAxesModel(); 295 | 296 | /// Small axes for trackers 297 | m_smallAxes->setMatrix(osg::Matrixd::scale( 298 | trackerAxesScale(), trackerAxesScale(), trackerAxesScale())); 299 | m_smallAxes->addChild(axes.get()); 300 | 301 | /// Grid 302 | m_scene->addChild(new Grid(16, 0.1f, 5)); 303 | } 304 | 305 | osg::ref_ptr getScene() { return m_scene; } 306 | 307 | void addPoseTracker(std::string const &path) { 308 | m_addTracker(&TrackedSensor::poseCallback, path); 309 | } 310 | 311 | void addOrientationTracker(std::string const &path) { 312 | osg::ref_ptr node = 313 | m_addTracker(&TrackedSensor::orientationCallback, path); 314 | 315 | #if 0 316 | /// Offset orientation-only trackers up by 1 unit (meter) 317 | osg::Matrix mat; 318 | mat.setTrans(0, 1, 0); 319 | node->setMatrix(mat); 320 | #endif 321 | } 322 | 323 | int getNumTrackers() const { return m_numTrackers; } 324 | 325 | private: 326 | template 327 | osg::ref_ptr m_addTracker(CallbackType cb, 328 | std::string const &path) { 329 | /// Make a transform node and attach it to the scene. 330 | // The tracked sensor class will attach the desired child to the 331 | // transform node. 332 | osg::ref_ptr xform = new osg::MatrixTransform; 333 | m_scene->addChild(xform.get()); 334 | 335 | /// Create object holding OSVR interface (which will add m_smallAxes to 336 | /// the scenegraph) and set callback 337 | osg::ref_ptr data = 338 | new TrackedSensor(*m_ctx, path, *xform, *m_smallAxes); 339 | data->getInterface().registerCallback(cb, 340 | static_cast(xform.get())); 341 | 342 | /// Transfer ownership of the interface holder/tracked sensor object to 343 | /// the transform node 344 | xform->setUserData(data.get()); 345 | 346 | m_numTrackers++; 347 | return xform; 348 | } 349 | osg::ref_ptr m_ctx; 350 | osg::ref_ptr m_scene; 351 | osg::ref_ptr m_smallAxes; 352 | 353 | int m_numTrackers; 354 | }; 355 | 356 | int main(int argc, char **argv) { 357 | /// Parse arguments 358 | osg::ArgumentParser args(&argc, argv); 359 | args.getApplicationUsage()->setApplicationName(args.getApplicationName()); 360 | args.getApplicationUsage()->setDescription( 361 | args.getApplicationName() + 362 | " is a tool for visualizing tracking data from the OSVR system."); 363 | args.getApplicationUsage()->setCommandLineUsage(args.getApplicationName() + 364 | " [options] osvrpath ..."); 365 | args.getApplicationUsage()->addCommandLineOption( 366 | "--orientation ", "add an orientation tracker"); 367 | args.getApplicationUsage()->addCommandLineOption("--pose ", 368 | "add a pose tracker"); 369 | 370 | /// Init the OSG viewer 371 | osgViewer::Viewer viewer(args); 372 | viewer.setUpViewInWindow(20, 20, 640, 480); 373 | 374 | osg::ApplicationUsage::Type helpType; 375 | if ((helpType = args.readHelpType()) != osg::ApplicationUsage::NO_HELP) { 376 | args.getApplicationUsage()->write(std::cerr); 377 | return 1; 378 | } 379 | 380 | if (args.errors()) { 381 | args.writeErrorMessages(std::cerr); 382 | return 1; 383 | } 384 | try { 385 | TrackerViewApp app; 386 | 387 | std::string path; 388 | 389 | // Get pose paths 390 | while (args.read("--pose", path)) { 391 | app.addPoseTracker(path); 392 | } 393 | 394 | // Get orientation paths 395 | while (args.read("--orientation", path)) { 396 | app.addOrientationTracker(path); 397 | } 398 | 399 | // Assume free strings are pose paths 400 | for (int pos = 1; pos < args.argc(); ++pos) { 401 | if (args.isOption(pos)) 402 | continue; 403 | 404 | app.addPoseTracker(args[pos]); 405 | } 406 | // If no trackers were specified, fall back on these defaults 407 | if (0 == app.getNumTrackers()) { 408 | std::cout << "\n" << MESSAGE_PREFIX 409 | << "No arguments passed: default is as if you passed the " 410 | "following:\n " 411 | "--pose /me/hands/left --pose /me/hands/right --pose " 412 | "/me/head\n" 413 | "You can specify --pose or --orientation then a path, " 414 | "as many times as you want.\n" 415 | "Pass the argument --help for more info.\n" 416 | << std::endl; 417 | app.addPoseTracker("/me/hands/left"); 418 | app.addPoseTracker("/me/hands/right"); 419 | app.addPoseTracker("/me/head"); 420 | } 421 | args.reportRemainingOptionsAsUnrecognized(); 422 | 423 | if (args.errors()) { 424 | args.writeErrorMessages(std::cerr); 425 | return 1; 426 | } 427 | 428 | viewer.setSceneData(app.getScene()); 429 | } catch (std::exception const &e) { 430 | std::cerr << MESSAGE_PREFIX << "Exception: " << e.what() << std::endl; 431 | std::cerr << MESSAGE_PREFIX << "Press enter to exit!" << std::endl; 432 | std::cin.ignore(); 433 | return -1; 434 | } 435 | 436 | /// Manually create the viewer manipulator so we can tweak the startup. 437 | osg::ref_ptr manip = 438 | new osgGA::TrackballManipulator(); 439 | viewer.setCameraManipulator(manip.get()); 440 | 441 | /// Experimentally, this looks good. Might have to zoom out for larger 442 | /// tracked volumes, but a better starting place than default. 443 | manip->setDistance(1.0); 444 | 445 | viewer.addEventHandler(new osgViewer::WindowSizeHandler); 446 | 447 | /// Go! 448 | return viewer.run(); 449 | } 450 | -------------------------------------------------------------------------------- /OSVRUpdateCallback.cpp: -------------------------------------------------------------------------------- 1 | /** @file 2 | @brief Implementation 3 | 4 | @date 2014 5 | 6 | @author 7 | Sensics, Inc. 8 | 9 | */ 10 | 11 | // Copyright 2014 Sensics, Inc. 12 | // 13 | // Licensed under the Apache License, Version 2.0 (the "License"); 14 | // you may not use this file except in compliance with the License. 15 | // You may obtain a copy of the License at 16 | // 17 | // http://www.apache.org/licenses/LICENSE-2.0 18 | // 19 | // Unless required by applicable law or agreed to in writing, software 20 | // distributed under the License is distributed on an "AS IS" BASIS, 21 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | // See the License for the specific language governing permissions and 23 | // limitations under the License. 24 | 25 | // Internal Includes 26 | #include "OSVRUpdateCallback.h" 27 | #include "OSVRContext.h" 28 | 29 | // Library/third-party includes 30 | #include 31 | #include 32 | #include 33 | 34 | // Standard includes 35 | // - none 36 | 37 | OSVRUpdateCallback::OSVRUpdateCallback() {} 38 | 39 | void OSVRUpdateCallback::operator()(osg::Node *node, osg::NodeVisitor *nv) { 40 | OSVRContext *ctx = dynamic_cast(node->getUserData()); 41 | BOOST_ASSERT(ctx); 42 | ctx->update(); 43 | // continue traversal 44 | traverse(node, nv); 45 | } 46 | OSVRUpdateCallback::~OSVRUpdateCallback() {} 47 | 48 | -------------------------------------------------------------------------------- /OSVRUpdateCallback.h: -------------------------------------------------------------------------------- 1 | /** @file 2 | @brief Header 3 | 4 | @date 2014 5 | 6 | @author 7 | Sensics, Inc. 8 | 9 | */ 10 | 11 | // Copyright 2014 Sensics, Inc. 12 | // 13 | // Licensed under the Apache License, Version 2.0 (the "License"); 14 | // you may not use this file except in compliance with the License. 15 | // You may obtain a copy of the License at 16 | // 17 | // http://www.apache.org/licenses/LICENSE-2.0 18 | // 19 | // Unless required by applicable law or agreed to in writing, software 20 | // distributed under the License is distributed on an "AS IS" BASIS, 21 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | // See the License for the specific language governing permissions and 23 | // limitations under the License. 24 | 25 | #ifndef INCLUDED_OSVRUpdateCallback_h_GUID_E58659E1_0843_429C_C9C9_B75B49A225FE 26 | #define INCLUDED_OSVRUpdateCallback_h_GUID_E58659E1_0843_429C_C9C9_B75B49A225FE 27 | 28 | // Internal Includes 29 | // - none 30 | 31 | // Library/third-party includes 32 | #include 33 | 34 | #include 35 | 36 | // Standard includes 37 | // - none 38 | 39 | class OSVRUpdateCallback : public osg::NodeCallback { 40 | public: 41 | OSVRUpdateCallback(); 42 | virtual ~OSVRUpdateCallback(); 43 | virtual void operator()(osg::Node *node, osg::NodeVisitor *nv); 44 | }; 45 | 46 | #endif // INCLUDED_OSVRUpdateCallback_h_GUID_E58659E1_0843_429C_C9C9_B75B49A225FE 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OSVR Tracker Viewer 2 | > Maintained at 3 | > 4 | > For details, see 5 | > 6 | > For support, see 7 | 8 | Utility for viewing tracker (pose, position, orientation) data from the OSVR framework. 9 | 10 | You may specify paths on the command line: 11 | 12 | - `OSVRTrackerView --pose /me/head` 13 | - `OSVRTrackerView --orientation /me/head` 14 | 15 | Multiple paths may also be specified. 16 | 17 | If no paths are specified on the command line, it will automatically opens these paths: 18 | 19 | - Pose 20 | - `/me/hands/left` 21 | - `/me/hands/right` 22 | - `/me/head` 23 | 24 | The large set of axes is the world coordinates in OSVR - the viewer loads in the standard orientation. Each smaller set of axes is a tracker. 25 | 26 | As is convention, the X axis is red, Y axis is green, and Z axis is blue (xyz-rgb). 27 | 28 | ## Dependencies 29 | 30 | - OSVR-Core 31 | - OpenSceneGraph: tested with a post-2.8.5 release, and a recent 3.x release, so pretty much any version from the past few years. **Note that you must use a version of OpenSceneGraph built with the same version of Visual Studio you're using** (if you're using Visual Studio) - you can use an OSVR-Core binary snapshot itself with a wide range of different versions, but OSG must match versions. 32 | 33 | ## License 34 | 35 | This project: Licensed under the Apache License, Version 2.0. 36 | 37 | -------------------------------------------------------------------------------- /RPAxes.skp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSVR/OSVR-Tracker-Viewer/c6306ef28db50ec961fce15d6c203760ac3ccf0f/RPAxes.skp -------------------------------------------------------------------------------- /UseMarkdown.cmake: -------------------------------------------------------------------------------- 1 | # - Convert markdown source files to HTML as a custom target 2 | # 3 | # include(UseMarkdown) 4 | # add_markdown_target( [...] [RENAME ]) 5 | # Relative paths for the destination directory are considered with 6 | # with respect to CMAKE_CURRENT_BINARY_DIR. The RENAME argument is only 7 | # valid with a single markdown file as input. 8 | # 9 | # 10 | # install_markdown_target( [extra arguments to INSTALL(FILES ...) ]) 11 | # 12 | # 13 | # Requires CMake 2.6 or newer (uses the 'function' command) 14 | # 15 | # Original Author: 16 | # 2011 Ryan Pavlik 17 | # http://academic.cleardefinition.com 18 | # Iowa State University HCI Graduate Program/VRAC 19 | # 20 | # Copyright Iowa State University 2011-2012. 21 | # Distributed under the Boost Software License, Version 1.0. 22 | # (See accompanying file LICENSE_1_0.txt or copy at 23 | # http://www.boost.org/LICENSE_1_0.txt) 24 | 25 | if(__add_markdown_target) 26 | return() 27 | endif() 28 | set(__add_markdown_target YES) 29 | 30 | define_property(TARGET 31 | PROPERTY 32 | MARKDOWN_TARGET_OUTPUTS 33 | BRIEF_DOCS 34 | "Markdown target outputs" 35 | FULL_DOCS 36 | "Output files of a target created by add_markdown_target") 37 | 38 | function(add_markdown_target _target _dest) 39 | 40 | if(NOT ARGN) 41 | message(WARNING 42 | "In add_markdown_target call for target ${_target}, no source files were specified!") 43 | return() 44 | endif() 45 | 46 | find_package(Markdown QUIET) 47 | if(NOT MARKDOWN_EXECUTABLE) 48 | message(FATAL_ERROR "Can't find a markdown conversion tool!") 49 | endif() 50 | 51 | set(NEW_NAME) 52 | list(FIND ARGN "RENAME" _renameloc) 53 | if(_renameloc GREATER -1) 54 | list(LENGTH ARGN _len) 55 | if(NOT _len EQUAL 3) 56 | message(FATAL_ERROR 57 | "Specifying RENAME requires 1 input file and 1 output name!") 58 | endif() 59 | list(GET ARGN 2 NEW_NAME) 60 | list(GET ARGN 0 ARGN) 61 | endif() 62 | 63 | set(ALLFILES) 64 | set(SOURCES) 65 | foreach(fn ${ARGN}) 66 | # Produce an absolute path to the input file 67 | if(IS_ABSOLUTE "${fn}") 68 | get_filename_component(fullpath "${fn}" ABSOLUTE) 69 | get_filename_component(fn "${fn}" NAME) 70 | else() 71 | get_filename_component(fullpath 72 | "${CMAKE_CURRENT_SOURCE_DIR}/${fn}" 73 | ABSOLUTE) 74 | endif() 75 | get_filename_component(fn_noext "${fn}" NAME_WE) 76 | 77 | # Clean up output file name 78 | if(NEW_NAME) 79 | get_filename_component(absout "${_dest}/${NEW_NAME}" ABSOLUTE) 80 | else() 81 | get_filename_component(absout "${_dest}/${fn_noext}.html" ABSOLUTE) 82 | endif() 83 | 84 | add_custom_command(OUTPUT "${absout}" 85 | COMMAND 86 | ${CMAKE_COMMAND} 87 | ARGS -E make_directory "${_dest}" 88 | COMMAND 89 | ${MARKDOWN_EXECUTABLE} 90 | ARGS "${fullpath}" > "${absout}" 91 | MAIN_DEPENDENCY "${fullpath}" 92 | VERBATIM 93 | COMMENT "Converting Markdown ${fn} to HTML in ${absout}...") 94 | list(APPEND SOURCES "${fullpath}") 95 | list(APPEND ALLFILES "${absout}") 96 | endforeach() 97 | 98 | # Custom target depending on all the file copy commands 99 | add_custom_target(${_target} 100 | ALL 101 | SOURCES ${SOURCES} 102 | DEPENDS ${ALLFILES}) 103 | set_property(TARGET ${_target} PROPERTY MARKDOWN_TARGET_OUTPUTS "${ALLFILES}") 104 | endfunction() 105 | 106 | function(install_markdown_target _target) 107 | get_target_property(_mtoutputs ${_target} MARKDOWN_TARGET_OUTPUTS) 108 | if(NOT _mtoutputs) 109 | message(WARNING 110 | "install_markdown_target called on a target not created with add_markdown_target!") 111 | return() 112 | endif() 113 | 114 | # Forward the call to install 115 | install(FILES ${_mtoutputs} ${ARGN}) 116 | endfunction() 117 | -------------------------------------------------------------------------------- /ci-postbuild.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Just a wrapper to run the matching PowerShell script. 3 | PowerShell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Unrestricted -Command "& '%~dpn0.ps1'" 4 | -------------------------------------------------------------------------------- /ci-postbuild.ps1: -------------------------------------------------------------------------------- 1 | # Post-build script for use in CI to create a redistribution bundle 2 | 3 | # Copyright 2015 Sensics, Inc. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | $Dest = "install" 18 | $Src = "deps\install" 19 | 20 | # OSG Library names to copy - will be prefixed by the soname, etc. 21 | $OSGLibs = 'osg', 'osgDB', 'osgGA', 'osgText', 'osgUtil', 'osgViewer' 22 | 23 | # Files to copy from the OSG plugin directory - right now just need to copy enough 24 | # to be able to load the compiled-in .osg-format string. 25 | $OSGPlugins = 'osgdb_deprecated_osg.dll', 'osgdb_osg.dll' 26 | 27 | # Files to copy out of the OSVR install tree. 28 | $OSVRFiles = 'osvr-ver.txt', 29 | 'bin\osvrClientKit.dll', 30 | 'bin\osvrClient.dll', 31 | 'bin\osvrCommon.dll', 32 | 'bin\osvrUtil.dll', 33 | 'bin\msvcp120.dll', 34 | 'bin\msvcr120.dll' 35 | 36 | # "Entry Point" function 37 | function Main() { 38 | Write-Host "Copying OpenSceneGraph binaries to install directory" 39 | Copy-OSG 40 | 41 | Write-Host "Copying OSVR client binaries to install directory" 42 | Copy-OSVRClientRedist 43 | 44 | # Copy documentation/licenses to redist with binaries 45 | Write-Host "Copying redist directory contents to install directory" 46 | Copy-Item "redist\*" -Destination "$Dest" 47 | 48 | # Move and zip the results 49 | $OutName = Get-OutputName 50 | Write-Host "Moving install directory to '$OutName'" 51 | Move-Item $Dest $OutName 52 | Write-Host "Creating compressed output" 53 | Zip-Output $OutName 54 | 55 | Write-Host "ci-postbuild complete!" 56 | } 57 | 58 | function Copy-OSG() { 59 | 60 | $BinDir = Join-Path "$Src" "bin" 61 | 62 | # Gets the "soname" part of the name - like 'osg100-' - that comes before the library name. 63 | $OSGPrefix = (Get-Item "$BinDir\osg*-osg.dll").Name -ireplace 'osg.dll$','' 64 | 65 | # Gets the plugin directory. 66 | $PluginDir = Get-Item "$BinDir\osgPlugins-*" 67 | 68 | ### 69 | # Compute OSG files to copy 70 | ### 71 | 72 | # Copies the OpenThreads dll - different soname than OSG, and just one, so no fancy scripting here. 73 | $OTLib = (Get-Item "$BinDir\ot*-OpenThreads.dll").FullName 74 | 75 | # Get all the OSG libraries to copy 76 | $OSGLibFullPaths = $OSGLibs | % {Join-Path $BinDir "${OSGPrefix}$_.dll"} 77 | 78 | # Get all the plugins to copy 79 | $PluginFullPaths = $OSGPlugins | % {Join-Path $PluginDir $_} 80 | 81 | ### 82 | # Do the Copying! 83 | ### 84 | 85 | $AllTheThings = @($OTLib) + $OSGLibFullPaths + $PluginFullPaths 86 | 87 | # Copy ALL THE THINGS! 88 | Copy-Item $AllTheThings -Destination "$Dest" 89 | } 90 | 91 | 92 | function Copy-OSVRClientRedist() { 93 | $OSVRPaths = $OSVRFiles| % {Join-Path $Src "$_"} 94 | Copy-Item $OSVRPaths -Destination "$Dest" 95 | } 96 | 97 | function Get-OutputName() { 98 | $Ver = Get-Content (Join-Path $Src 'osvr-ver.txt') 99 | $BuildNum = $env:BUILD_NUMBER 100 | $OutName = "OSVR-Tracker-View-built-with-$Ver-viewer-$BuildNum" 101 | return $OutName 102 | } 103 | function Zip-Output($OutName) { 104 | 7za a "${OutName}.7z" "${OutName}\*" 105 | } 106 | 107 | # call the entry point 108 | Main -------------------------------------------------------------------------------- /osvr-tracker-view-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 24 | 32 | 36 | 40 | 44 | 45 | 51 | 56 | 61 | 62 | 69 | 73 | 78 | 79 | 86 | 90 | 95 | 96 | 103 | 107 | 112 | 116 | 117 | 124 | 127 | 131 | 132 | 139 | 143 | 147 | 148 | 149 | 166 | 168 | 169 | 171 | image/svg+xml 172 | 174 | 175 | 176 | Jakub Steiner 177 | 178 | 179 | http://jimmac.musichall.cz 180 | 182 | 183 | 184 | 186 | 188 | 190 | 192 | 194 | 196 | 198 | 199 | 200 | 201 | 204 | 209 | 214 | 219 | 224 | 229 | 230 | 233 | 235 | 243 | 250 | 255 | 261 | 269 | 280 | 288 | 293 | 294 | 295 | 296 | -------------------------------------------------------------------------------- /osvr_tracker_view.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OSVR/OSVR-Tracker-Viewer/c6306ef28db50ec961fce15d6c203760ac3ccf0f/osvr_tracker_view.ico -------------------------------------------------------------------------------- /osvr_tracker_view.rc: -------------------------------------------------------------------------------- 1 | APP_ICON ICON DISCARDABLE "osvr_tracker_view.ico" -------------------------------------------------------------------------------- /redist/OpenSceneGraph-LICENSE.txt: -------------------------------------------------------------------------------- 1 | OpenSceneGraph Public License, Version 0.0 2 | ========================================== 3 | 4 | Copyright (C) 2002 Robert Osfield. 5 | 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this licence document, but changing it is not allowed. 8 | 9 | OPENSCENEGRAPH PUBLIC LICENCE 10 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 11 | 12 | This library is free software; you can redistribute it and/or modify it 13 | under the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 14 | or later. 15 | 16 | Notes: the OSGPL is based on the LGPL, with the 4 exceptions laid 17 | out in the wxWindows section below. The LGPL is contained in the 18 | final section of this license. 19 | 20 | 21 | ------------------------------------------------------------------------------- 22 | 23 | wxWindows Library Licence, Version 3 24 | ==================================== 25 | 26 | Copyright (C) 1998 Julian Smart, Robert Roebling [, ...] 27 | 28 | Everyone is permitted to copy and distribute verbatim copies 29 | of this licence document, but changing it is not allowed. 30 | 31 | WXWINDOWS LIBRARY LICENCE 32 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 33 | 34 | This library is free software; you can redistribute it and/or modify it 35 | under the terms of the GNU Library General Public Licence as published by 36 | the Free Software Foundation; either version 2 of the Licence, or (at 37 | your option) any later version. 38 | 39 | This library is distributed in the hope that it will be useful, but 40 | WITHOUT ANY WARRANTY; without even the implied warranty of 41 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 42 | General Public Licence for more details. 43 | 44 | You should have received a copy of the GNU Library General Public Licence 45 | along with this software, usually in a file named COPYING.LIB. If not, 46 | write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 47 | Boston, MA 02111-1307 USA. 48 | 49 | EXCEPTION NOTICE 50 | 51 | 1. As a special exception, the copyright holders of this library give 52 | permission for additional uses of the text contained in this release of 53 | the library as licenced under the wxWindows Library Licence, applying 54 | either version 3 of the Licence, or (at your option) any later version of 55 | the Licence as published by the copyright holders of version 3 of the 56 | Licence document. 57 | 58 | 2. The exception is that you may use, copy, link, modify and distribute 59 | under the user's own terms, binary object code versions of works based 60 | on the Library. 61 | 62 | 3. If you copy code from files distributed under the terms of the GNU 63 | General Public Licence or the GNU Library General Public Licence into a 64 | copy of this library, as this licence permits, the exception does not 65 | apply to the code that you add in this way. To avoid misleading anyone as 66 | to the status of such modified files, you must delete this exception 67 | notice from such code and/or adjust the licensing conditions notice 68 | accordingly. 69 | 70 | 4. If you write modifications of your own for this library, it is your 71 | choice whether to permit this exception to apply to your modifications. 72 | If you do not wish that, you must delete the exception notice from such 73 | code and/or adjust the licensing conditions notice accordingly. 74 | 75 | 76 | ------------------------------------------------------------------------------ 77 | GNU LESSER GENERAL PUBLIC LICENSE 78 | Version 2.1, February 1999 79 | 80 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 81 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 82 | Everyone is permitted to copy and distribute verbatim copies 83 | of this license document, but changing it is not allowed. 84 | 85 | [This is the first released version of the Lesser GPL. It also counts 86 | as the successor of the GNU Library Public License, version 2, hence 87 | the version number 2.1.] 88 | 89 | Preamble 90 | 91 | The licenses for most software are designed to take away your 92 | freedom to share and change it. By contrast, the GNU General Public 93 | Licenses are intended to guarantee your freedom to share and change 94 | free software--to make sure the software is free for all its users. 95 | 96 | This license, the Lesser General Public License, applies to some 97 | specially designated software packages--typically libraries--of the 98 | Free Software Foundation and other authors who decide to use it. You 99 | can use it too, but we suggest you first think carefully about whether 100 | this license or the ordinary General Public License is the better 101 | strategy to use in any particular case, based on the explanations below. 102 | 103 | When we speak of free software, we are referring to freedom of use, 104 | not price. Our General Public Licenses are designed to make sure that 105 | you have the freedom to distribute copies of free software (and charge 106 | for this service if you wish); that you receive source code or can get 107 | it if you want it; that you can change the software and use pieces of 108 | it in new free programs; and that you are informed that you can do 109 | these things. 110 | 111 | To protect your rights, we need to make restrictions that forbid 112 | distributors to deny you these rights or to ask you to surrender these 113 | rights. These restrictions translate to certain responsibilities for 114 | you if you distribute copies of the library or if you modify it. 115 | 116 | For example, if you distribute copies of the library, whether gratis 117 | or for a fee, you must give the recipients all the rights that we gave 118 | you. You must make sure that they, too, receive or can get the source 119 | code. If you link other code with the library, you must provide 120 | complete object files to the recipients, so that they can relink them 121 | with the library after making changes to the library and recompiling 122 | it. And you must show them these terms so they know their rights. 123 | 124 | We protect your rights with a two-step method: (1) we copyright the 125 | library, and (2) we offer you this license, which gives you legal 126 | permission to copy, distribute and/or modify the library. 127 | 128 | To protect each distributor, we want to make it very clear that 129 | there is no warranty for the free library. Also, if the library is 130 | modified by someone else and passed on, the recipients should know 131 | that what they have is not the original version, so that the original 132 | author's reputation will not be affected by problems that might be 133 | introduced by others. 134 | 135 | Finally, software patents pose a constant threat to the existence of 136 | any free program. We wish to make sure that a company cannot 137 | effectively restrict the users of a free program by obtaining a 138 | restrictive license from a patent holder. Therefore, we insist that 139 | any patent license obtained for a version of the library must be 140 | consistent with the full freedom of use specified in this license. 141 | 142 | Most GNU software, including some libraries, is covered by the 143 | ordinary GNU General Public License. This license, the GNU Lesser 144 | General Public License, applies to certain designated libraries, and 145 | is quite different from the ordinary General Public License. We use 146 | this license for certain libraries in order to permit linking those 147 | libraries into non-free programs. 148 | 149 | When a program is linked with a library, whether statically or using 150 | a shared library, the combination of the two is legally speaking a 151 | combined work, a derivative of the original library. The ordinary 152 | General Public License therefore permits such linking only if the 153 | entire combination fits its criteria of freedom. The Lesser General 154 | Public License permits more lax criteria for linking other code with 155 | the library. 156 | 157 | We call this license the "Lesser" General Public License because it 158 | does Less to protect the user's freedom than the ordinary General 159 | Public License. It also provides other free software developers Less 160 | of an advantage over competing non-free programs. These disadvantages 161 | are the reason we use the ordinary General Public License for many 162 | libraries. However, the Lesser license provides advantages in certain 163 | special circumstances. 164 | 165 | For example, on rare occasions, there may be a special need to 166 | encourage the widest possible use of a certain library, so that it becomes 167 | a de-facto standard. To achieve this, non-free programs must be 168 | allowed to use the library. A more frequent case is that a free 169 | library does the same job as widely used non-free libraries. In this 170 | case, there is little to gain by limiting the free library to free 171 | software only, so we use the Lesser General Public License. 172 | 173 | In other cases, permission to use a particular library in non-free 174 | programs enables a greater number of people to use a large body of 175 | free software. For example, permission to use the GNU C Library in 176 | non-free programs enables many more people to use the whole GNU 177 | operating system, as well as its variant, the GNU/Linux operating 178 | system. 179 | 180 | Although the Lesser General Public License is Less protective of the 181 | users' freedom, it does ensure that the user of a program that is 182 | linked with the Library has the freedom and the wherewithal to run 183 | that program using a modified version of the Library. 184 | 185 | The precise terms and conditions for copying, distribution and 186 | modification follow. Pay close attention to the difference between a 187 | "work based on the library" and a "work that uses the library". The 188 | former contains code derived from the library, whereas the latter must 189 | be combined with the library in order to run. 190 | 191 | GNU LESSER GENERAL PUBLIC LICENSE 192 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 193 | 194 | 0. This License Agreement applies to any software library or other 195 | program which contains a notice placed by the copyright holder or 196 | other authorized party saying it may be distributed under the terms of 197 | this Lesser General Public License (also called "this License"). 198 | Each licensee is addressed as "you". 199 | 200 | A "library" means a collection of software functions and/or data 201 | prepared so as to be conveniently linked with application programs 202 | (which use some of those functions and data) to form executables. 203 | 204 | The "Library", below, refers to any such software library or work 205 | which has been distributed under these terms. A "work based on the 206 | Library" means either the Library or any derivative work under 207 | copyright law: that is to say, a work containing the Library or a 208 | portion of it, either verbatim or with modifications and/or translated 209 | straightforwardly into another language. (Hereinafter, translation is 210 | included without limitation in the term "modification".) 211 | 212 | "Source code" for a work means the preferred form of the work for 213 | making modifications to it. For a library, complete source code means 214 | all the source code for all modules it contains, plus any associated 215 | interface definition files, plus the scripts used to control compilation 216 | and installation of the library. 217 | 218 | Activities other than copying, distribution and modification are not 219 | covered by this License; they are outside its scope. The act of 220 | running a program using the Library is not restricted, and output from 221 | such a program is covered only if its contents constitute a work based 222 | on the Library (independent of the use of the Library in a tool for 223 | writing it). Whether that is true depends on what the Library does 224 | and what the program that uses the Library does. 225 | 226 | 1. You may copy and distribute verbatim copies of the Library's 227 | complete source code as you receive it, in any medium, provided that 228 | you conspicuously and appropriately publish on each copy an 229 | appropriate copyright notice and disclaimer of warranty; keep intact 230 | all the notices that refer to this License and to the absence of any 231 | warranty; and distribute a copy of this License along with the 232 | Library. 233 | 234 | You may charge a fee for the physical act of transferring a copy, 235 | and you may at your option offer warranty protection in exchange for a 236 | fee. 237 | 238 | 2. You may modify your copy or copies of the Library or any portion 239 | of it, thus forming a work based on the Library, and copy and 240 | distribute such modifications or work under the terms of Section 1 241 | above, provided that you also meet all of these conditions: 242 | 243 | a) The modified work must itself be a software library. 244 | 245 | b) You must cause the files modified to carry prominent notices 246 | stating that you changed the files and the date of any change. 247 | 248 | c) You must cause the whole of the work to be licensed at no 249 | charge to all third parties under the terms of this License. 250 | 251 | d) If a facility in the modified Library refers to a function or a 252 | table of data to be supplied by an application program that uses 253 | the facility, other than as an argument passed when the facility 254 | is invoked, then you must make a good faith effort to ensure that, 255 | in the event an application does not supply such function or 256 | table, the facility still operates, and performs whatever part of 257 | its purpose remains meaningful. 258 | 259 | (For example, a function in a library to compute square roots has 260 | a purpose that is entirely well-defined independent of the 261 | application. Therefore, Subsection 2d requires that any 262 | application-supplied function or table used by this function must 263 | be optional: if the application does not supply it, the square 264 | root function must still compute square roots.) 265 | 266 | These requirements apply to the modified work as a whole. If 267 | identifiable sections of that work are not derived from the Library, 268 | and can be reasonably considered independent and separate works in 269 | themselves, then this License, and its terms, do not apply to those 270 | sections when you distribute them as separate works. But when you 271 | distribute the same sections as part of a whole which is a work based 272 | on the Library, the distribution of the whole must be on the terms of 273 | this License, whose permissions for other licensees extend to the 274 | entire whole, and thus to each and every part regardless of who wrote 275 | it. 276 | 277 | Thus, it is not the intent of this section to claim rights or contest 278 | your rights to work written entirely by you; rather, the intent is to 279 | exercise the right to control the distribution of derivative or 280 | collective works based on the Library. 281 | 282 | In addition, mere aggregation of another work not based on the Library 283 | with the Library (or with a work based on the Library) on a volume of 284 | a storage or distribution medium does not bring the other work under 285 | the scope of this License. 286 | 287 | 3. You may opt to apply the terms of the ordinary GNU General Public 288 | License instead of this License to a given copy of the Library. To do 289 | this, you must alter all the notices that refer to this License, so 290 | that they refer to the ordinary GNU General Public License, version 2, 291 | instead of to this License. (If a newer version than version 2 of the 292 | ordinary GNU General Public License has appeared, then you can specify 293 | that version instead if you wish.) Do not make any other change in 294 | these notices. 295 | 296 | Once this change is made in a given copy, it is irreversible for 297 | that copy, so the ordinary GNU General Public License applies to all 298 | subsequent copies and derivative works made from that copy. 299 | 300 | This option is useful when you wish to copy part of the code of 301 | the Library into a program that is not a library. 302 | 303 | 4. You may copy and distribute the Library (or a portion or 304 | derivative of it, under Section 2) in object code or executable form 305 | under the terms of Sections 1 and 2 above provided that you accompany 306 | it with the complete corresponding machine-readable source code, which 307 | must be distributed under the terms of Sections 1 and 2 above on a 308 | medium customarily used for software interchange. 309 | 310 | If distribution of object code is made by offering access to copy 311 | from a designated place, then offering equivalent access to copy the 312 | source code from the same place satisfies the requirement to 313 | distribute the source code, even though third parties are not 314 | compelled to copy the source along with the object code. 315 | 316 | 5. A program that contains no derivative of any portion of the 317 | Library, but is designed to work with the Library by being compiled or 318 | linked with it, is called a "work that uses the Library". Such a 319 | work, in isolation, is not a derivative work of the Library, and 320 | therefore falls outside the scope of this License. 321 | 322 | However, linking a "work that uses the Library" with the Library 323 | creates an executable that is a derivative of the Library (because it 324 | contains portions of the Library), rather than a "work that uses the 325 | library". The executable is therefore covered by this License. 326 | Section 6 states terms for distribution of such executables. 327 | 328 | When a "work that uses the Library" uses material from a header file 329 | that is part of the Library, the object code for the work may be a 330 | derivative work of the Library even though the source code is not. 331 | Whether this is true is especially significant if the work can be 332 | linked without the Library, or if the work is itself a library. The 333 | threshold for this to be true is not precisely defined by law. 334 | 335 | If such an object file uses only numerical parameters, data 336 | structure layouts and accessors, and small macros and small inline 337 | functions (ten lines or less in length), then the use of the object 338 | file is unrestricted, regardless of whether it is legally a derivative 339 | work. (Executables containing this object code plus portions of the 340 | Library will still fall under Section 6.) 341 | 342 | Otherwise, if the work is a derivative of the Library, you may 343 | distribute the object code for the work under the terms of Section 6. 344 | Any executables containing that work also fall under Section 6, 345 | whether or not they are linked directly with the Library itself. 346 | 347 | 6. As an exception to the Sections above, you may also combine or 348 | link a "work that uses the Library" with the Library to produce a 349 | work containing portions of the Library, and distribute that work 350 | under terms of your choice, provided that the terms permit 351 | modification of the work for the customer's own use and reverse 352 | engineering for debugging such modifications. 353 | 354 | You must give prominent notice with each copy of the work that the 355 | Library is used in it and that the Library and its use are covered by 356 | this License. You must supply a copy of this License. If the work 357 | during execution displays copyright notices, you must include the 358 | copyright notice for the Library among them, as well as a reference 359 | directing the user to the copy of this License. Also, you must do one 360 | of these things: 361 | 362 | a) Accompany the work with the complete corresponding 363 | machine-readable source code for the Library including whatever 364 | changes were used in the work (which must be distributed under 365 | Sections 1 and 2 above); and, if the work is an executable linked 366 | with the Library, with the complete machine-readable "work that 367 | uses the Library", as object code and/or source code, so that the 368 | user can modify the Library and then relink to produce a modified 369 | executable containing the modified Library. (It is understood 370 | that the user who changes the contents of definitions files in the 371 | Library will not necessarily be able to recompile the application 372 | to use the modified definitions.) 373 | 374 | b) Use a suitable shared library mechanism for linking with the 375 | Library. A suitable mechanism is one that (1) uses at run time a 376 | copy of the library already present on the user's computer system, 377 | rather than copying library functions into the executable, and (2) 378 | will operate properly with a modified version of the library, if 379 | the user installs one, as long as the modified version is 380 | interface-compatible with the version that the work was made with. 381 | 382 | c) Accompany the work with a written offer, valid for at 383 | least three years, to give the same user the materials 384 | specified in Subsection 6a, above, for a charge no more 385 | than the cost of performing this distribution. 386 | 387 | d) If distribution of the work is made by offering access to copy 388 | from a designated place, offer equivalent access to copy the above 389 | specified materials from the same place. 390 | 391 | e) Verify that the user has already received a copy of these 392 | materials or that you have already sent this user a copy. 393 | 394 | For an executable, the required form of the "work that uses the 395 | Library" must include any data and utility programs needed for 396 | reproducing the executable from it. However, as a special exception, 397 | the materials to be distributed need not include anything that is 398 | normally distributed (in either source or binary form) with the major 399 | components (compiler, kernel, and so on) of the operating system on 400 | which the executable runs, unless that component itself accompanies 401 | the executable. 402 | 403 | It may happen that this requirement contradicts the license 404 | restrictions of other proprietary libraries that do not normally 405 | accompany the operating system. Such a contradiction means you cannot 406 | use both them and the Library together in an executable that you 407 | distribute. 408 | 409 | 7. You may place library facilities that are a work based on the 410 | Library side-by-side in a single library together with other library 411 | facilities not covered by this License, and distribute such a combined 412 | library, provided that the separate distribution of the work based on 413 | the Library and of the other library facilities is otherwise 414 | permitted, and provided that you do these two things: 415 | 416 | a) Accompany the combined library with a copy of the same work 417 | based on the Library, uncombined with any other library 418 | facilities. This must be distributed under the terms of the 419 | Sections above. 420 | 421 | b) Give prominent notice with the combined library of the fact 422 | that part of it is a work based on the Library, and explaining 423 | where to find the accompanying uncombined form of the same work. 424 | 425 | 8. You may not copy, modify, sublicense, link with, or distribute 426 | the Library except as expressly provided under this License. Any 427 | attempt otherwise to copy, modify, sublicense, link with, or 428 | distribute the Library is void, and will automatically terminate your 429 | rights under this License. However, parties who have received copies, 430 | or rights, from you under this License will not have their licenses 431 | terminated so long as such parties remain in full compliance. 432 | 433 | 9. You are not required to accept this License, since you have not 434 | signed it. However, nothing else grants you permission to modify or 435 | distribute the Library or its derivative works. These actions are 436 | prohibited by law if you do not accept this License. Therefore, by 437 | modifying or distributing the Library (or any work based on the 438 | Library), you indicate your acceptance of this License to do so, and 439 | all its terms and conditions for copying, distributing or modifying 440 | the Library or works based on it. 441 | 442 | 10. Each time you redistribute the Library (or any work based on the 443 | Library), the recipient automatically receives a license from the 444 | original licensor to copy, distribute, link with or modify the Library 445 | subject to these terms and conditions. You may not impose any further 446 | restrictions on the recipients' exercise of the rights granted herein. 447 | You are not responsible for enforcing compliance by third parties with 448 | this License. 449 | 450 | 11. If, as a consequence of a court judgment or allegation of patent 451 | infringement or for any other reason (not limited to patent issues), 452 | conditions are imposed on you (whether by court order, agreement or 453 | otherwise) that contradict the conditions of this License, they do not 454 | excuse you from the conditions of this License. If you cannot 455 | distribute so as to satisfy simultaneously your obligations under this 456 | License and any other pertinent obligations, then as a consequence you 457 | may not distribute the Library at all. For example, if a patent 458 | license would not permit royalty-free redistribution of the Library by 459 | all those who receive copies directly or indirectly through you, then 460 | the only way you could satisfy both it and this License would be to 461 | refrain entirely from distribution of the Library. 462 | 463 | If any portion of this section is held invalid or unenforceable under any 464 | particular circumstance, the balance of the section is intended to apply, 465 | and the section as a whole is intended to apply in other circumstances. 466 | 467 | It is not the purpose of this section to induce you to infringe any 468 | patents or other property right claims or to contest validity of any 469 | such claims; this section has the sole purpose of protecting the 470 | integrity of the free software distribution system which is 471 | implemented by public license practices. Many people have made 472 | generous contributions to the wide range of software distributed 473 | through that system in reliance on consistent application of that 474 | system; it is up to the author/donor to decide if he or she is willing 475 | to distribute software through any other system and a licensee cannot 476 | impose that choice. 477 | 478 | This section is intended to make thoroughly clear what is believed to 479 | be a consequence of the rest of this License. 480 | 481 | 12. If the distribution and/or use of the Library is restricted in 482 | certain countries either by patents or by copyrighted interfaces, the 483 | original copyright holder who places the Library under this License may add 484 | an explicit geographical distribution limitation excluding those countries, 485 | so that distribution is permitted only in or among countries not thus 486 | excluded. In such case, this License incorporates the limitation as if 487 | written in the body of this License. 488 | 489 | 13. The Free Software Foundation may publish revised and/or new 490 | versions of the Lesser General Public License from time to time. 491 | Such new versions will be similar in spirit to the present version, 492 | but may differ in detail to address new problems or concerns. 493 | 494 | Each version is given a distinguishing version number. If the Library 495 | specifies a version number of this License which applies to it and 496 | "any later version", you have the option of following the terms and 497 | conditions either of that version or of any later version published by 498 | the Free Software Foundation. If the Library does not specify a 499 | license version number, you may choose any version ever published by 500 | the Free Software Foundation. 501 | 502 | 14. If you wish to incorporate parts of the Library into other free 503 | programs whose distribution conditions are incompatible with these, 504 | write to the author to ask for permission. For software which is 505 | copyrighted by the Free Software Foundation, write to the Free 506 | Software Foundation; we sometimes make exceptions for this. Our 507 | decision will be guided by the two goals of preserving the free status 508 | of all derivatives of our free software and of promoting the sharing 509 | and reuse of software generally. 510 | 511 | NO WARRANTY 512 | 513 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 514 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 515 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 516 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 517 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 518 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 519 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 520 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 521 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 522 | 523 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 524 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 525 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 526 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 527 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 528 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 529 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 530 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 531 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 532 | DAMAGES. 533 | 534 | END OF TERMS AND CONDITIONS 535 | 536 | How to Apply These Terms to Your New Libraries 537 | 538 | If you develop a new library, and you want it to be of the greatest 539 | possible use to the public, we recommend making it free software that 540 | everyone can redistribute and change. You can do so by permitting 541 | redistribution under these terms (or, alternatively, under the terms of the 542 | ordinary General Public License). 543 | 544 | To apply these terms, attach the following notices to the library. It is 545 | safest to attach them to the start of each source file to most effectively 546 | convey the exclusion of warranty; and each file should have at least the 547 | "copyright" line and a pointer to where the full notice is found. 548 | 549 | 550 | Copyright (C) 551 | 552 | This library is free software; you can redistribute it and/or 553 | modify it under the terms of the GNU Lesser General Public 554 | License as published by the Free Software Foundation; either 555 | version 2.1 of the License, or (at your option) any later version. 556 | 557 | This library is distributed in the hope that it will be useful, 558 | but WITHOUT ANY WARRANTY; without even the implied warranty of 559 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 560 | Lesser General Public License for more details. 561 | 562 | You should have received a copy of the GNU Lesser General Public 563 | License along with this library; if not, write to the Free Software 564 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 565 | 566 | Also add information on how to contact you by electronic and paper mail. 567 | 568 | You should also get your employer (if you work as a programmer) or your 569 | school, if any, to sign a "copyright disclaimer" for the library, if 570 | necessary. Here is a sample; alter the names: 571 | 572 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 573 | library `Frob' (a library for tweaking knobs) written by James Random Hacker. 574 | 575 | , 1 April 1990 576 | Ty Coon, President of Vice 577 | 578 | That's all there is to it! 579 | -------------------------------------------------------------------------------- /redist/README-components-and-licenses.txt: -------------------------------------------------------------------------------- 1 | OSVR-Tracker-Viewer code was built against OSVR-Core binaries - see other text files for information on which version. 2 | 3 | This distribution includes some OpenSceneGraph binary files, built from source here: https://github.com/OpenSceneGraph/osg 4 | 5 | The license for OpenSceneGraph is contained in OpenSceneGraph-LICENSE.txt --------------------------------------------------------------------------------