├── CHANGES.md ├── CMakeLists.txt ├── COPYING.GPLv3 ├── COPYRIGHT ├── README.md ├── doc ├── CMakeLists.txt ├── Doxyfile.in └── main.dox ├── include ├── CMakeLists.txt └── NatNetLinux │ ├── CMakeLists.txt │ ├── CommandListener.h │ ├── FrameListener.h │ ├── NatNet.h │ ├── NatNetPacket.h │ └── NatNetSender.h └── src ├── CMakeLists.txt └── SimpleExample.cpp /CHANGES.md: -------------------------------------------------------------------------------- 1 | # NatNetLinux Changelog 2 | 3 | ## v0.1 4 | 5 | This is the first fully-working and tested version. 6 | 7 | ### Features 8 | 9 | * Can read every part of the NatNet 2.5 and below packets into structured 10 | C++ objects. 11 | * Added time stamps on packet receipt [#2](https://github.com/rocketman768/NatNetLinux/issues/2). 12 | 13 | ### Bug Fixes 14 | 15 | * Random segfault (was a concurrency issue). 16 | * Missing headers on install [#1](https://github.com/rocketman768/NatNetLinux/issues/1). 17 | 18 | ### Incompatibilities 19 | 20 | None 21 | 22 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) 2 | PROJECT( natnetlinux ) 3 | 4 | SET( PROJECT_SOURCE_ROOT ${CMAKE_CURRENT_SOURCE_DIR} ) 5 | SET( PROJECT_BINARY_ROOT ${CMAKE_CURRENT_BINARY_DIR} ) 6 | SET( VERSION_MAJOR 0 ) 7 | SET( VERSION_MINOR 1 ) 8 | SET( VERSION_PATCH 1 ) 9 | SET( VERSION_STRING "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" ) 10 | 11 | OPTION( BUILD_EXAMPLES "If on, build executable examples." ON ) 12 | 13 | # Add custom CMakeModules path 14 | #SET( CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules ${CMAKE_MODULE_PATH} ) 15 | 16 | # Put executables in bin/ 17 | SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") 18 | 19 | # Include our own directories. 20 | INCLUDE_DIRECTORIES( "${CMAKE_CURRENT_SOURCE_DIR}/include" ) 21 | 22 | # Need to find boost at build time only if we are actually compiling examples. 23 | IF( ${BUILD_EXAMPLES} ) 24 | FIND_PACKAGE( Boost COMPONENTS program_options system thread REQUIRED) 25 | INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} ) 26 | ENDIF() 27 | 28 | # Try to find Doxygen 29 | FIND_PROGRAM( DOXYGEN_CMD doxygen ) 30 | 31 | # Descend into subdirectories 32 | ADD_SUBDIRECTORY( include ) 33 | IF( DOXYGEN_CMD ) 34 | ADD_SUBDIRECTORY( doc ) 35 | ENDIF() 36 | IF( ${BUILD_EXAMPLES} ) 37 | ADD_SUBDIRECTORY( src ) 38 | ENDIF() 39 | 40 | -------------------------------------------------------------------------------- /COPYING.GPLv3: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | Files: * 2 | Copyright: 2013, Philip G. Lee 3 | License: GPL-3 4 | 5 | License: GPL-3 6 | This package is free software; you can redistribute it and/or modify 7 | it under the terms of the GNU General Public License as published by 8 | the Free Software Foundation; either version 3 of the License, or 9 | (at your option) any later version. 10 | 11 | This package is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this package;if not, write to the Free Software Foundation, 18 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or visit 19 | http://www.gnu.org/copyleft/gpl.html 20 | 21 | On Debian systems, the complete text of the GNU General 22 | Public License can be found in `/usr/share/common-licenses/GPL-3'. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NatNetLinux 2 | 3 | The purpose of this package is to provide a lightweight library to read 4 | NaturalPoint's NatNet UDP packets in Unix-based OSs. 5 | 6 | ## Copyright 7 | 8 | All parts of NatNetLinux are Copyright 2013, 9 | Philip G. Lee . 10 | 11 | NatNetLinux is free software; you can redistribute it and/or modify 12 | it under the terms of the GNU General Public License as published by 13 | the Free Software Foundation; either version 3 of the License, or 14 | (at your option) any later version. 15 | 16 | NatNetLinux is distributed in the hope that it will be useful, 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 | GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License 22 | along with NatNetLinux;if not, write to the Free Software Foundation, 23 | Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or visit 24 | http://www.gnu.org/copyleft/gpl.html 25 | 26 | ## Prerequisites 27 | 28 | ### Required 29 | 30 | * `cmake` - version 2.8 or later 31 | * `boost` - with `system` and `thread` components 32 | 33 | On Debian-based systems (like Ubuntu), this will install the required 34 | components: 35 | 36 | $ sudo apt-get install cmake libboost-dev libboost-program-option-dev libboost-system-dev libboost-thread-dev 37 | 38 | ### Optional 39 | 40 | * `git` - if you want to clone directly from the repository 41 | * `doxygen` - if you want to build the documentation 42 | 43 | On Debian-based systems (like Ubuntu), this will install the optional 44 | components: 45 | 46 | $ sudo apt-get install git doxygen 47 | 48 | ## Compiling and Installing 49 | 50 | $ cd ~ 51 | $ git clone https://github.com/rocketman768/NatNetLinux.git NatNetLinux 52 | $ mkdir build 53 | $ cd build 54 | $ cmake ../NatNetLinux 55 | $ make 56 | $ sudo make install 57 | 58 | ## Examples 59 | 60 | Please find `src/SimpleExample.cpp` in the source code. It has all the basic 61 | elements of using this library. 62 | 63 | ## Documentation 64 | 65 | The `doc` target will generate doxygen documentation if doxygen is installed. 66 | The html index page will be generated in `build/doc/html/index.html`, which 67 | you can open with any web browser. 68 | 69 | -------------------------------------------------------------------------------- /doc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | FIND_PROGRAM( DOT_CMD dot ) 2 | 3 | # Set some variables to configure Doxyfile.in================================== 4 | IF( UNIX AND NOT APPLE ) 5 | SET( SHORT_NAMES "NO" ) 6 | ELSE() 7 | SET( SHORT_NAMES "YES" ) 8 | ENDIF() 9 | 10 | IF( APPLE ) 11 | SET(GENERATE_DOCSET "YES") 12 | ELSE() 13 | SET(GENERATE_DOCSET "NO") 14 | ENDIF() 15 | 16 | IF( DOT_CMD ) 17 | SET(HAVE_DOT "YES") 18 | ELSE() 19 | SET(HAVE_DOT "NO") 20 | ENDIF() 21 | 22 | SET( DOC_OUTPUT_DIRECTORY ${PROJECT_BINARY_ROOT}/doc ) 23 | 24 | CONFIGURE_FILE( Doxyfile.in Doxyfile ) 25 | #============================================================================== 26 | 27 | ADD_CUSTOM_TARGET( doc ) 28 | 29 | IF( DOXYGEN_CMD ) 30 | ADD_CUSTOM_TARGET( 31 | doc-doxygen 32 | COMMAND ${DOXYGEN_CMD} Doxyfile 33 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 34 | ) 35 | ADD_DEPENDENCIES(doc doc-doxygen) 36 | IF( GENERATE_DOCSET ) 37 | ADD_CUSTOM_TARGET( 38 | docset 39 | COMMAND make 40 | DEPENDS doc-doxygen 41 | WORKING_DIRECTORY html 42 | ) 43 | ADD_DEPENDENCIES(doc docset) 44 | ENDIF() 45 | ELSE() 46 | MESSAGE( STATUS "You do not have doxygen. Documentation will not be built." ) 47 | ENDIF() 48 | -------------------------------------------------------------------------------- /doc/Doxyfile.in: -------------------------------------------------------------------------------- 1 | # Doxyfile 1.8.1.2 2 | 3 | # This file describes the settings to be used by the documentation system 4 | # doxygen (www.doxygen.org) for a project. 5 | # 6 | # All text after a hash (#) is considered a comment and will be ignored. 7 | # The format is: 8 | # TAG = value [value, ...] 9 | # For lists items can also be appended using: 10 | # TAG += value [value, ...] 11 | # Values that contain spaces should be placed between quotes (" "). 12 | 13 | #--------------------------------------------------------------------------- 14 | # Project related configuration options 15 | #--------------------------------------------------------------------------- 16 | 17 | # This tag specifies the encoding used for all characters in the config file 18 | # that follow. The default is UTF-8 which is also the encoding used for all 19 | # text before the first occurrence of this tag. Doxygen uses libiconv (or the 20 | # iconv built into libc) for the transcoding. See 21 | # http://www.gnu.org/software/libiconv for the list of possible encodings. 22 | 23 | DOXYFILE_ENCODING = UTF-8 24 | 25 | # The PROJECT_NAME tag is a single word (or sequence of words) that should 26 | # identify the project. Note that if you do not use Doxywizard you need 27 | # to put quotes around the project name if it contains spaces. 28 | 29 | PROJECT_NAME = "NatNetLinux" 30 | 31 | # The PROJECT_NUMBER tag can be used to enter a project or revision number. 32 | # This could be handy for archiving the generated documentation or 33 | # if some version control system is used. 34 | 35 | PROJECT_NUMBER = ${VERSION_STRING} 36 | 37 | # Using the PROJECT_BRIEF tag one can provide an optional one line description 38 | # for a project that appears at the top of each page and should give viewer 39 | # a quick idea about the purpose of the project. Keep the description short. 40 | 41 | PROJECT_BRIEF = "Header-only library to read NatNet packets" 42 | 43 | # With the PROJECT_LOGO tag one can specify an logo or icon that is 44 | # included in the documentation. The maximum height of the logo should not 45 | # exceed 55 pixels and the maximum width should not exceed 200 pixels. 46 | # Doxygen will copy the logo to the output directory. 47 | 48 | PROJECT_LOGO = 49 | 50 | # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 51 | # base path where the generated documentation will be put. 52 | # If a relative path is entered, it will be relative to the location 53 | # where doxygen was started. If left blank the current directory will be used. 54 | 55 | OUTPUT_DIRECTORY = ${DOC_OUTPUT_DIRECTORY} 56 | 57 | # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 58 | # 4096 sub-directories (in 2 levels) under the output directory of each output 59 | # format and will distribute the generated files over these directories. 60 | # Enabling this option can be useful when feeding doxygen a huge amount of 61 | # source files, where putting all generated files in the same directory would 62 | # otherwise cause performance problems for the file system. 63 | 64 | CREATE_SUBDIRS = NO 65 | 66 | # The OUTPUT_LANGUAGE tag is used to specify the language in which all 67 | # documentation generated by doxygen is written. Doxygen will use this 68 | # information to generate all constant output in the proper language. 69 | # The default language is English, other supported languages are: 70 | # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 71 | # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 72 | # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 73 | # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 74 | # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, 75 | # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. 76 | 77 | OUTPUT_LANGUAGE = English 78 | 79 | # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 80 | # include brief member descriptions after the members that are listed in 81 | # the file and class documentation (similar to JavaDoc). 82 | # Set to NO to disable this. 83 | 84 | BRIEF_MEMBER_DESC = YES 85 | 86 | # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 87 | # the brief description of a member or function before the detailed description. 88 | # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 89 | # brief descriptions will be completely suppressed. 90 | 91 | REPEAT_BRIEF = YES 92 | 93 | # This tag implements a quasi-intelligent brief description abbreviator 94 | # that is used to form the text in various listings. Each string 95 | # in this list, if found as the leading text of the brief description, will be 96 | # stripped from the text and the result after processing the whole list, is 97 | # used as the annotated text. Otherwise, the brief description is used as-is. 98 | # If left blank, the following values are used ("$name" is automatically 99 | # replaced with the name of the entity): "The $name class" "The $name widget" 100 | # "The $name file" "is" "provides" "specifies" "contains" 101 | # "represents" "a" "an" "the" 102 | 103 | ABBREVIATE_BRIEF = 104 | 105 | # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 106 | # Doxygen will generate a detailed section even if there is only a brief 107 | # description. 108 | 109 | ALWAYS_DETAILED_SEC = NO 110 | 111 | # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 112 | # inherited members of a class in the documentation of that class as if those 113 | # members were ordinary class members. Constructors, destructors and assignment 114 | # operators of the base classes will not be shown. 115 | 116 | INLINE_INHERITED_MEMB = NO 117 | 118 | # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 119 | # path before files name in the file list and in the header files. If set 120 | # to NO the shortest path that makes the file name unique will be used. 121 | 122 | FULL_PATH_NAMES = YES 123 | 124 | # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 125 | # can be used to strip a user-defined part of the path. Stripping is 126 | # only done if one of the specified strings matches the left-hand part of 127 | # the path. The tag can be used to show relative paths in the file list. 128 | # If left blank the directory from which doxygen is run is used as the 129 | # path to strip. 130 | 131 | STRIP_FROM_PATH = ${PROJECT_SOURCE_ROOT} 132 | 133 | # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 134 | # the path mentioned in the documentation of a class, which tells 135 | # the reader which header file to include in order to use a class. 136 | # If left blank only the name of the header file containing the class 137 | # definition is used. Otherwise one should specify the include paths that 138 | # are normally passed to the compiler using the -I flag. 139 | 140 | STRIP_FROM_INC_PATH = ${PROJECT_SOURCE_ROOT}/include 141 | 142 | # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 143 | # (but less readable) file names. This can be useful if your file system 144 | # doesn't support long names like on DOS, Mac, or CD-ROM. 145 | 146 | SHORT_NAMES = ${SHORT_NAMES} 147 | 148 | # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 149 | # will interpret the first line (until the first dot) of a JavaDoc-style 150 | # comment as the brief description. If set to NO, the JavaDoc 151 | # comments will behave just like regular Qt-style comments 152 | # (thus requiring an explicit @brief command for a brief description.) 153 | 154 | JAVADOC_AUTOBRIEF = NO 155 | 156 | # If the QT_AUTOBRIEF tag is set to YES then Doxygen will 157 | # interpret the first line (until the first dot) of a Qt-style 158 | # comment as the brief description. If set to NO, the comments 159 | # will behave just like regular Qt-style comments (thus requiring 160 | # an explicit \brief command for a brief description.) 161 | 162 | QT_AUTOBRIEF = NO 163 | 164 | # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 165 | # treat a multi-line C++ special comment block (i.e. a block of //! or /// 166 | # comments) as a brief description. This used to be the default behaviour. 167 | # The new default is to treat a multi-line C++ comment block as a detailed 168 | # description. Set this tag to YES if you prefer the old behaviour instead. 169 | 170 | MULTILINE_CPP_IS_BRIEF = NO 171 | 172 | # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 173 | # member inherits the documentation from any documented member that it 174 | # re-implements. 175 | 176 | INHERIT_DOCS = YES 177 | 178 | # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 179 | # a new page for each member. If set to NO, the documentation of a member will 180 | # be part of the file/class/namespace that contains it. 181 | 182 | SEPARATE_MEMBER_PAGES = NO 183 | 184 | # The TAB_SIZE tag can be used to set the number of spaces in a tab. 185 | # Doxygen uses this value to replace tabs by spaces in code fragments. 186 | 187 | TAB_SIZE = 8 188 | 189 | # This tag can be used to specify a number of aliases that acts 190 | # as commands in the documentation. An alias has the form "name=value". 191 | # For example adding "sideeffect=\par Side Effects:\n" will allow you to 192 | # put the command \sideeffect (or @sideeffect) in the documentation, which 193 | # will result in a user-defined paragraph with heading "Side Effects:". 194 | # You can put \n's in the value part of an alias to insert newlines. 195 | 196 | ALIASES = 197 | 198 | # This tag can be used to specify a number of word-keyword mappings (TCL only). 199 | # A mapping has the form "name=value". For example adding 200 | # "class=itcl::class" will allow you to use the command class in the 201 | # itcl::class meaning. 202 | 203 | TCL_SUBST = 204 | 205 | # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 206 | # sources only. Doxygen will then generate output that is more tailored for C. 207 | # For instance, some of the names that are used will be different. The list 208 | # of all members will be omitted, etc. 209 | 210 | OPTIMIZE_OUTPUT_FOR_C = NO 211 | 212 | # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 213 | # sources only. Doxygen will then generate output that is more tailored for 214 | # Java. For instance, namespaces will be presented as packages, qualified 215 | # scopes will look different, etc. 216 | 217 | OPTIMIZE_OUTPUT_JAVA = NO 218 | 219 | # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 220 | # sources only. Doxygen will then generate output that is more tailored for 221 | # Fortran. 222 | 223 | OPTIMIZE_FOR_FORTRAN = NO 224 | 225 | # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 226 | # sources. Doxygen will then generate output that is tailored for 227 | # VHDL. 228 | 229 | OPTIMIZE_OUTPUT_VHDL = NO 230 | 231 | # Doxygen selects the parser to use depending on the extension of the files it 232 | # parses. With this tag you can assign which parser to use for a given extension. 233 | # Doxygen has a built-in mapping, but you can override or extend it using this 234 | # tag. The format is ext=language, where ext is a file extension, and language 235 | # is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, 236 | # C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make 237 | # doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 238 | # (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions 239 | # you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. 240 | 241 | EXTENSION_MAPPING = 242 | 243 | # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all 244 | # comments according to the Markdown format, which allows for more readable 245 | # documentation. See http://daringfireball.net/projects/markdown/ for details. 246 | # The output of markdown processing is further processed by doxygen, so you 247 | # can mix doxygen, HTML, and XML commands with Markdown formatting. 248 | # Disable only in case of backward compatibilities issues. 249 | 250 | MARKDOWN_SUPPORT = YES 251 | 252 | # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 253 | # to include (a tag file for) the STL sources as input, then you should 254 | # set this tag to YES in order to let doxygen match functions declarations and 255 | # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 256 | # func(std::string) {}). This also makes the inheritance and collaboration 257 | # diagrams that involve STL classes more complete and accurate. 258 | 259 | BUILTIN_STL_SUPPORT = NO 260 | 261 | # If you use Microsoft's C++/CLI language, you should set this option to YES to 262 | # enable parsing support. 263 | 264 | CPP_CLI_SUPPORT = NO 265 | 266 | # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 267 | # Doxygen will parse them like normal C++ but will assume all classes use public 268 | # instead of private inheritance when no explicit protection keyword is present. 269 | 270 | SIP_SUPPORT = NO 271 | 272 | # For Microsoft's IDL there are propget and propput attributes to indicate getter 273 | # and setter methods for a property. Setting this option to YES (the default) 274 | # will make doxygen replace the get and set methods by a property in the 275 | # documentation. This will only work if the methods are indeed getting or 276 | # setting a simple type. If this is not the case, or you want to show the 277 | # methods anyway, you should set this option to NO. 278 | 279 | IDL_PROPERTY_SUPPORT = YES 280 | 281 | # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 282 | # tag is set to YES, then doxygen will reuse the documentation of the first 283 | # member in the group (if any) for the other members of the group. By default 284 | # all members of a group must be documented explicitly. 285 | 286 | DISTRIBUTE_GROUP_DOC = NO 287 | 288 | # Set the SUBGROUPING tag to YES (the default) to allow class member groups of 289 | # the same type (for instance a group of public functions) to be put as a 290 | # subgroup of that type (e.g. under the Public Functions section). Set it to 291 | # NO to prevent subgrouping. Alternatively, this can be done per class using 292 | # the \nosubgrouping command. 293 | 294 | SUBGROUPING = YES 295 | 296 | # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and 297 | # unions are shown inside the group in which they are included (e.g. using 298 | # @ingroup) instead of on a separate page (for HTML and Man pages) or 299 | # section (for LaTeX and RTF). 300 | 301 | INLINE_GROUPED_CLASSES = NO 302 | 303 | # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and 304 | # unions with only public data fields will be shown inline in the documentation 305 | # of the scope in which they are defined (i.e. file, namespace, or group 306 | # documentation), provided this scope is documented. If set to NO (the default), 307 | # structs, classes, and unions are shown on a separate page (for HTML and Man 308 | # pages) or section (for LaTeX and RTF). 309 | 310 | INLINE_SIMPLE_STRUCTS = NO 311 | 312 | # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 313 | # is documented as struct, union, or enum with the name of the typedef. So 314 | # typedef struct TypeS {} TypeT, will appear in the documentation as a struct 315 | # with name TypeT. When disabled the typedef will appear as a member of a file, 316 | # namespace, or class. And the struct will be named TypeS. This can typically 317 | # be useful for C code in case the coding convention dictates that all compound 318 | # types are typedef'ed and only the typedef is referenced, never the tag name. 319 | 320 | TYPEDEF_HIDES_STRUCT = NO 321 | 322 | # The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 323 | # determine which symbols to keep in memory and which to flush to disk. 324 | # When the cache is full, less often used symbols will be written to disk. 325 | # For small to medium size projects (<1000 input files) the default value is 326 | # probably good enough. For larger projects a too small cache size can cause 327 | # doxygen to be busy swapping symbols to and from disk most of the time 328 | # causing a significant performance penalty. 329 | # If the system has enough physical memory increasing the cache will improve the 330 | # performance by keeping more symbols in memory. Note that the value works on 331 | # a logarithmic scale so increasing the size by one will roughly double the 332 | # memory usage. The cache size is given by this formula: 333 | # 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 334 | # corresponding to a cache size of 2^16 = 65536 symbols. 335 | 336 | SYMBOL_CACHE_SIZE = 0 337 | 338 | # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be 339 | # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given 340 | # their name and scope. Since this can be an expensive process and often the 341 | # same symbol appear multiple times in the code, doxygen keeps a cache of 342 | # pre-resolved symbols. If the cache is too small doxygen will become slower. 343 | # If the cache is too large, memory is wasted. The cache size is given by this 344 | # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, 345 | # corresponding to a cache size of 2^16 = 65536 symbols. 346 | 347 | LOOKUP_CACHE_SIZE = 0 348 | 349 | #--------------------------------------------------------------------------- 350 | # Build related configuration options 351 | #--------------------------------------------------------------------------- 352 | 353 | # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 354 | # documentation are documented, even if no documentation was available. 355 | # Private class members and static file members will be hidden unless 356 | # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES 357 | 358 | EXTRACT_ALL = YES 359 | 360 | # If the EXTRACT_PRIVATE tag is set to YES all private members of a class 361 | # will be included in the documentation. 362 | 363 | EXTRACT_PRIVATE = NO 364 | 365 | # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation. 366 | 367 | EXTRACT_PACKAGE = NO 368 | 369 | # If the EXTRACT_STATIC tag is set to YES all static members of a file 370 | # will be included in the documentation. 371 | 372 | EXTRACT_STATIC = YES 373 | 374 | # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 375 | # defined locally in source files will be included in the documentation. 376 | # If set to NO only classes defined in header files are included. 377 | 378 | EXTRACT_LOCAL_CLASSES = YES 379 | 380 | # This flag is only useful for Objective-C code. When set to YES local 381 | # methods, which are defined in the implementation section but not in 382 | # the interface are included in the documentation. 383 | # If set to NO (the default) only methods in the interface are included. 384 | 385 | EXTRACT_LOCAL_METHODS = NO 386 | 387 | # If this flag is set to YES, the members of anonymous namespaces will be 388 | # extracted and appear in the documentation as a namespace called 389 | # 'anonymous_namespace{file}', where file will be replaced with the base 390 | # name of the file that contains the anonymous namespace. By default 391 | # anonymous namespaces are hidden. 392 | 393 | EXTRACT_ANON_NSPACES = NO 394 | 395 | # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 396 | # undocumented members of documented classes, files or namespaces. 397 | # If set to NO (the default) these members will be included in the 398 | # various overviews, but no documentation section is generated. 399 | # This option has no effect if EXTRACT_ALL is enabled. 400 | 401 | HIDE_UNDOC_MEMBERS = NO 402 | 403 | # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 404 | # undocumented classes that are normally visible in the class hierarchy. 405 | # If set to NO (the default) these classes will be included in the various 406 | # overviews. This option has no effect if EXTRACT_ALL is enabled. 407 | 408 | HIDE_UNDOC_CLASSES = NO 409 | 410 | # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 411 | # friend (class|struct|union) declarations. 412 | # If set to NO (the default) these declarations will be included in the 413 | # documentation. 414 | 415 | HIDE_FRIEND_COMPOUNDS = NO 416 | 417 | # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 418 | # documentation blocks found inside the body of a function. 419 | # If set to NO (the default) these blocks will be appended to the 420 | # function's detailed documentation block. 421 | 422 | HIDE_IN_BODY_DOCS = NO 423 | 424 | # The INTERNAL_DOCS tag determines if documentation 425 | # that is typed after a \internal command is included. If the tag is set 426 | # to NO (the default) then the documentation will be excluded. 427 | # Set it to YES to include the internal documentation. 428 | 429 | INTERNAL_DOCS = NO 430 | 431 | # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 432 | # file names in lower-case letters. If set to YES upper-case letters are also 433 | # allowed. This is useful if you have classes or files whose names only differ 434 | # in case and if your file system supports case sensitive file names. Windows 435 | # and Mac users are advised to set this option to NO. 436 | 437 | CASE_SENSE_NAMES = YES 438 | 439 | # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 440 | # will show members with their full class and namespace scopes in the 441 | # documentation. If set to YES the scope will be hidden. 442 | 443 | HIDE_SCOPE_NAMES = NO 444 | 445 | # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 446 | # will put a list of the files that are included by a file in the documentation 447 | # of that file. 448 | 449 | SHOW_INCLUDE_FILES = YES 450 | 451 | # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 452 | # will list include files with double quotes in the documentation 453 | # rather than with sharp brackets. 454 | 455 | FORCE_LOCAL_INCLUDES = NO 456 | 457 | # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 458 | # is inserted in the documentation for inline members. 459 | 460 | INLINE_INFO = YES 461 | 462 | # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 463 | # will sort the (detailed) documentation of file and class members 464 | # alphabetically by member name. If set to NO the members will appear in 465 | # declaration order. 466 | 467 | SORT_MEMBER_DOCS = YES 468 | 469 | # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 470 | # brief documentation of file, namespace and class members alphabetically 471 | # by member name. If set to NO (the default) the members will appear in 472 | # declaration order. 473 | 474 | SORT_BRIEF_DOCS = YES 475 | 476 | # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 477 | # will sort the (brief and detailed) documentation of class members so that 478 | # constructors and destructors are listed first. If set to NO (the default) 479 | # the constructors will appear in the respective orders defined by 480 | # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 481 | # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 482 | # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. 483 | 484 | SORT_MEMBERS_CTORS_1ST = YES 485 | 486 | # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 487 | # hierarchy of group names into alphabetical order. If set to NO (the default) 488 | # the group names will appear in their defined order. 489 | 490 | SORT_GROUP_NAMES = YES 491 | 492 | # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 493 | # sorted by fully-qualified names, including namespaces. If set to 494 | # NO (the default), the class list will be sorted only by class name, 495 | # not including the namespace part. 496 | # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 497 | # Note: This option applies only to the class list, not to the 498 | # alphabetical list. 499 | 500 | SORT_BY_SCOPE_NAME = YES 501 | 502 | # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to 503 | # do proper type resolution of all parameters of a function it will reject a 504 | # match between the prototype and the implementation of a member function even 505 | # if there is only one candidate or it is obvious which candidate to choose 506 | # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen 507 | # will still accept a match between prototype and implementation in such cases. 508 | 509 | STRICT_PROTO_MATCHING = NO 510 | 511 | # The GENERATE_TODOLIST tag can be used to enable (YES) or 512 | # disable (NO) the todo list. This list is created by putting \todo 513 | # commands in the documentation. 514 | 515 | GENERATE_TODOLIST = YES 516 | 517 | # The GENERATE_TESTLIST tag can be used to enable (YES) or 518 | # disable (NO) the test list. This list is created by putting \test 519 | # commands in the documentation. 520 | 521 | GENERATE_TESTLIST = YES 522 | 523 | # The GENERATE_BUGLIST tag can be used to enable (YES) or 524 | # disable (NO) the bug list. This list is created by putting \bug 525 | # commands in the documentation. 526 | 527 | GENERATE_BUGLIST = YES 528 | 529 | # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 530 | # disable (NO) the deprecated list. This list is created by putting 531 | # \deprecated commands in the documentation. 532 | 533 | GENERATE_DEPRECATEDLIST= YES 534 | 535 | # The ENABLED_SECTIONS tag can be used to enable conditional 536 | # documentation sections, marked by \if sectionname ... \endif. 537 | 538 | ENABLED_SECTIONS = 539 | 540 | # The MAX_INITIALIZER_LINES tag determines the maximum number of lines 541 | # the initial value of a variable or macro consists of for it to appear in 542 | # the documentation. If the initializer consists of more lines than specified 543 | # here it will be hidden. Use a value of 0 to hide initializers completely. 544 | # The appearance of the initializer of individual variables and macros in the 545 | # documentation can be controlled using \showinitializer or \hideinitializer 546 | # command in the documentation regardless of this setting. 547 | 548 | MAX_INITIALIZER_LINES = 30 549 | 550 | # Set the SHOW_USED_FILES tag to NO to disable the list of files generated 551 | # at the bottom of the documentation of classes and structs. If set to YES the 552 | # list will mention the files that were used to generate the documentation. 553 | 554 | SHOW_USED_FILES = YES 555 | 556 | # Set the SHOW_FILES tag to NO to disable the generation of the Files page. 557 | # This will remove the Files entry from the Quick Index and from the 558 | # Folder Tree View (if specified). The default is YES. 559 | 560 | SHOW_FILES = YES 561 | 562 | # Set the SHOW_NAMESPACES tag to NO to disable the generation of the 563 | # Namespaces page. 564 | # This will remove the Namespaces entry from the Quick Index 565 | # and from the Folder Tree View (if specified). The default is YES. 566 | 567 | SHOW_NAMESPACES = YES 568 | 569 | # The FILE_VERSION_FILTER tag can be used to specify a program or script that 570 | # doxygen should invoke to get the current version for each file (typically from 571 | # the version control system). Doxygen will invoke the program by executing (via 572 | # popen()) the command , where is the value of 573 | # the FILE_VERSION_FILTER tag, and is the name of an input file 574 | # provided by doxygen. Whatever the program writes to standard output 575 | # is used as the file version. See the manual for examples. 576 | 577 | FILE_VERSION_FILTER = 578 | 579 | # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 580 | # by doxygen. The layout file controls the global structure of the generated 581 | # output files in an output format independent way. To create the layout file 582 | # that represents doxygen's defaults, run doxygen with the -l option. 583 | # You can optionally specify a file name after the option, if omitted 584 | # DoxygenLayout.xml will be used as the name of the layout file. 585 | 586 | LAYOUT_FILE = 587 | 588 | # The CITE_BIB_FILES tag can be used to specify one or more bib files 589 | # containing the references data. This must be a list of .bib files. The 590 | # .bib extension is automatically appended if omitted. Using this command 591 | # requires the bibtex tool to be installed. See also 592 | # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style 593 | # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this 594 | # feature you need bibtex and perl available in the search path. 595 | 596 | CITE_BIB_FILES = 597 | 598 | #--------------------------------------------------------------------------- 599 | # configuration options related to warning and progress messages 600 | #--------------------------------------------------------------------------- 601 | 602 | # The QUIET tag can be used to turn on/off the messages that are generated 603 | # by doxygen. Possible values are YES and NO. If left blank NO is used. 604 | 605 | QUIET = NO 606 | 607 | # The WARNINGS tag can be used to turn on/off the warning messages that are 608 | # generated by doxygen. Possible values are YES and NO. If left blank 609 | # NO is used. 610 | 611 | WARNINGS = YES 612 | 613 | # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 614 | # for undocumented members. If EXTRACT_ALL is set to YES then this flag will 615 | # automatically be disabled. 616 | 617 | WARN_IF_UNDOCUMENTED = YES 618 | 619 | # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 620 | # potential errors in the documentation, such as not documenting some 621 | # parameters in a documented function, or documenting parameters that 622 | # don't exist or using markup commands wrongly. 623 | 624 | WARN_IF_DOC_ERROR = YES 625 | 626 | # The WARN_NO_PARAMDOC option can be enabled to get warnings for 627 | # functions that are documented, but have no documentation for their parameters 628 | # or return value. If set to NO (the default) doxygen will only warn about 629 | # wrong or incomplete parameter documentation, but not about the absence of 630 | # documentation. 631 | 632 | WARN_NO_PARAMDOC = NO 633 | 634 | # The WARN_FORMAT tag determines the format of the warning messages that 635 | # doxygen can produce. The string should contain the $file, $line, and $text 636 | # tags, which will be replaced by the file and line number from which the 637 | # warning originated and the warning text. Optionally the format may contain 638 | # $version, which will be replaced by the version of the file (if it could 639 | # be obtained via FILE_VERSION_FILTER) 640 | 641 | WARN_FORMAT = "$file:$line: $text" 642 | 643 | # The WARN_LOGFILE tag can be used to specify a file to which warning 644 | # and error messages should be written. If left blank the output is written 645 | # to stderr. 646 | 647 | WARN_LOGFILE = 648 | 649 | #--------------------------------------------------------------------------- 650 | # configuration options related to the input files 651 | #--------------------------------------------------------------------------- 652 | 653 | # The INPUT tag can be used to specify the files and/or directories that contain 654 | # documented source files. You may enter file names like "myfile.cpp" or 655 | # directories like "/usr/src/myproject". Separate the files or directories 656 | # with spaces. 657 | 658 | INPUT = ${CMAKE_CURRENT_SOURCE_DIR} \ 659 | ${PROJECT_SOURCE_ROOT}/include/NatNetLinux 660 | 661 | # This tag can be used to specify the character encoding of the source files 662 | # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 663 | # also the default input encoding. Doxygen uses libiconv (or the iconv built 664 | # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 665 | # the list of possible encodings. 666 | 667 | INPUT_ENCODING = UTF-8 668 | 669 | # If the value of the INPUT tag contains directories, you can use the 670 | # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 671 | # and *.h) to filter out the source-files in the directories. If left 672 | # blank the following patterns are tested: 673 | # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh 674 | # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py 675 | # *.f90 *.f *.for *.vhd *.vhdl 676 | 677 | FILE_PATTERNS = *.cpp \ 678 | *.h \ 679 | *.dox 680 | 681 | # The RECURSIVE tag can be used to turn specify whether or not subdirectories 682 | # should be searched for input files as well. Possible values are YES and NO. 683 | # If left blank NO is used. 684 | 685 | RECURSIVE = NO 686 | 687 | # The EXCLUDE tag can be used to specify files and/or directories that should be 688 | # excluded from the INPUT source files. This way you can easily exclude a 689 | # subdirectory from a directory tree whose root is specified with the INPUT tag. 690 | # Note that relative paths are relative to the directory from which doxygen is 691 | # run. 692 | 693 | EXCLUDE = 694 | 695 | # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 696 | # directories that are symbolic links (a Unix file system feature) are excluded 697 | # from the input. 698 | 699 | EXCLUDE_SYMLINKS = NO 700 | 701 | # If the value of the INPUT tag contains directories, you can use the 702 | # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 703 | # certain files from those directories. Note that the wildcards are matched 704 | # against the file with absolute path, so to exclude all test directories 705 | # for example use the pattern */test/* 706 | 707 | EXCLUDE_PATTERNS = 708 | 709 | # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 710 | # (namespaces, classes, functions, etc.) that should be excluded from the 711 | # output. The symbol name can be a fully qualified name, a word, or if the 712 | # wildcard * is used, a substring. Examples: ANamespace, AClass, 713 | # AClass::ANamespace, ANamespace::*Test 714 | 715 | EXCLUDE_SYMBOLS = cv 716 | 717 | # The EXAMPLE_PATH tag can be used to specify one or more files or 718 | # directories that contain example code fragments that are included (see 719 | # the \include command). 720 | 721 | EXAMPLE_PATH = 722 | 723 | # If the value of the EXAMPLE_PATH tag contains directories, you can use the 724 | # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 725 | # and *.h) to filter out the source-files in the directories. If left 726 | # blank all files are included. 727 | 728 | EXAMPLE_PATTERNS = 729 | 730 | # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 731 | # searched for input files to be used with the \include or \dontinclude 732 | # commands irrespective of the value of the RECURSIVE tag. 733 | # Possible values are YES and NO. If left blank NO is used. 734 | 735 | EXAMPLE_RECURSIVE = NO 736 | 737 | # The IMAGE_PATH tag can be used to specify one or more files or 738 | # directories that contain image that are included in the documentation (see 739 | # the \image command). 740 | 741 | IMAGE_PATH = ${CMAKE_CURRENT_SOURCE_DIR}/images 742 | 743 | # The INPUT_FILTER tag can be used to specify a program that doxygen should 744 | # invoke to filter for each input file. Doxygen will invoke the filter program 745 | # by executing (via popen()) the command , where 746 | # is the value of the INPUT_FILTER tag, and is the name of an 747 | # input file. Doxygen will then use the output that the filter program writes 748 | # to standard output. 749 | # If FILTER_PATTERNS is specified, this tag will be 750 | # ignored. 751 | 752 | INPUT_FILTER = 753 | 754 | # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 755 | # basis. 756 | # Doxygen will compare the file name with each pattern and apply the 757 | # filter if there is a match. 758 | # The filters are a list of the form: 759 | # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 760 | # info on how filters are used. If FILTER_PATTERNS is empty or if 761 | # non of the patterns match the file name, INPUT_FILTER is applied. 762 | 763 | FILTER_PATTERNS = 764 | 765 | # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 766 | # INPUT_FILTER) will be used to filter the input files when producing source 767 | # files to browse (i.e. when SOURCE_BROWSER is set to YES). 768 | 769 | FILTER_SOURCE_FILES = NO 770 | 771 | # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 772 | # pattern. A pattern will override the setting for FILTER_PATTERN (if any) 773 | # and it is also possible to disable source filtering for a specific pattern 774 | # using *.ext= (so without naming a filter). This option only has effect when 775 | # FILTER_SOURCE_FILES is enabled. 776 | 777 | FILTER_SOURCE_PATTERNS = 778 | 779 | #--------------------------------------------------------------------------- 780 | # configuration options related to source browsing 781 | #--------------------------------------------------------------------------- 782 | 783 | # If the SOURCE_BROWSER tag is set to YES then a list of source files will 784 | # be generated. Documented entities will be cross-referenced with these sources. 785 | # Note: To get rid of all source code in the generated output, make sure also 786 | # VERBATIM_HEADERS is set to NO. 787 | 788 | SOURCE_BROWSER = NO 789 | 790 | # Setting the INLINE_SOURCES tag to YES will include the body 791 | # of functions and classes directly in the documentation. 792 | 793 | INLINE_SOURCES = NO 794 | 795 | # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 796 | # doxygen to hide any special comment blocks from generated source code 797 | # fragments. Normal C, C++ and Fortran comments will always remain visible. 798 | 799 | STRIP_CODE_COMMENTS = YES 800 | 801 | # If the REFERENCED_BY_RELATION tag is set to YES 802 | # then for each documented function all documented 803 | # functions referencing it will be listed. 804 | 805 | REFERENCED_BY_RELATION = NO 806 | 807 | # If the REFERENCES_RELATION tag is set to YES 808 | # then for each documented function all documented entities 809 | # called/used by that function will be listed. 810 | 811 | REFERENCES_RELATION = NO 812 | 813 | # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 814 | # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 815 | # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 816 | # link to the source code. 817 | # Otherwise they will link to the documentation. 818 | 819 | REFERENCES_LINK_SOURCE = YES 820 | 821 | # If the USE_HTAGS tag is set to YES then the references to source code 822 | # will point to the HTML generated by the htags(1) tool instead of doxygen 823 | # built-in source browser. The htags tool is part of GNU's global source 824 | # tagging system (see http://www.gnu.org/software/global/global.html). You 825 | # will need version 4.8.6 or higher. 826 | 827 | USE_HTAGS = NO 828 | 829 | # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 830 | # will generate a verbatim copy of the header file for each class for 831 | # which an include is specified. Set to NO to disable this. 832 | 833 | VERBATIM_HEADERS = YES 834 | 835 | #--------------------------------------------------------------------------- 836 | # configuration options related to the alphabetical class index 837 | #--------------------------------------------------------------------------- 838 | 839 | # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 840 | # of all compounds will be generated. Enable this if the project 841 | # contains a lot of classes, structs, unions or interfaces. 842 | 843 | ALPHABETICAL_INDEX = NO 844 | 845 | # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 846 | # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 847 | # in which this list will be split (can be a number in the range [1..20]) 848 | 849 | COLS_IN_ALPHA_INDEX = 5 850 | 851 | # In case all classes in a project start with a common prefix, all 852 | # classes will be put under the same header in the alphabetical index. 853 | # The IGNORE_PREFIX tag can be used to specify one or more prefixes that 854 | # should be ignored while generating the index headers. 855 | 856 | IGNORE_PREFIX = 857 | 858 | #--------------------------------------------------------------------------- 859 | # configuration options related to the HTML output 860 | #--------------------------------------------------------------------------- 861 | 862 | # If the GENERATE_HTML tag is set to YES (the default) Doxygen will 863 | # generate HTML output. 864 | 865 | GENERATE_HTML = YES 866 | 867 | # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 868 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 869 | # put in front of it. If left blank `html' will be used as the default path. 870 | 871 | HTML_OUTPUT = html 872 | 873 | # The HTML_FILE_EXTENSION tag can be used to specify the file extension for 874 | # each generated HTML page (for example: .htm,.php,.asp). If it is left blank 875 | # doxygen will generate files with .html extension. 876 | 877 | HTML_FILE_EXTENSION = .html 878 | 879 | # The HTML_HEADER tag can be used to specify a personal HTML header for 880 | # each generated HTML page. If it is left blank doxygen will generate a 881 | # standard header. Note that when using a custom header you are responsible 882 | # for the proper inclusion of any scripts and style sheets that doxygen 883 | # needs, which is dependent on the configuration options used. 884 | # It is advised to generate a default header using "doxygen -w html 885 | # header.html footer.html stylesheet.css YourConfigFile" and then modify 886 | # that header. Note that the header is subject to change so you typically 887 | # have to redo this when upgrading to a newer version of doxygen or when 888 | # changing the value of configuration settings such as GENERATE_TREEVIEW! 889 | 890 | HTML_HEADER = 891 | 892 | # The HTML_FOOTER tag can be used to specify a personal HTML footer for 893 | # each generated HTML page. If it is left blank doxygen will generate a 894 | # standard footer. 895 | 896 | HTML_FOOTER = 897 | 898 | # The HTML_STYLESHEET tag can be used to specify a user-defined cascading 899 | # style sheet that is used by each HTML page. It can be used to 900 | # fine-tune the look of the HTML output. If the tag is left blank doxygen 901 | # will generate a default style sheet. Note that doxygen will try to copy 902 | # the style sheet file to the HTML output directory, so don't put your own 903 | # style sheet in the HTML output directory as well, or it will be erased! 904 | 905 | HTML_STYLESHEET = 906 | 907 | # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 908 | # other source files which should be copied to the HTML output directory. Note 909 | # that these files will be copied to the base HTML output directory. Use the 910 | # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 911 | # files. In the HTML_STYLESHEET file, use the file name only. Also note that 912 | # the files will be copied as-is; there are no commands or markers available. 913 | 914 | HTML_EXTRA_FILES = 915 | 916 | # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 917 | # Doxygen will adjust the colors in the style sheet and background images 918 | # according to this color. Hue is specified as an angle on a colorwheel, 919 | # see http://en.wikipedia.org/wiki/Hue for more information. 920 | # For instance the value 0 represents red, 60 is yellow, 120 is green, 921 | # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 922 | # The allowed range is 0 to 359. 923 | 924 | HTML_COLORSTYLE_HUE = 220 925 | 926 | # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 927 | # the colors in the HTML output. For a value of 0 the output will use 928 | # grayscales only. A value of 255 will produce the most vivid colors. 929 | 930 | HTML_COLORSTYLE_SAT = 100 931 | 932 | # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 933 | # the luminance component of the colors in the HTML output. Values below 934 | # 100 gradually make the output lighter, whereas values above 100 make 935 | # the output darker. The value divided by 100 is the actual gamma applied, 936 | # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 937 | # and 100 does not change the gamma. 938 | 939 | HTML_COLORSTYLE_GAMMA = 80 940 | 941 | # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 942 | # page will contain the date and time when the page was generated. Setting 943 | # this to NO can help when comparing the output of multiple runs. 944 | 945 | HTML_TIMESTAMP = YES 946 | 947 | # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 948 | # documentation will contain sections that can be hidden and shown after the 949 | # page has loaded. 950 | 951 | HTML_DYNAMIC_SECTIONS = YES 952 | 953 | # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of 954 | # entries shown in the various tree structured indices initially; the user 955 | # can expand and collapse entries dynamically later on. Doxygen will expand 956 | # the tree to such a level that at most the specified number of entries are 957 | # visible (unless a fully collapsed tree already exceeds this amount). 958 | # So setting the number of entries 1 will produce a full collapsed tree by 959 | # default. 0 is a special value representing an infinite number of entries 960 | # and will result in a full expanded tree by default. 961 | 962 | HTML_INDEX_NUM_ENTRIES = 100 963 | 964 | # If the GENERATE_DOCSET tag is set to YES, additional index files 965 | # will be generated that can be used as input for Apple's Xcode 3 966 | # integrated development environment, introduced with OSX 10.5 (Leopard). 967 | # To create a documentation set, doxygen will generate a Makefile in the 968 | # HTML output directory. Running make will produce the docset in that 969 | # directory and running "make install" will install the docset in 970 | # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 971 | # it at startup. 972 | # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 973 | # for more information. 974 | 975 | GENERATE_DOCSET = ${GENERATE_DOCSET} 976 | 977 | # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 978 | # feed. A documentation feed provides an umbrella under which multiple 979 | # documentation sets from a single provider (such as a company or product suite) 980 | # can be grouped. 981 | 982 | DOCSET_FEEDNAME = "Pixci-OpenCV Documentation Set" 983 | 984 | # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 985 | # should uniquely identify the documentation set bundle. This should be a 986 | # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 987 | # will append .docset to the name. 988 | 989 | DOCSET_BUNDLE_ID = Pixci-OpenCV 990 | 991 | # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify 992 | # the documentation publisher. This should be a reverse domain-name style 993 | # string, e.g. com.mycompany.MyDocSet.documentation. 994 | 995 | DOCSET_PUBLISHER_ID = org.doxygen.Publisher 996 | 997 | # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. 998 | 999 | DOCSET_PUBLISHER_NAME = Publisher 1000 | 1001 | # If the GENERATE_HTMLHELP tag is set to YES, additional index files 1002 | # will be generated that can be used as input for tools like the 1003 | # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 1004 | # of the generated HTML documentation. 1005 | 1006 | GENERATE_HTMLHELP = NO 1007 | 1008 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 1009 | # be used to specify the file name of the resulting .chm file. You 1010 | # can add a path in front of the file if the result should not be 1011 | # written to the html output directory. 1012 | 1013 | CHM_FILE = 1014 | 1015 | # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 1016 | # be used to specify the location (absolute path including file name) of 1017 | # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 1018 | # the HTML help compiler on the generated index.hhp. 1019 | 1020 | HHC_LOCATION = 1021 | 1022 | # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 1023 | # controls if a separate .chi index file is generated (YES) or that 1024 | # it should be included in the master .chm file (NO). 1025 | 1026 | GENERATE_CHI = NO 1027 | 1028 | # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 1029 | # is used to encode HtmlHelp index (hhk), content (hhc) and project file 1030 | # content. 1031 | 1032 | CHM_INDEX_ENCODING = 1033 | 1034 | # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 1035 | # controls whether a binary table of contents is generated (YES) or a 1036 | # normal table of contents (NO) in the .chm file. 1037 | 1038 | BINARY_TOC = NO 1039 | 1040 | # The TOC_EXPAND flag can be set to YES to add extra items for group members 1041 | # to the contents of the HTML help documentation and to the tree view. 1042 | 1043 | TOC_EXPAND = NO 1044 | 1045 | # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 1046 | # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 1047 | # that can be used as input for Qt's qhelpgenerator to generate a 1048 | # Qt Compressed Help (.qch) of the generated HTML documentation. 1049 | 1050 | GENERATE_QHP = NO 1051 | 1052 | # If the QHG_LOCATION tag is specified, the QCH_FILE tag can 1053 | # be used to specify the file name of the resulting .qch file. 1054 | # The path specified is relative to the HTML output folder. 1055 | 1056 | QCH_FILE = 1057 | 1058 | # The QHP_NAMESPACE tag specifies the namespace to use when generating 1059 | # Qt Help Project output. For more information please see 1060 | # http://doc.trolltech.com/qthelpproject.html#namespace 1061 | 1062 | QHP_NAMESPACE = org.doxygen.Project 1063 | 1064 | # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 1065 | # Qt Help Project output. For more information please see 1066 | # http://doc.trolltech.com/qthelpproject.html#virtual-folders 1067 | 1068 | QHP_VIRTUAL_FOLDER = doc 1069 | 1070 | # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 1071 | # add. For more information please see 1072 | # http://doc.trolltech.com/qthelpproject.html#custom-filters 1073 | 1074 | QHP_CUST_FILTER_NAME = 1075 | 1076 | # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 1077 | # custom filter to add. For more information please see 1078 | # 1079 | # Qt Help Project / Custom Filters. 1080 | 1081 | QHP_CUST_FILTER_ATTRS = 1082 | 1083 | # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 1084 | # project's 1085 | # filter section matches. 1086 | # 1087 | # Qt Help Project / Filter Attributes. 1088 | 1089 | QHP_SECT_FILTER_ATTRS = 1090 | 1091 | # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 1092 | # be used to specify the location of Qt's qhelpgenerator. 1093 | # If non-empty doxygen will try to run qhelpgenerator on the generated 1094 | # .qhp file. 1095 | 1096 | QHG_LOCATION = 1097 | 1098 | # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files 1099 | # will be generated, which together with the HTML files, form an Eclipse help 1100 | # plugin. To install this plugin and make it available under the help contents 1101 | # menu in Eclipse, the contents of the directory containing the HTML and XML 1102 | # files needs to be copied into the plugins directory of eclipse. The name of 1103 | # the directory within the plugins directory should be the same as 1104 | # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 1105 | # the help appears. 1106 | 1107 | GENERATE_ECLIPSEHELP = NO 1108 | 1109 | # A unique identifier for the eclipse help plugin. When installing the plugin 1110 | # the directory name containing the HTML and XML files should also have 1111 | # this name. 1112 | 1113 | ECLIPSE_DOC_ID = org.doxygen.Project 1114 | 1115 | # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) 1116 | # at top of each HTML page. The value NO (the default) enables the index and 1117 | # the value YES disables it. Since the tabs have the same information as the 1118 | # navigation tree you can set this option to NO if you already set 1119 | # GENERATE_TREEVIEW to YES. 1120 | 1121 | DISABLE_INDEX = NO 1122 | 1123 | # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 1124 | # structure should be generated to display hierarchical information. 1125 | # If the tag value is set to YES, a side panel will be generated 1126 | # containing a tree-like index structure (just like the one that 1127 | # is generated for HTML Help). For this to work a browser that supports 1128 | # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 1129 | # Windows users are probably better off using the HTML help feature. 1130 | # Since the tree basically has the same information as the tab index you 1131 | # could consider to set DISABLE_INDEX to NO when enabling this option. 1132 | 1133 | GENERATE_TREEVIEW = NO 1134 | 1135 | # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 1136 | # (range [0,1..20]) that doxygen will group on one line in the generated HTML 1137 | # documentation. Note that a value of 0 will completely suppress the enum 1138 | # values from appearing in the overview section. 1139 | 1140 | ENUM_VALUES_PER_LINE = 4 1141 | 1142 | # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 1143 | # used to set the initial width (in pixels) of the frame in which the tree 1144 | # is shown. 1145 | 1146 | TREEVIEW_WIDTH = 250 1147 | 1148 | # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 1149 | # links to external symbols imported via tag files in a separate window. 1150 | 1151 | EXT_LINKS_IN_WINDOW = NO 1152 | 1153 | # Use this tag to change the font size of Latex formulas included 1154 | # as images in the HTML documentation. The default is 10. Note that 1155 | # when you change the font size after a successful doxygen run you need 1156 | # to manually remove any form_*.png images from the HTML output directory 1157 | # to force them to be regenerated. 1158 | 1159 | FORMULA_FONTSIZE = 10 1160 | 1161 | # Use the FORMULA_TRANPARENT tag to determine whether or not the images 1162 | # generated for formulas are transparent PNGs. Transparent PNGs are 1163 | # not supported properly for IE 6.0, but are supported on all modern browsers. 1164 | # Note that when changing this option you need to delete any form_*.png files 1165 | # in the HTML output before the changes have effect. 1166 | 1167 | FORMULA_TRANSPARENT = YES 1168 | 1169 | # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax 1170 | # (see http://www.mathjax.org) which uses client side Javascript for the 1171 | # rendering instead of using prerendered bitmaps. Use this if you do not 1172 | # have LaTeX installed or if you want to formulas look prettier in the HTML 1173 | # output. When enabled you may also need to install MathJax separately and 1174 | # configure the path to it using the MATHJAX_RELPATH option. 1175 | 1176 | USE_MATHJAX = NO 1177 | 1178 | # When MathJax is enabled you need to specify the location relative to the 1179 | # HTML output directory using the MATHJAX_RELPATH option. The destination 1180 | # directory should contain the MathJax.js script. For instance, if the mathjax 1181 | # directory is located at the same level as the HTML output directory, then 1182 | # MATHJAX_RELPATH should be ../mathjax. The default value points to 1183 | # the MathJax Content Delivery Network so you can quickly see the result without 1184 | # installing MathJax. 1185 | # However, it is strongly recommended to install a local 1186 | # copy of MathJax from http://www.mathjax.org before deployment. 1187 | 1188 | MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest 1189 | 1190 | # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension 1191 | # names that should be enabled during MathJax rendering. 1192 | 1193 | MATHJAX_EXTENSIONS = 1194 | 1195 | # When the SEARCHENGINE tag is enabled doxygen will generate a search box 1196 | # for the HTML output. The underlying search engine uses javascript 1197 | # and DHTML and should work on any modern browser. Note that when using 1198 | # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 1199 | # (GENERATE_DOCSET) there is already a search function so this one should 1200 | # typically be disabled. For large projects the javascript based search engine 1201 | # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. 1202 | 1203 | SEARCHENGINE = YES 1204 | 1205 | # When the SERVER_BASED_SEARCH tag is enabled the search engine will be 1206 | # implemented using a PHP enabled web server instead of at the web client 1207 | # using Javascript. Doxygen will generate the search PHP script and index 1208 | # file to put on the web server. The advantage of the server 1209 | # based approach is that it scales better to large projects and allows 1210 | # full text search. The disadvantages are that it is more difficult to setup 1211 | # and does not have live searching capabilities. 1212 | 1213 | SERVER_BASED_SEARCH = NO 1214 | 1215 | #--------------------------------------------------------------------------- 1216 | # configuration options related to the LaTeX output 1217 | #--------------------------------------------------------------------------- 1218 | 1219 | # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 1220 | # generate Latex output. 1221 | 1222 | GENERATE_LATEX = NO 1223 | 1224 | # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 1225 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1226 | # put in front of it. If left blank `latex' will be used as the default path. 1227 | 1228 | LATEX_OUTPUT = latex 1229 | 1230 | # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 1231 | # invoked. If left blank `latex' will be used as the default command name. 1232 | # Note that when enabling USE_PDFLATEX this option is only used for 1233 | # generating bitmaps for formulas in the HTML output, but not in the 1234 | # Makefile that is written to the output directory. 1235 | 1236 | LATEX_CMD_NAME = latex 1237 | 1238 | # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 1239 | # generate index for LaTeX. If left blank `makeindex' will be used as the 1240 | # default command name. 1241 | 1242 | MAKEINDEX_CMD_NAME = makeindex 1243 | 1244 | # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 1245 | # LaTeX documents. This may be useful for small projects and may help to 1246 | # save some trees in general. 1247 | 1248 | COMPACT_LATEX = NO 1249 | 1250 | # The PAPER_TYPE tag can be used to set the paper type that is used 1251 | # by the printer. Possible values are: a4, letter, legal and 1252 | # executive. If left blank a4wide will be used. 1253 | 1254 | PAPER_TYPE = a4wide 1255 | 1256 | # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 1257 | # packages that should be included in the LaTeX output. 1258 | 1259 | EXTRA_PACKAGES = 1260 | 1261 | # The LATEX_HEADER tag can be used to specify a personal LaTeX header for 1262 | # the generated latex document. The header should contain everything until 1263 | # the first chapter. If it is left blank doxygen will generate a 1264 | # standard header. Notice: only use this tag if you know what you are doing! 1265 | 1266 | LATEX_HEADER = 1267 | 1268 | # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for 1269 | # the generated latex document. The footer should contain everything after 1270 | # the last chapter. If it is left blank doxygen will generate a 1271 | # standard footer. Notice: only use this tag if you know what you are doing! 1272 | 1273 | LATEX_FOOTER = 1274 | 1275 | # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 1276 | # is prepared for conversion to pdf (using ps2pdf). The pdf file will 1277 | # contain links (just like the HTML output) instead of page references 1278 | # This makes the output suitable for online browsing using a pdf viewer. 1279 | 1280 | PDF_HYPERLINKS = YES 1281 | 1282 | # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 1283 | # plain latex in the generated Makefile. Set this option to YES to get a 1284 | # higher quality PDF documentation. 1285 | 1286 | USE_PDFLATEX = YES 1287 | 1288 | # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 1289 | # command to the generated LaTeX files. This will instruct LaTeX to keep 1290 | # running if errors occur, instead of asking the user for help. 1291 | # This option is also used when generating formulas in HTML. 1292 | 1293 | LATEX_BATCHMODE = NO 1294 | 1295 | # If LATEX_HIDE_INDICES is set to YES then doxygen will not 1296 | # include the index chapters (such as File Index, Compound Index, etc.) 1297 | # in the output. 1298 | 1299 | LATEX_HIDE_INDICES = NO 1300 | 1301 | # If LATEX_SOURCE_CODE is set to YES then doxygen will include 1302 | # source code with syntax highlighting in the LaTeX output. 1303 | # Note that which sources are shown also depends on other settings 1304 | # such as SOURCE_BROWSER. 1305 | 1306 | LATEX_SOURCE_CODE = NO 1307 | 1308 | # The LATEX_BIB_STYLE tag can be used to specify the style to use for the 1309 | # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See 1310 | # http://en.wikipedia.org/wiki/BibTeX for more info. 1311 | 1312 | LATEX_BIB_STYLE = plain 1313 | 1314 | #--------------------------------------------------------------------------- 1315 | # configuration options related to the RTF output 1316 | #--------------------------------------------------------------------------- 1317 | 1318 | # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 1319 | # The RTF output is optimized for Word 97 and may not look very pretty with 1320 | # other RTF readers or editors. 1321 | 1322 | GENERATE_RTF = NO 1323 | 1324 | # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 1325 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1326 | # put in front of it. If left blank `rtf' will be used as the default path. 1327 | 1328 | RTF_OUTPUT = rtf 1329 | 1330 | # If the COMPACT_RTF tag is set to YES Doxygen generates more compact 1331 | # RTF documents. This may be useful for small projects and may help to 1332 | # save some trees in general. 1333 | 1334 | COMPACT_RTF = NO 1335 | 1336 | # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 1337 | # will contain hyperlink fields. The RTF file will 1338 | # contain links (just like the HTML output) instead of page references. 1339 | # This makes the output suitable for online browsing using WORD or other 1340 | # programs which support those fields. 1341 | # Note: wordpad (write) and others do not support links. 1342 | 1343 | RTF_HYPERLINKS = NO 1344 | 1345 | # Load style sheet definitions from file. Syntax is similar to doxygen's 1346 | # config file, i.e. a series of assignments. You only have to provide 1347 | # replacements, missing definitions are set to their default value. 1348 | 1349 | RTF_STYLESHEET_FILE = 1350 | 1351 | # Set optional variables used in the generation of an rtf document. 1352 | # Syntax is similar to doxygen's config file. 1353 | 1354 | RTF_EXTENSIONS_FILE = 1355 | 1356 | #--------------------------------------------------------------------------- 1357 | # configuration options related to the man page output 1358 | #--------------------------------------------------------------------------- 1359 | 1360 | # If the GENERATE_MAN tag is set to YES (the default) Doxygen will 1361 | # generate man pages 1362 | 1363 | GENERATE_MAN = NO 1364 | 1365 | # The MAN_OUTPUT tag is used to specify where the man pages will be put. 1366 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1367 | # put in front of it. If left blank `man' will be used as the default path. 1368 | 1369 | MAN_OUTPUT = man 1370 | 1371 | # The MAN_EXTENSION tag determines the extension that is added to 1372 | # the generated man pages (default is the subroutine's section .3) 1373 | 1374 | MAN_EXTENSION = .3 1375 | 1376 | # If the MAN_LINKS tag is set to YES and Doxygen generates man output, 1377 | # then it will generate one additional man file for each entity 1378 | # documented in the real man page(s). These additional files 1379 | # only source the real man page, but without them the man command 1380 | # would be unable to find the correct page. The default is NO. 1381 | 1382 | MAN_LINKS = NO 1383 | 1384 | #--------------------------------------------------------------------------- 1385 | # configuration options related to the XML output 1386 | #--------------------------------------------------------------------------- 1387 | 1388 | # If the GENERATE_XML tag is set to YES Doxygen will 1389 | # generate an XML file that captures the structure of 1390 | # the code including all documentation. 1391 | 1392 | GENERATE_XML = NO 1393 | 1394 | # The XML_OUTPUT tag is used to specify where the XML pages will be put. 1395 | # If a relative path is entered the value of OUTPUT_DIRECTORY will be 1396 | # put in front of it. If left blank `xml' will be used as the default path. 1397 | 1398 | XML_OUTPUT = xml 1399 | 1400 | # The XML_SCHEMA tag can be used to specify an XML schema, 1401 | # which can be used by a validating XML parser to check the 1402 | # syntax of the XML files. 1403 | 1404 | XML_SCHEMA = 1405 | 1406 | # The XML_DTD tag can be used to specify an XML DTD, 1407 | # which can be used by a validating XML parser to check the 1408 | # syntax of the XML files. 1409 | 1410 | XML_DTD = 1411 | 1412 | # If the XML_PROGRAMLISTING tag is set to YES Doxygen will 1413 | # dump the program listings (including syntax highlighting 1414 | # and cross-referencing information) to the XML output. Note that 1415 | # enabling this will significantly increase the size of the XML output. 1416 | 1417 | XML_PROGRAMLISTING = YES 1418 | 1419 | #--------------------------------------------------------------------------- 1420 | # configuration options for the AutoGen Definitions output 1421 | #--------------------------------------------------------------------------- 1422 | 1423 | # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 1424 | # generate an AutoGen Definitions (see autogen.sf.net) file 1425 | # that captures the structure of the code including all 1426 | # documentation. Note that this feature is still experimental 1427 | # and incomplete at the moment. 1428 | 1429 | GENERATE_AUTOGEN_DEF = NO 1430 | 1431 | #--------------------------------------------------------------------------- 1432 | # configuration options related to the Perl module output 1433 | #--------------------------------------------------------------------------- 1434 | 1435 | # If the GENERATE_PERLMOD tag is set to YES Doxygen will 1436 | # generate a Perl module file that captures the structure of 1437 | # the code including all documentation. Note that this 1438 | # feature is still experimental and incomplete at the 1439 | # moment. 1440 | 1441 | GENERATE_PERLMOD = NO 1442 | 1443 | # If the PERLMOD_LATEX tag is set to YES Doxygen will generate 1444 | # the necessary Makefile rules, Perl scripts and LaTeX code to be able 1445 | # to generate PDF and DVI output from the Perl module output. 1446 | 1447 | PERLMOD_LATEX = NO 1448 | 1449 | # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 1450 | # nicely formatted so it can be parsed by a human reader. 1451 | # This is useful 1452 | # if you want to understand what is going on. 1453 | # On the other hand, if this 1454 | # tag is set to NO the size of the Perl module output will be much smaller 1455 | # and Perl will parse it just the same. 1456 | 1457 | PERLMOD_PRETTY = YES 1458 | 1459 | # The names of the make variables in the generated doxyrules.make file 1460 | # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 1461 | # This is useful so different doxyrules.make files included by the same 1462 | # Makefile don't overwrite each other's variables. 1463 | 1464 | PERLMOD_MAKEVAR_PREFIX = 1465 | 1466 | #--------------------------------------------------------------------------- 1467 | # Configuration options related to the preprocessor 1468 | #--------------------------------------------------------------------------- 1469 | 1470 | # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 1471 | # evaluate all C-preprocessor directives found in the sources and include 1472 | # files. 1473 | 1474 | ENABLE_PREPROCESSING = YES 1475 | 1476 | # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 1477 | # names in the source code. If set to NO (the default) only conditional 1478 | # compilation will be performed. Macro expansion can be done in a controlled 1479 | # way by setting EXPAND_ONLY_PREDEF to YES. 1480 | 1481 | MACRO_EXPANSION = NO 1482 | 1483 | # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 1484 | # then the macro expansion is limited to the macros specified with the 1485 | # PREDEFINED and EXPAND_AS_DEFINED tags. 1486 | 1487 | EXPAND_ONLY_PREDEF = NO 1488 | 1489 | # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 1490 | # pointed to by INCLUDE_PATH will be searched when a #include is found. 1491 | 1492 | SEARCH_INCLUDES = YES 1493 | 1494 | # The INCLUDE_PATH tag can be used to specify one or more directories that 1495 | # contain include files that are not input files but should be processed by 1496 | # the preprocessor. 1497 | 1498 | INCLUDE_PATH = 1499 | 1500 | # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 1501 | # patterns (like *.h and *.hpp) to filter out the header-files in the 1502 | # directories. If left blank, the patterns specified with FILE_PATTERNS will 1503 | # be used. 1504 | 1505 | INCLUDE_FILE_PATTERNS = 1506 | 1507 | # The PREDEFINED tag can be used to specify one or more macro names that 1508 | # are defined before the preprocessor is started (similar to the -D option of 1509 | # gcc). The argument of the tag is a list of macros of the form: name 1510 | # or name=definition (no spaces). If the definition and the = are 1511 | # omitted =1 is assumed. To prevent a macro definition from being 1512 | # undefined via #undef or recursively expanded use the := operator 1513 | # instead of the = operator. 1514 | 1515 | PREDEFINED = "" 1516 | 1517 | # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 1518 | # this tag can be used to specify a list of macro names that should be expanded. 1519 | # The macro definition that is found in the sources will be used. 1520 | # Use the PREDEFINED tag if you want to use a different macro definition that 1521 | # overrules the definition found in the source code. 1522 | 1523 | EXPAND_AS_DEFINED = 1524 | 1525 | # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 1526 | # doxygen's preprocessor will remove all references to function-like macros 1527 | # that are alone on a line, have an all uppercase name, and do not end with a 1528 | # semicolon, because these will confuse the parser if not removed. 1529 | 1530 | SKIP_FUNCTION_MACROS = YES 1531 | 1532 | #--------------------------------------------------------------------------- 1533 | # Configuration::additions related to external references 1534 | #--------------------------------------------------------------------------- 1535 | 1536 | # The TAGFILES option can be used to specify one or more tagfiles. For each 1537 | # tag file the location of the external documentation should be added. The 1538 | # format of a tag file without this location is as follows: 1539 | # 1540 | # TAGFILES = file1 file2 ... 1541 | # Adding location for the tag files is done as follows: 1542 | # 1543 | # TAGFILES = file1=loc1 "file2 = loc2" ... 1544 | # where "loc1" and "loc2" can be relative or absolute paths 1545 | # or URLs. Note that each tag file must have a unique name (where the name does 1546 | # NOT include the path). If a tag file is not located in the directory in which 1547 | # doxygen is run, you must also specify the path to the tagfile here. 1548 | 1549 | TAGFILES = 1550 | 1551 | # When a file name is specified after GENERATE_TAGFILE, doxygen will create 1552 | # a tag file that is based on the input files it reads. 1553 | 1554 | GENERATE_TAGFILE = 1555 | 1556 | # If the ALLEXTERNALS tag is set to YES all external classes will be listed 1557 | # in the class index. If set to NO only the inherited external classes 1558 | # will be listed. 1559 | 1560 | ALLEXTERNALS = NO 1561 | 1562 | # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 1563 | # in the modules index. If set to NO, only the current project's groups will 1564 | # be listed. 1565 | 1566 | EXTERNAL_GROUPS = YES 1567 | 1568 | # The PERL_PATH should be the absolute path and name of the perl script 1569 | # interpreter (i.e. the result of `which perl'). 1570 | 1571 | PERL_PATH = /usr/bin/perl 1572 | 1573 | #--------------------------------------------------------------------------- 1574 | # Configuration options related to the dot tool 1575 | #--------------------------------------------------------------------------- 1576 | 1577 | # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 1578 | # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 1579 | # or super classes. Setting the tag to NO turns the diagrams off. Note that 1580 | # this option also works with HAVE_DOT disabled, but it is recommended to 1581 | # install and use dot, since it yields more powerful graphs. 1582 | 1583 | CLASS_DIAGRAMS = YES 1584 | 1585 | # You can define message sequence charts within doxygen comments using the \msc 1586 | # command. Doxygen will then run the mscgen tool (see 1587 | # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 1588 | # documentation. The MSCGEN_PATH tag allows you to specify the directory where 1589 | # the mscgen tool resides. If left empty the tool is assumed to be found in the 1590 | # default search path. 1591 | 1592 | MSCGEN_PATH = 1593 | 1594 | # If set to YES, the inheritance and collaboration graphs will hide 1595 | # inheritance and usage relations if the target is undocumented 1596 | # or is not a class. 1597 | 1598 | HIDE_UNDOC_RELATIONS = YES 1599 | 1600 | # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 1601 | # available from the path. This tool is part of Graphviz, a graph visualization 1602 | # toolkit from AT&T and Lucent Bell Labs. The other options in this section 1603 | # have no effect if this option is set to NO (the default) 1604 | 1605 | HAVE_DOT = ${HAVE_DOT} 1606 | 1607 | # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 1608 | # allowed to run in parallel. When set to 0 (the default) doxygen will 1609 | # base this on the number of processors available in the system. You can set it 1610 | # explicitly to a value larger than 0 to get control over the balance 1611 | # between CPU load and processing speed. 1612 | 1613 | DOT_NUM_THREADS = 0 1614 | 1615 | # By default doxygen will use the Helvetica font for all dot files that 1616 | # doxygen generates. When you want a differently looking font you can specify 1617 | # the font name using DOT_FONTNAME. You need to make sure dot is able to find 1618 | # the font, which can be done by putting it in a standard location or by setting 1619 | # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the 1620 | # directory containing the font. 1621 | 1622 | DOT_FONTNAME = FreeSans 1623 | 1624 | # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 1625 | # The default size is 10pt. 1626 | 1627 | DOT_FONTSIZE = 10 1628 | 1629 | # By default doxygen will tell dot to use the Helvetica font. 1630 | # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to 1631 | # set the path where dot can find it. 1632 | 1633 | DOT_FONTPATH = 1634 | 1635 | # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 1636 | # will generate a graph for each documented class showing the direct and 1637 | # indirect inheritance relations. Setting this tag to YES will force the 1638 | # CLASS_DIAGRAMS tag to NO. 1639 | 1640 | CLASS_GRAPH = YES 1641 | 1642 | # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 1643 | # will generate a graph for each documented class showing the direct and 1644 | # indirect implementation dependencies (inheritance, containment, and 1645 | # class references variables) of the class with other documented classes. 1646 | 1647 | COLLABORATION_GRAPH = YES 1648 | 1649 | # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 1650 | # will generate a graph for groups, showing the direct groups dependencies 1651 | 1652 | GROUP_GRAPHS = YES 1653 | 1654 | # If the UML_LOOK tag is set to YES doxygen will generate inheritance and 1655 | # collaboration diagrams in a style similar to the OMG's Unified Modeling 1656 | # Language. 1657 | 1658 | UML_LOOK = NO 1659 | 1660 | # If the UML_LOOK tag is enabled, the fields and methods are shown inside 1661 | # the class node. If there are many fields or methods and many nodes the 1662 | # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS 1663 | # threshold limits the number of items for each type to make the size more 1664 | # managable. Set this to 0 for no limit. Note that the threshold may be 1665 | # exceeded by 50% before the limit is enforced. 1666 | 1667 | UML_LIMIT_NUM_FIELDS = 10 1668 | 1669 | # If set to YES, the inheritance and collaboration graphs will show the 1670 | # relations between templates and their instances. 1671 | 1672 | TEMPLATE_RELATIONS = NO 1673 | 1674 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 1675 | # tags are set to YES then doxygen will generate a graph for each documented 1676 | # file showing the direct and indirect include dependencies of the file with 1677 | # other documented files. 1678 | 1679 | INCLUDE_GRAPH = YES 1680 | 1681 | # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 1682 | # HAVE_DOT tags are set to YES then doxygen will generate a graph for each 1683 | # documented header file showing the documented files that directly or 1684 | # indirectly include this file. 1685 | 1686 | INCLUDED_BY_GRAPH = YES 1687 | 1688 | # If the CALL_GRAPH and HAVE_DOT options are set to YES then 1689 | # doxygen will generate a call dependency graph for every global function 1690 | # or class method. Note that enabling this option will significantly increase 1691 | # the time of a run. So in most cases it will be better to enable call graphs 1692 | # for selected functions only using the \callgraph command. 1693 | 1694 | CALL_GRAPH = YES 1695 | 1696 | # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 1697 | # doxygen will generate a caller dependency graph for every global function 1698 | # or class method. Note that enabling this option will significantly increase 1699 | # the time of a run. So in most cases it will be better to enable caller 1700 | # graphs for selected functions only using the \callergraph command. 1701 | 1702 | CALLER_GRAPH = NO 1703 | 1704 | # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 1705 | # will generate a graphical hierarchy of all classes instead of a textual one. 1706 | 1707 | GRAPHICAL_HIERARCHY = YES 1708 | 1709 | # If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES 1710 | # then doxygen will show the dependencies a directory has on other directories 1711 | # in a graphical way. The dependency relations are determined by the #include 1712 | # relations between the files in the directories. 1713 | 1714 | DIRECTORY_GRAPH = YES 1715 | 1716 | # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 1717 | # generated by dot. Possible values are svg, png, jpg, or gif. 1718 | # If left blank png will be used. If you choose svg you need to set 1719 | # HTML_FILE_EXTENSION to xhtml in order to make the SVG files 1720 | # visible in IE 9+ (other browsers do not have this requirement). 1721 | 1722 | DOT_IMAGE_FORMAT = png 1723 | 1724 | # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to 1725 | # enable generation of interactive SVG images that allow zooming and panning. 1726 | # Note that this requires a modern browser other than Internet Explorer. 1727 | # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you 1728 | # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files 1729 | # visible. Older versions of IE do not have SVG support. 1730 | 1731 | INTERACTIVE_SVG = NO 1732 | 1733 | # The tag DOT_PATH can be used to specify the path where the dot tool can be 1734 | # found. If left blank, it is assumed the dot tool can be found in the path. 1735 | 1736 | DOT_PATH = 1737 | 1738 | # The DOTFILE_DIRS tag can be used to specify one or more directories that 1739 | # contain dot files that are included in the documentation (see the 1740 | # \dotfile command). 1741 | 1742 | DOTFILE_DIRS = 1743 | 1744 | # The MSCFILE_DIRS tag can be used to specify one or more directories that 1745 | # contain msc files that are included in the documentation (see the 1746 | # \mscfile command). 1747 | 1748 | MSCFILE_DIRS = 1749 | 1750 | # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 1751 | # nodes that will be shown in the graph. If the number of nodes in a graph 1752 | # becomes larger than this value, doxygen will truncate the graph, which is 1753 | # visualized by representing a node as a red box. Note that doxygen if the 1754 | # number of direct children of the root node in a graph is already larger than 1755 | # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 1756 | # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. 1757 | 1758 | DOT_GRAPH_MAX_NODES = 50 1759 | 1760 | # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 1761 | # graphs generated by dot. A depth value of 3 means that only nodes reachable 1762 | # from the root by following a path via at most 3 edges will be shown. Nodes 1763 | # that lay further from the root node will be omitted. Note that setting this 1764 | # option to 1 or 2 may greatly reduce the computation time needed for large 1765 | # code bases. Also note that the size of a graph can be further restricted by 1766 | # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. 1767 | 1768 | MAX_DOT_GRAPH_DEPTH = 0 1769 | 1770 | # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 1771 | # background. This is disabled by default, because dot on Windows does not 1772 | # seem to support this out of the box. Warning: Depending on the platform used, 1773 | # enabling this option may lead to badly anti-aliased labels on the edges of 1774 | # a graph (i.e. they become hard to read). 1775 | 1776 | DOT_TRANSPARENT = NO 1777 | 1778 | # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 1779 | # files in one run (i.e. multiple -o and -T options on the command line). This 1780 | # makes dot run faster, but since only newer versions of dot (>1.8.10) 1781 | # support this, this feature is disabled by default. 1782 | 1783 | DOT_MULTI_TARGETS = YES 1784 | 1785 | # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 1786 | # generate a legend page explaining the meaning of the various boxes and 1787 | # arrows in the dot generated graphs. 1788 | 1789 | GENERATE_LEGEND = YES 1790 | 1791 | # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 1792 | # remove the intermediate dot files that are used to generate 1793 | # the various graphs. 1794 | 1795 | DOT_CLEANUP = YES 1796 | -------------------------------------------------------------------------------- /doc/main.dox: -------------------------------------------------------------------------------- 1 | /*! 2 | \mainpage NatNetLinux 3 | 4 | \section sec_purpose Purpose 5 | 6 | This package provides an interface to read NatNet packets in Unix-based OSs. 7 | 8 | \section sec_license Copyright and License 9 | 10 | All files part of NatNetLinux are Copyright 2013, 11 | [Philip G. Lee](http://www.linkedin.com/in/philipgreggorylee/) 12 | ``. 13 | 14 | NatNetLinux is free software: you can redistribute it and/or modify 15 | it under the terms of the GNU General Public License as published by 16 | the Free Software Foundation, either version 3 of the License, or 17 | (at your option) any later version. 18 | 19 | NatNetLinux is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | GNU General Public License for more details. 23 | 24 | You should have received a copy of the GNU General Public License 25 | along with NatNetLinux. If not, see \c . 26 | 27 | */ 28 | -------------------------------------------------------------------------------- /include/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ADD_SUBDIRECTORY( NatNetLinux ) 2 | -------------------------------------------------------------------------------- /include/NatNetLinux/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | SET( H_FILES 2 | "CommandListener.h" 3 | "FrameListener.h" 4 | "NatNet.h" 5 | "NatNetPacket.h" 6 | "NatNetSender.h" 7 | ) 8 | 9 | INSTALL( 10 | FILES ${H_FILES} 11 | DESTINATION include/NatNetLinux 12 | ) 13 | -------------------------------------------------------------------------------- /include/NatNetLinux/CommandListener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CommandListener.h is part of NatNetLinux, and is Copyright 2013-2014, 3 | * Philip G. Lee 4 | * 5 | * NatNetLinux is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * NatNetLinux is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with NatNetLinux. If not, see . 17 | */ 18 | 19 | #ifndef COMMANDLISTENER_H 20 | #define COMMANDLISTENER_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | /*! 29 | * \brief Thread to listen for command responses. 30 | * \author Philip G. Lee 31 | * 32 | * This class spawns a new thread to listen for command responses. This class 33 | * is needed to retrieve the NatNet protocol version in use by the server. 34 | */ 35 | class CommandListener 36 | { 37 | public: 38 | 39 | /*! 40 | * \brief Constructor 41 | * 42 | * \param sd The socket on which to listen. 43 | */ 44 | CommandListener(int sd = -1) : 45 | _run(false), 46 | _thread(0), 47 | _sd(sd), 48 | _nnMajor(0), 49 | _nnMinor(0) 50 | { 51 | _nnVersionMutex.lock(); 52 | } 53 | 54 | ~CommandListener() 55 | { 56 | if( running() ) 57 | stop(); 58 | delete _thread; 59 | } 60 | 61 | //! \brief Begin the listening in new thread. Non-blocking. 62 | void start() 63 | { 64 | _run = true; 65 | _thread = new boost::thread( &CommandListener::_work, this, _sd); 66 | } 67 | 68 | //! \brief Cause the thread to stop. Non-blocking. 69 | void stop() 70 | { 71 | _run = false; 72 | } 73 | 74 | //! \brief Return true iff the listener thread is running. Non-blocking. 75 | bool running() 76 | { 77 | return _run; 78 | } 79 | 80 | //! \brief Wait for the listening thread to stop. Blocking. 81 | void join() 82 | { 83 | if(_thread) 84 | _thread->join(); 85 | } 86 | 87 | /*! 88 | * \brief Get NatNet major and minor version numbers. Blocking. 89 | * 90 | * \warning 91 | * this call blocks until the first ping response packet is heard, 92 | * and afterwards does not block. 93 | * The reason is that the ping response packet is the only one that 94 | * contains the NatNet version string. So, you \b MUST send a ping to 95 | * the server before calling this to avoid deadlock. 96 | * 97 | * \param major output NatNet major version 98 | * \param minor output NatNet minor version 99 | */ 100 | void getNatNetVersion( unsigned char& major, unsigned char& minor ) 101 | { 102 | _nnVersionMutex.lock(); 103 | major = _nnMajor; 104 | minor = _nnMinor; 105 | _nnVersionMutex.unlock(); 106 | } 107 | 108 | private: 109 | 110 | bool _run; 111 | boost::thread* _thread; 112 | int _sd; 113 | unsigned char _nnMajor; 114 | unsigned char _nnMinor; 115 | boost::mutex _nnVersionMutex; 116 | 117 | void _work(int sd) 118 | { 119 | char const* response; 120 | ssize_t len; 121 | NatNetPacket nnp; 122 | struct sockaddr_in senderAddress; 123 | socklen_t senderAddressLength = sizeof(senderAddress); 124 | NatNetSender sender; 125 | 126 | fd_set rfds; 127 | struct timeval timeout; 128 | 129 | while(_run) 130 | { 131 | // Give other threads an opportunity to interrupt this thread. 132 | //boost::this_thread::interruption_point(); 133 | 134 | // Wait for at most 1 second until the socket has data (recvfrom() 135 | // will not block). Otherwise, continue. This gives outside threads 136 | // a chance to kill this thread every second. 137 | timeout.tv_sec = 1; timeout.tv_usec = 0; 138 | FD_ZERO(&rfds); FD_SET(sd, &rfds); 139 | if( !select(sd+1, &rfds, 0, 0, &timeout) ) 140 | continue; 141 | 142 | // blocking 143 | len = recvfrom( 144 | sd, 145 | nnp.rawPtr(), nnp.maxLength(), 146 | 0, reinterpret_cast(&senderAddress), &senderAddressLength 147 | ); 148 | 149 | if(len <= 0) 150 | continue; 151 | 152 | switch(nnp.iMessage()) 153 | { 154 | case NatNetPacket::NAT_MODELDEF: 155 | //Unpack(nnp.rawPtr()); 156 | break; 157 | case NatNetPacket::NAT_FRAMEOFDATA: 158 | //Unpack(nnp.rawPtr()); 159 | break; 160 | case NatNetPacket::NAT_PINGRESPONSE: 161 | sender.unpack(nnp.read(0)); 162 | _nnMajor = sender.natNetVersion()[0]; 163 | _nnMinor = sender.natNetVersion()[1]; 164 | _nnVersionMutex.unlock(); 165 | std::cout << "[Client] Server Software: " << sender.name() << std::endl; 166 | printf("[Client] NatNetVersion: %d.%d\n",sender.natNetVersion()[0],sender.natNetVersion()[1]); 167 | printf("[Client] ServerVersion: %d.%d\n",sender.version()[0],sender.version()[1]); 168 | break; 169 | case NatNetPacket::NAT_RESPONSE: 170 | response = nnp.read(0); 171 | printf("Response : %s", response); 172 | break; 173 | case NatNetPacket::NAT_UNRECOGNIZED_REQUEST: 174 | printf("[Client] received 'unrecognized request'\n"); 175 | break; 176 | case NatNetPacket::NAT_MESSAGESTRING: 177 | response = nnp.read(0); 178 | printf("[Client] Received message: %s\n", response); 179 | break; 180 | default: 181 | break; 182 | } // end switch(nnp.iMessage) 183 | 184 | } 185 | } 186 | }; 187 | 188 | #endif /*COMMANDLISTENER_H*/ 189 | -------------------------------------------------------------------------------- /include/NatNetLinux/FrameListener.h: -------------------------------------------------------------------------------- 1 | /* 2 | * FrameListener.h is part of NatNetLinux, and is Copyright 2013-2014, 3 | * Philip G. Lee 4 | * 5 | * NatNetLinux is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * NatNetLinux is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with NatNetLinux. If not, see . 17 | */ 18 | 19 | #ifndef FRAMELISTENER_H 20 | #define FRAMELISTENER_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | /*! 31 | * \brief Thread to listen for MocapFrame data. 32 | * \author Philip G. Lee 33 | * 34 | * This class listens for MocapFrame data on a given socket. 35 | * It uses a circular buffer to store the frame data, and provides a 36 | * thread-safe interface to query for the most recent frames. 37 | */ 38 | class FrameListener 39 | { 40 | public: 41 | 42 | /*! 43 | * \brief Constructor 44 | * 45 | * \param sd The socket on which to listen. 46 | * \param nnMajor NatNet major version. 47 | * \param nnMinor NatNet minor version. 48 | * \param bufferSize number of frames in the \c frames() buffer. 49 | */ 50 | FrameListener(int sd = -1, unsigned char nnMajor=0, unsigned char nnMinor=0, size_t bufferSize=64 ) : 51 | _thread(0), 52 | _sd(sd), 53 | _nnMajor(nnMajor), 54 | _nnMinor(nnMinor), 55 | _framesMutex(), 56 | _frames(bufferSize), 57 | _run(false) 58 | { 59 | } 60 | 61 | ~FrameListener() 62 | { 63 | if( running() ) 64 | stop(); 65 | // I think this may be blocking unless the thread is stopped. 66 | delete _thread; 67 | } 68 | 69 | //! \brief Begin the listening in new thread. Non-blocking. 70 | void start() 71 | { 72 | _run = true; 73 | _thread = new boost::thread( &FrameListener::_work, this, _sd); 74 | } 75 | 76 | //! \brief Cause the thread to stop. Non-blocking. 77 | void stop() 78 | { 79 | _run = false; 80 | } 81 | 82 | //! \brief Return true iff the listener thread is running. Non-blocking. 83 | bool running() 84 | { 85 | return _run; 86 | } 87 | 88 | //! \brief Wait for the listening thread to stop. Blocking. 89 | void join() 90 | { 91 | if(_thread) 92 | _thread->join(); 93 | } 94 | 95 | // Data access ============================================================= 96 | 97 | /*! 98 | * \brief Get the latest frame and remove it from the internal buffer. Thread-safe. 99 | * 100 | * This function may block while reading the buffer. \c success will be false only if there 101 | * is no more data in the internal buffer. 102 | * 103 | * \param success 104 | * input parameter. If not null, its value is set to true if the return 105 | * value is valid, and false otherwise. 106 | * \returns 107 | * most recent frame/timestamp pair if the internal buffer has data. 108 | * Otherwise, returns an invalid frame. The timestamp is the result of 109 | * \c clock_gettime( \c CLOCK_REALTIME, ...) when the data is read 110 | * from the UDP interface. 111 | * 112 | * \sa tryPop() 113 | */ 114 | std::pair pop(bool* success=0) 115 | { 116 | std::pair ret; 117 | bool retSuccess = false; 118 | 119 | _framesMutex.lock(); 120 | if( !_frames.empty() ) 121 | { 122 | retSuccess = true; 123 | ret = _frames.back(); 124 | _frames.pop_back(); 125 | } 126 | _framesMutex.unlock(); 127 | 128 | if( success ) 129 | *success = retSuccess; 130 | return ret; 131 | } 132 | 133 | /*! 134 | * \brief Get the latest frame and remove it from the internal buffer. Thread-safe *non-blocking*. 135 | * 136 | * This function is just like \c pop(), but never blocks. If you are willing 137 | * to wait to acquire the lock to read the internal data buffer, then use 138 | * the blocking version \c pop(). If you use \c tryPop(), 139 | * it will not block, but \c success will be false if either the 140 | * buffer is currently being written, *or* if there is no more data. 141 | * 142 | * \param success 143 | * input parameter. If not null, its value is set to true if the return 144 | * value is valid, and false otherwise. 145 | * \returns 146 | * most recent frame/timestamp pair if the internal buffer has data 147 | * *and* is available for reading immediately. 148 | * Otherwise, returns an invalid frame. The timestamp is the result of 149 | * \c clock_gettime( \c CLOCK_REALTIME, ...) when the data is read 150 | * from the UDP interface. 151 | * 152 | * \sa pop() 153 | */ 154 | std::pair tryPop(bool* success=0) 155 | { 156 | std::pair ret; 157 | bool retSuccess = false; 158 | 159 | if( _framesMutex.try_lock() ) 160 | { 161 | if( !_frames.empty() ) 162 | { 163 | retSuccess = true; 164 | ret = _frames.back(); 165 | _frames.pop_back(); 166 | } 167 | _framesMutex.unlock(); 168 | } 169 | 170 | if( success ) 171 | *success = retSuccess; 172 | return ret; 173 | } 174 | 175 | //-------------------------------------------------------------------------- 176 | 177 | private: 178 | 179 | boost::thread* _thread; 180 | int _sd; 181 | unsigned char _nnMajor; 182 | unsigned char _nnMinor; 183 | mutable boost::mutex _framesMutex; 184 | boost::circular_buffer< std::pair > _frames; 185 | bool _run; 186 | 187 | void _work(int sd) 188 | { 189 | NatNetPacket nnp; 190 | struct timespec ts; 191 | size_t dataBytes; 192 | 193 | fd_set rfds; 194 | struct timeval timeout; 195 | 196 | while(_run) 197 | { 198 | // Wait for at most 1 second until the socket has data (read() 199 | // will not block). Otherwise, continue. This gives outside threads 200 | // a chance to kill this thread every second. 201 | timeout.tv_sec = 1; timeout.tv_usec = 0; 202 | FD_ZERO(&rfds); FD_SET(sd, &rfds); 203 | if( !select(sd+1, &rfds, 0, 0, &timeout) ) 204 | continue; 205 | 206 | clock_gettime( CLOCK_REALTIME, &ts ); 207 | dataBytes = read( sd, nnp.rawPtr(), nnp.maxLength() ); 208 | 209 | if( dataBytes > 0 && nnp.iMessage() == NatNetPacket::NAT_FRAMEOFDATA ) 210 | { 211 | MocapFrame mFrame(_nnMajor,_nnMinor); 212 | mFrame.unpack(nnp.rawPayloadPtr()); 213 | _framesMutex.lock(); 214 | _frames.push_back(std::make_pair(mFrame,ts)); 215 | _framesMutex.unlock(); 216 | } 217 | } 218 | } 219 | }; 220 | 221 | #endif /*FRAMELISTENER_H*/ 222 | -------------------------------------------------------------------------------- /include/NatNetLinux/NatNet.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NatNet.h is part of NatNetLinux, and is Copyright 2013-2014, 3 | * Philip G. Lee 4 | * 5 | * NatNetLinux is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * NatNetLinux is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with NatNetLinux. If not, see . 17 | */ 18 | 19 | #ifndef NATNET_H 20 | #define NATNET_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | 39 | /*! 40 | * \brief Encapsulates basic NatNet communication functionality 41 | * \author Philip G. Lee 42 | */ 43 | class NatNet 44 | { 45 | public: 46 | 47 | //! \brief Default NatNet command port 48 | static const uint16_t commandPort=1510; 49 | //! \brief Default NatNet data port 50 | static const uint16_t dataPort=1511; 51 | 52 | /*! 53 | * \brief Create a socket IPv4 address structure. 54 | * 55 | * \param inAddr 56 | * IPv4 address that the returned structure describes 57 | * \param port 58 | * port that the returned structure describes 59 | * \returns 60 | * an IPv4 socket address structure that describes a given address and 61 | * port 62 | */ 63 | static struct sockaddr_in createAddress( uint32_t inAddr, uint16_t port=commandPort ) 64 | { 65 | struct sockaddr_in ret; 66 | memset(&ret, 0, sizeof(ret)); 67 | ret.sin_family = AF_INET; 68 | ret.sin_port = htons(port); 69 | ret.sin_addr.s_addr = inAddr; 70 | 71 | return ret; 72 | } 73 | 74 | /*! 75 | * \brief Creates a socket for receiving commands. 76 | * 77 | * To use this socket to send data, you must use \c sendto() with an 78 | * appropriate destination address. 79 | * 80 | * \param inAddr our local address 81 | * \param port command port, defaults to 1510 82 | * \returns socket descriptor bound to \c port and \c inAddr 83 | */ 84 | static int createCommandSocket( uint32_t inAddr, uint16_t port=commandPort ) 85 | { 86 | // Asking for a buffer of 1MB = 2^20 bytes. This is what NP does, but this 87 | // seems far too large on Linux systems where the max is usually something 88 | // like 256 kB. 89 | const int rcvBufSize = 0x100000; 90 | int sd; 91 | int tmp=0; 92 | socklen_t len=0; 93 | struct sockaddr_in sockAddr = createAddress(inAddr, port); 94 | 95 | sd = socket(AF_INET, SOCK_DGRAM, 0); 96 | if( sd < 0 ) 97 | { 98 | std::cerr << "Could not open socket. Error: " << errno << std::endl; 99 | exit(1); 100 | } 101 | 102 | // Bind socket to the address. 103 | tmp = bind( sd, (struct sockaddr*)&sockAddr, sizeof(sockAddr) ); 104 | if( tmp < 0 ) 105 | { 106 | std::cerr << "Could not bind socket. Error: " << errno << std::endl; 107 | close(sd); 108 | exit(1); 109 | } 110 | 111 | int value = 1; 112 | tmp = setsockopt( sd, SOL_SOCKET, SO_BROADCAST, (char*)&value, sizeof(value) ); 113 | if( tmp < 0 ) 114 | { 115 | std::cerr << "Could not set socket to broadcast mode. Error: " << errno << std::endl; 116 | close(sd); 117 | exit(1); 118 | } 119 | 120 | setsockopt(sd, SOL_SOCKET, SO_RCVBUF, (char*)&rcvBufSize, sizeof(rcvBufSize)); 121 | getsockopt(sd, SOL_SOCKET, SO_RCVBUF, (char*)&tmp, &len); 122 | if( tmp != rcvBufSize ) 123 | { 124 | std::cerr << "WARNING: Could not set receive buffer size. Asked for " 125 | << rcvBufSize << "B got " << tmp << "B" << std::endl; 126 | } 127 | 128 | return sd; 129 | } 130 | 131 | /*! 132 | * \brief Creates a socket to read data from the server. 133 | * 134 | * The socket returned from this function is bound to \c port and 135 | * \c INADDR_ANY, and is added to the multicast group given by 136 | * \c multicastAddr. 137 | * 138 | * \param inAddr our local address 139 | * \param port port to bind to, defaults to 1511 140 | * \param multicastAddr multicast address to subscribe to. Defaults to 239.255.42.99. 141 | * \returns socket bound as described above 142 | */ 143 | static int createDataSocket( uint32_t inAddr, uint16_t port=dataPort, uint32_t multicastAddr=inet_addr("239.255.42.99") ) 144 | { 145 | int sd; 146 | int value; 147 | int tmp; 148 | struct ip_mreq group; 149 | struct sockaddr_in localSock = createAddress(INADDR_ANY, port); 150 | 151 | sd = socket(AF_INET, SOCK_DGRAM, 0); 152 | value = 1; 153 | tmp = setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, (char*)&value, sizeof(value)); 154 | if( tmp < 0 ) 155 | { 156 | std::cerr << "ERROR: Could not set socket option." << std::endl; 157 | close(sd); 158 | return -1; 159 | } 160 | 161 | // Bind the socket to a port. 162 | bind(sd, (struct sockaddr*)&localSock, sizeof(localSock)); 163 | 164 | // Connect a local interface address to the multicast interface address. 165 | group.imr_multiaddr.s_addr = multicastAddr; 166 | group.imr_interface.s_addr = inAddr; 167 | tmp = setsockopt(sd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (char*)&group, sizeof(group)); 168 | if( tmp < 0 ) 169 | { 170 | std::cerr << "ERROR: Could not add the interface to the multicast group." << std::endl; 171 | close(sd); 172 | return -1; 173 | } 174 | 175 | return sd; 176 | } 177 | }; 178 | 179 | /*! 180 | * \brief Simple 3D point 181 | * \author Philip G. Lee 182 | */ 183 | class Point3f 184 | { 185 | public: 186 | Point3f( float xx=0.f, float yy=0.f, float zz=0.f ) : 187 | x(xx), y(yy), z(zz) 188 | { 189 | } 190 | 191 | ~Point3f() {} 192 | 193 | Point3f( Point3f const& other ) : 194 | x(other.x), 195 | y(other.y), 196 | z(other.z) 197 | { 198 | } 199 | 200 | Point3f& operator=( Point3f const& other ) 201 | { 202 | // Self-assignment no problem 203 | x = other.x; 204 | y = other.y; 205 | z = other.z; 206 | 207 | return *this; 208 | } 209 | 210 | float x; 211 | float y; 212 | float z; 213 | }; 214 | 215 | //! \brief Output operator for Point3f. 216 | std::ostream& operator<<( std::ostream& s, Point3f const& point ) 217 | { 218 | std::ios::fmtflags f(s.flags()); 219 | 220 | s 221 | << std::fixed 222 | << "( " 223 | << std::setprecision(3) << point.x << ", " 224 | << std::setprecision(3) << point.y << ", " 225 | << std::setprecision(3) << point.z << " )" << std::endl; 226 | 227 | s.flags(f); 228 | 229 | return s; 230 | } 231 | 232 | /*! 233 | * \brief Quaternion for 3D rotations and orientation 234 | * \author Philip G. Lee 235 | * 236 | * For more information, please see [Quaternions on Wikipedia](http://en.wikipedia.org/wiki/Quaternion). 237 | * A quaternion is a non-commutative group which describes 3D rotations, and whose group 238 | * operation (multiplication) represents rotation composition (A*B means rotate 239 | * by B, then by A). Since it is a proper group, there are no uninvertible 240 | * rotations (like with Euler angles). It is also parameterized by the smallest 241 | * number of parameters (4), unlike a 3x3 matrix (9). 242 | */ 243 | class Quaternion4f 244 | { 245 | public: 246 | float qx; 247 | float qy; 248 | float qz; 249 | float qw; 250 | 251 | //! \brief Default constructor. Without parameters, returns the identity (no rotation). 252 | Quaternion4f( float qx=0.f, float qy=0.f, float qz=0.f, float qw=1.f ) : 253 | qx(qx), 254 | qy(qy), 255 | qz(qz), 256 | qw(qw) 257 | { 258 | renormalize(); 259 | } 260 | 261 | ~Quaternion4f(){} 262 | 263 | //! \brief Copy constructor 264 | Quaternion4f( Quaternion4f const& other ) : 265 | qx(other.qx), 266 | qy(other.qy), 267 | qz(other.qz), 268 | qw(other.qw) 269 | { 270 | } 271 | 272 | //! \brief Assignment operator 273 | Quaternion4f& operator=( Quaternion4f const& other ) 274 | { 275 | qx = other.qx; 276 | qy = other.qy; 277 | qz = other.qz; 278 | qw = other.qw; 279 | 280 | return *this; 281 | } 282 | 283 | //! \brief Quaternion multiplication/assignment 284 | Quaternion4f& operator*=(Quaternion4f const& rhs) 285 | { 286 | float x,y,z,w; 287 | 288 | x = qw*rhs.qw - qx*rhs.qx - qy*rhs.qy - qz*rhs.qz; 289 | y = qw*rhs.qx + qx*rhs.qw + qy*rhs.qz - qz*rhs.qy; 290 | z = qw*rhs.qy - qx*rhs.qz + qy*rhs.qw + qz*rhs.qx; 291 | w = qw*rhs.qz + qx*rhs.qy - qy*rhs.qx + qz*rhs.qw; 292 | 293 | qx = x; 294 | qy = y; 295 | qz = z; 296 | qw = w; 297 | 298 | renormalize(); 299 | 300 | return *this; 301 | } 302 | 303 | //! \brief Quaternion multiplication (rotation composition) 304 | Quaternion4f operator*(Quaternion4f const& rhs) const 305 | { 306 | Quaternion4f ret(*this); 307 | 308 | ret *= rhs; 309 | 310 | return ret; 311 | } 312 | 313 | //! \brief Quaternion division/assignment 314 | Quaternion4f& operator/=(Quaternion4f const& rhs) 315 | { 316 | // Create the conjugate and multiply. 317 | Quaternion4f rhsConj(-rhs.qx, -rhs.qy, -rhs.qy, rhs.qw); 318 | *this *= rhsConj; 319 | return *this; 320 | } 321 | 322 | //! \brief Quaternion division 323 | Quaternion4f operator/(Quaternion4f const& rhs) const 324 | { 325 | Quaternion4f ret(*this); 326 | ret /= rhs; 327 | return ret; 328 | } 329 | 330 | //! \brief Rotate a point using the quaternion. 331 | Point3f rotate(Point3f const& p) const 332 | { 333 | Point3f pout; 334 | 335 | pout.x = (1.f-2.f*qy*qy-2.f*qz*qz)*p.x + (2.f*qx*qy-2.f*qw*qz)*p.y + (2.f*qx*qz+2.f*qw*qy)*p.z; 336 | pout.y = (2.f*qx*qy+2.f*qw*qz)*p.x + (1.f-2.f*qx*qx-2.f*qz*qz)*p.y + (2.f*qy*qz+2.f*qw*qx)*p.z; 337 | pout.z = (2.f*qx*qz-2.f*qw*qy)*p.x + (2.f*qy*qz-2.f*qw*qx)*p.y + (1.f-2.f*qx*qx-2.f*qy*qy)*p.z; 338 | 339 | return pout; 340 | } 341 | 342 | private: 343 | 344 | // If the magnitude of the quaternion exceeds a tolerance, renormalize it 345 | // to have magnitude of 1. 346 | void renormalize() 347 | { 348 | static const float tolHigh = 1.f+1e-6; 349 | static const float tolLow = 1.f-1e-6; 350 | 351 | float mag = qx*qx + qy*qy + qw*qw + qz*qz; 352 | 353 | if( mag < tolLow || mag > tolHigh ) 354 | { 355 | mag = sqrtf( mag ); 356 | qx /= mag; 357 | qy /= mag; 358 | qz /= mag; 359 | qw /= mag; 360 | } 361 | } 362 | }; 363 | 364 | //! \brief Output operator for Quaternion4f. 365 | std::ostream& operator<<( std::ostream& s, Quaternion4f const& q ) 366 | { 367 | std::ios::fmtflags f(s.flags()); 368 | 369 | s 370 | << std::fixed 371 | << "(qx,qy,qz,qw) = ( " 372 | << std::setprecision(3) << q.qx << ", " 373 | << std::setprecision(3) << q.qy << ", " 374 | << std::setprecision(3) << q.qz << ", " 375 | << std::setprecision(3) << q.qw << " )" << std::endl; 376 | 377 | s.flags(f); 378 | 379 | return s; 380 | } 381 | 382 | /*! 383 | * \brief Rigid body 384 | * \author Philip G. Lee 385 | * 386 | * This class is a composition of markers that describe a rigid body. The basic 387 | * traits of the rigid body are its 3D location() and orientation(). Rigid 388 | * bodies can be created in Optitrack's Motive:Tracker software. 389 | */ 390 | class RigidBody 391 | { 392 | public: 393 | 394 | //! \brief Default constructor 395 | RigidBody() : 396 | _id(-1), 397 | _loc(), 398 | _ori(), 399 | _markers(), 400 | _mId(), 401 | _mSize(), 402 | _mErr(), 403 | _trackingValid(true) 404 | { 405 | } 406 | 407 | //! \brief Copy constructor 408 | RigidBody( RigidBody const& other ) : 409 | _id(other._id), 410 | _loc(other._loc), 411 | _ori(other._ori), 412 | _markers(other._markers), 413 | _mId(other._mId), 414 | _mSize(other._mSize), 415 | _mErr(other._mErr), 416 | _trackingValid(other._trackingValid) 417 | { 418 | } 419 | 420 | ~RigidBody(){} 421 | 422 | //! \brief Assignment operator 423 | RigidBody& operator=( RigidBody const& other ) 424 | { 425 | _id = other._id; 426 | _loc = other._loc; 427 | _ori = other._ori; 428 | _markers = other._markers; 429 | _mId = other._mId; 430 | _mSize = other._mSize; 431 | _mErr = other._mErr; 432 | _trackingValid = other._trackingValid; 433 | 434 | return *this; 435 | } 436 | 437 | //! \brief ID of this RigidBody 438 | int id() const { return _id; } 439 | //! \brief Location of this RigidBody 440 | Point3f location() const { return _loc; } 441 | //! \brief Orientation of this RigidBody 442 | Quaternion4f orientation() const { return _ori; } 443 | //! \brief Vector of markers that make up this RigidBody 444 | std::vector const& markers() const { return _markers; } 445 | //! \brief True if the tracking is valid. Used in NatNet version >= 2.6. 446 | bool trackingValid() const { return _trackingValid; } 447 | 448 | /*! 449 | * \brief Unpack rigid body data from raw packed data. 450 | * 451 | * \param data pointer to packed data representing a RigidBody 452 | * \param nnMajor major version of NatNet used to construct the packed data 453 | * \param nnMinor Minor version of NatNet packets used to read this frame 454 | * \returns pointer to data immediately following the RigidBody data 455 | */ 456 | char const* unpack(char const* data, char nnMajor, char nnMinor) 457 | { 458 | int i; 459 | float x,y,z; 460 | 461 | // Rigid body ID 462 | memcpy(&_id,data,4); data += 4; 463 | 464 | // Location and orientation. 465 | memcpy(&_loc.x,data,4); data += 4; 466 | memcpy(&_loc.y,data,4); data += 4; 467 | memcpy(&_loc.z,data,4); data += 4; 468 | memcpy(&_ori.qx,data,4); data += 4; 469 | memcpy(&_ori.qy,data,4); data += 4; 470 | memcpy(&_ori.qz,data,4); data += 4; 471 | memcpy(&_ori.qw,data,4); data += 4; 472 | 473 | // Associated markers 474 | int nMarkers = 0; 475 | memcpy(&nMarkers,data,4); data += 4; 476 | for( i = 0; i < nMarkers; ++i ) 477 | { 478 | memcpy(&x,data,4); data += 4; 479 | memcpy(&y,data,4); data += 4; 480 | memcpy(&z,data,4); data += 4; 481 | _markers.push_back(Point3f(x,y,z)); 482 | } 483 | 484 | if( nnMajor >= 2 ) 485 | { 486 | // Marker IDs 487 | uint32_t id = 0; 488 | for( i = 0; i < nMarkers; ++i ) 489 | { 490 | memcpy(&id,data,4); data += 4; 491 | _mId.push_back(id); 492 | } 493 | 494 | // Marker sizes 495 | float size; 496 | for( i = 0; i < nMarkers; ++i ) 497 | { 498 | memcpy(&size,data,4); data += 4; 499 | _mSize.push_back(size); 500 | } 501 | 502 | if( ((nnMajor==2) && (nnMinor >= 6)) || (nnMajor > 2) || (nnMajor == 0) ) 503 | { 504 | uint16_t tmp; 505 | memcpy(&tmp, data, 2); data += 2; 506 | _trackingValid = tmp & 0x01; 507 | } 508 | // Mean marker error 509 | memcpy(&_mErr,data,4); data += 4; 510 | } 511 | 512 | return data; 513 | } 514 | 515 | private: 516 | int _id; 517 | Point3f _loc; 518 | Quaternion4f _ori; 519 | // List of [x,y,z] positions of each marker. 520 | std::vector _markers; 521 | 522 | // NOTE: If NatNet.major >= 2 523 | // List of marker IDs (each uint32_t) 524 | std::vector _mId; 525 | // List of marker sizes (each float) 526 | std::vector _mSize; 527 | // Mean marker error 528 | float _mErr; 529 | 530 | // NOTE: If NatNet version >= 2.6 531 | bool _trackingValid; 532 | }; 533 | 534 | //! \brief Output operator for RigidBody. 535 | std::ostream& operator<<( std::ostream& s, RigidBody const& body ) 536 | { 537 | s 538 | << " Rigid Body: " << body.id() << std::endl 539 | << " loc: " << body.location() 540 | << " ori: " << body.orientation() << std::endl; 541 | 542 | return s; 543 | } 544 | 545 | /*! 546 | * \brief A set of markers 547 | * \author Philip G. Lee 548 | */ 549 | class MarkerSet 550 | { 551 | public: 552 | //! \brief Default constructor 553 | MarkerSet() : 554 | _name(), 555 | _markers() 556 | { 557 | } 558 | 559 | ~MarkerSet(){} 560 | 561 | //! \brief Copy constructor 562 | MarkerSet( MarkerSet const& other ) : 563 | _name(other._name), 564 | _markers(other._markers) 565 | { 566 | } 567 | 568 | //! \brief Assignment operator 569 | MarkerSet& operator=( MarkerSet const& other ) 570 | { 571 | _name = other._name; 572 | _markers = other._markers; 573 | return *this; 574 | } 575 | 576 | //! \brief The name of the set 577 | std::string const& name() const { return _name; } 578 | //! \brief Vector of markers making up the set 579 | std::vector const& markers() const { return _markers; } 580 | 581 | /*! 582 | * \brief Unpack the set from raw packed data 583 | * 584 | * \param data pointer to packed data representing the MarkerSet 585 | * \returns pointer to data immediately following the MarkerSet data 586 | */ 587 | char const* unpack(char const* data) 588 | { 589 | char n[256]; n[255] = '\0'; 590 | int numMarkers; 591 | int i; 592 | float x,y,z; 593 | 594 | strncpy(n,data,sizeof(n)-1); 595 | _name = n; 596 | data += strlen(n)+1; 597 | 598 | memcpy(&numMarkers, data, 4); data += 4; 599 | for( i = 0; i < numMarkers; ++i ) 600 | { 601 | memcpy(&x,data,4); data += 4; 602 | memcpy(&y,data,4); data += 4; 603 | memcpy(&z,data,4); data += 4; 604 | _markers.push_back(Point3f(x,y,z)); 605 | } 606 | 607 | return data; 608 | } 609 | 610 | private: 611 | 612 | std::string _name; 613 | std::vector _markers; 614 | }; 615 | 616 | //! \brief Output operator to print human-readable text describin a MarkerSet 617 | std::ostream& operator<<( std::ostream& s, MarkerSet const& set ) 618 | { 619 | size_t i, size; 620 | 621 | s 622 | << " MarkerSet: '" << set.name() << "'" << std::endl; 623 | 624 | std::vector const& markers = set.markers(); 625 | size = markers.size(); 626 | for( i = 0; i < size; ++i ) 627 | s << " " << markers[i]; 628 | s << std::endl; 629 | 630 | return s; 631 | } 632 | 633 | /*! 634 | * \brief A composition of rigid bodies 635 | * \author Philip G. Lee 636 | * 637 | * A skeleton is simply a collection of RigidBody elements. 638 | */ 639 | class Skeleton 640 | { 641 | public: 642 | 643 | Skeleton() : 644 | _id(0), 645 | _rBodies() 646 | { 647 | } 648 | 649 | Skeleton( Skeleton const& other ) : 650 | _id(other._id), 651 | _rBodies(other._rBodies) 652 | { 653 | } 654 | 655 | ~Skeleton(){} 656 | 657 | //! \brief ID of this skeleton. 658 | int id() const { return _id; } 659 | //! \brief Vector of rigid bodies in this skeleton. 660 | std::vector const& rigidBodies() const { return _rBodies; } 661 | 662 | /*! 663 | * \brief Unpack skeleton data from raw packed data. 664 | * 665 | * \param data pointer to packed data representing a Skeleton 666 | * \param nnMajor major version of NatNet used to construct the packed data 667 | * \param nnMinor Minor version of NatNet packets used to read this frame 668 | * \returns pointer to data immediately following the Skeleton data 669 | */ 670 | char const* unpack( char const* data, char nnMajor, char nnMinor ) 671 | { 672 | int i; 673 | int numRigid = 0; 674 | 675 | memcpy(&_id,data,4); data += 4; 676 | memcpy(&numRigid,data,4); data += 4; 677 | for( i = 0; i < numRigid; ++i ) 678 | { 679 | RigidBody b; 680 | data = b.unpack( data, nnMajor, nnMinor ); 681 | _rBodies.push_back(b); 682 | } 683 | 684 | return data; 685 | } 686 | 687 | private: 688 | int _id; 689 | std::vector _rBodies; 690 | }; 691 | 692 | /*! 693 | * \brief A labeled marker. 694 | * \author Philip G. Lee 695 | */ 696 | class LabeledMarker 697 | { 698 | public: 699 | 700 | //! \brief Default constructor. 701 | LabeledMarker() : 702 | _id(0), 703 | _p(), 704 | _size(0.f) 705 | { 706 | } 707 | 708 | ~LabeledMarker(){} 709 | 710 | //! \brief Copy constructor. 711 | LabeledMarker( LabeledMarker const& other ) : 712 | _id(other._id), 713 | _p(other._p), 714 | _size(other._size) 715 | { 716 | } 717 | 718 | //! \brief Assignment operator. 719 | LabeledMarker& operator=( LabeledMarker const& other ) 720 | { 721 | _id = other._id; 722 | _p = other._p; 723 | _size = other._size; 724 | return *this; 725 | } 726 | 727 | //! \brief ID of this marker. 728 | int id() const { return _id; } 729 | //! \brief Location of this marker. 730 | Point3f location() const { return _p; } 731 | //! \brief Size of this marker. 732 | float size() const { return _size; } 733 | 734 | /*! 735 | * \brief Unpack the marker from packed data. 736 | * 737 | * \param data pointer to packed data representing a labeled marker 738 | * \returns pointer to data immediately following the labeled marker data 739 | */ 740 | char const* unpack( char const* data ) 741 | { 742 | memcpy(&_id,data,4); data += 4; 743 | memcpy(&_p.x,data,4); data += 4; 744 | memcpy(&_p.y,data,4); data += 4; 745 | memcpy(&_p.z,data,4); data += 4; 746 | memcpy(&_size,data,4); data += 4; 747 | 748 | return data; 749 | } 750 | 751 | private: 752 | int _id; 753 | Point3f _p; 754 | float _size; 755 | }; 756 | 757 | /*! 758 | * \brief A complete frame of motion capture data. 759 | * \author Philip G. Lee 760 | */ 761 | class MocapFrame 762 | { 763 | public: 764 | 765 | /*! 766 | * \brief Constructor 767 | * 768 | * Unless you want bad things to happen, specify the NatNet version 769 | * numbers correctly before you try to \c unpack(). 770 | * 771 | * \param nnMajor Major version of NatNet packets used to read this frame 772 | * \param nnMinor Minor version of NatNet packets used to read this frame 773 | */ 774 | MocapFrame( unsigned char nnMajor=0, unsigned char nnMinor=0 ) : 775 | _nnMajor(nnMajor), 776 | _nnMinor(nnMinor), 777 | _frameNum(0), 778 | _numMarkerSets(0), 779 | _numRigidBodies(0) 780 | { 781 | 782 | } 783 | ~MocapFrame(){} 784 | 785 | //! \brief Copy constructor. 786 | MocapFrame( MocapFrame const& other ) : 787 | _nnMajor(other._nnMajor), 788 | _nnMinor(other._nnMinor), 789 | _frameNum(other._frameNum), 790 | _numMarkerSets(other._numMarkerSets), 791 | _markerSet(other._markerSet), 792 | _uidMarker(other._uidMarker), 793 | _numRigidBodies(other._numRigidBodies), 794 | _rBodies(other._rBodies), 795 | _skel(other._skel), 796 | _labeledMarkers(other._labeledMarkers), 797 | _latency(other._latency), 798 | _timecode(other._timecode), 799 | _subTimecode(other._subTimecode) 800 | { 801 | 802 | } 803 | 804 | //! \brief Assignment operator 805 | MocapFrame& operator=( MocapFrame const& other ) 806 | { 807 | _nnMajor = other._nnMajor; 808 | _nnMinor = other._nnMinor; 809 | _frameNum = other._frameNum; 810 | _numMarkerSets = other._numMarkerSets; 811 | _markerSet = other._markerSet; 812 | _uidMarker = other._uidMarker; 813 | _numRigidBodies = other._numRigidBodies; 814 | _rBodies = other._rBodies; 815 | _skel = other._skel; 816 | _labeledMarkers = other._labeledMarkers; 817 | _latency = other._latency; 818 | _timecode = other._timecode; 819 | _subTimecode = other._subTimecode; 820 | 821 | return *this; 822 | } 823 | 824 | /*! 825 | * \brief Frame number. 826 | * 827 | * Dustin Jakes at NaturalPoint says this is undefined in live capture mode, 828 | * and is the actual frame number in playback mode. 829 | */ 830 | int frameNum() const { return _frameNum; } 831 | //! \brief All the sets of markers except unidentified ones. 832 | std::vector const& markerSets() const { return _markerSet; } 833 | //! \brief Set of unidentified markers. 834 | std::vector const& unIdMarkers() const { return _uidMarker; } 835 | //! \brief All the rigid bodies. 836 | std::vector const& rigidBodies() const { return _rBodies; } 837 | /*! 838 | * \brief Either latency or timecode for the current frame. 839 | * 840 | * Dustin Jakes at NaturalPoint says that this is an internal timecode from 841 | * Motive that represents the time at which the entire framegroup has 842 | * arrived from all the cameras. 843 | */ 844 | float latency() const { return _latency; } 845 | /*! 846 | * \brief SMTPE timecode and sub-timecode. 847 | * 848 | * \param timecode output timecode 849 | * \param subframe output subframe 850 | */ 851 | void timecode( uint32_t& timecode, uint32_t& subframe ) const 852 | { 853 | timecode = _timecode; 854 | subframe = _subTimecode; 855 | } 856 | /*! 857 | * \brief Timecode decoded. 858 | * 859 | * \param hour output timecode hour 860 | * \param minute output timecode minute 861 | * \param second output timecode second 862 | * \param frame output timecode frame 863 | * \param subFrame output timecode subframe 864 | */ 865 | void timecode( 866 | int& hour, 867 | int& minute, 868 | int& second, 869 | int& frame, 870 | int& subFrame 871 | ) const 872 | { 873 | hour = (_timecode>>24)&0xFF; 874 | minute = (_timecode>>16)&0xFF; 875 | second = (_timecode>>8)&0xFF; 876 | frame = _timecode&0xFF; 877 | subFrame = _subTimecode; 878 | } 879 | 880 | /*! 881 | * \brief Unpack frame data from a packed buffer 882 | * 883 | * \b WARNING: the NatNet version numbers must be correctly 884 | * specified in the constructor for this function to properly read the 885 | * data, as the data format depends on those version numbers. 886 | * 887 | * \param data input data buffer 888 | * \returns pointer to data immediately following the frame data 889 | */ 890 | char const* unpack(char const* data) 891 | { 892 | int i; 893 | int numUidMarkers; 894 | float x,y,z; 895 | 896 | //char const* const dataBeg = data; 897 | 898 | // NOTE: need to worry about network order here? 899 | 900 | // Get frame number. 901 | memcpy(&_frameNum, data, 4); data += 4; 902 | 903 | // Get marker sets. 904 | memcpy(&_numMarkerSets, data, 4); data += 4; 905 | for( i = 0; i < _numMarkerSets; ++i ) 906 | { 907 | MarkerSet set; 908 | data = set.unpack(data); 909 | _markerSet.push_back(set); 910 | } 911 | 912 | // Get unidentified markers. 913 | memcpy(&numUidMarkers,data,4); data += 4; 914 | for( i = 0; i < numUidMarkers; ++i ) 915 | { 916 | memcpy(&x,data,4); data += 4; 917 | memcpy(&y,data,4); data += 4; 918 | memcpy(&z,data,4); data += 4; 919 | _uidMarker.push_back(Point3f(x,y,z)); 920 | } 921 | 922 | // Get rigid bodies 923 | _numRigidBodies = 0; 924 | memcpy(&_numRigidBodies,data,4); data += 4; 925 | for( i = 0; i < _numRigidBodies; ++i ) 926 | { 927 | RigidBody b; 928 | data = b.unpack(data, _nnMajor, _nnMinor); 929 | _rBodies.push_back(b); 930 | } 931 | 932 | // Get skeletons (NatNet 2.1 and later) 933 | if( _nnMajor > 2 || (_nnMajor==2 && _nnMinor >= 1) ) 934 | { 935 | int numSkel = 0; 936 | memcpy(&numSkel,data,4); data += 4; 937 | for( i = 0; i < numSkel; ++i ) 938 | { 939 | Skeleton s; 940 | data = s.unpack( data, _nnMajor, _nnMinor ); 941 | _skel.push_back(s); 942 | } 943 | } 944 | 945 | // Get labeled markers (NatNet 2.3 and later) 946 | if( _nnMajor > 2 || (_nnMajor==2 && _nnMinor >= 3) ) 947 | { 948 | int numLabMark = 0; 949 | memcpy(&numLabMark,data,4); data += 4; 950 | for( i = 0; i < numLabMark; ++i ) 951 | { 952 | LabeledMarker lm; 953 | data = lm.unpack(data); 954 | _labeledMarkers.push_back(lm); 955 | } 956 | } 957 | 958 | // Get latency/timecode 959 | memcpy(&_latency,data,4); data += 4; 960 | 961 | // Get timecode 962 | memcpy(&_timecode,data,4); data += 4; 963 | memcpy(&_subTimecode,data,4); data += 4; 964 | 965 | // Get "end of data" tag 966 | int eod = 0; 967 | memcpy(&eod,data,4); data += 4; 968 | 969 | return data; 970 | } 971 | 972 | private: 973 | 974 | unsigned char _nnMajor; 975 | unsigned char _nnMinor; 976 | 977 | int _frameNum; 978 | int _numMarkerSets; 979 | // A list of marker sets. May subsume _numMarkerSets. 980 | std::vector _markerSet; 981 | // Set of unidentified markers. 982 | std::vector _uidMarker; 983 | int _numRigidBodies; 984 | // A list of rigid bodies. 985 | std::vector _rBodies; 986 | // A list of skeletons. 987 | std::vector _skel; 988 | // A list of labeled markers. 989 | std::vector _labeledMarkers; 990 | // Latency 991 | float _latency; 992 | // Timestamp; 993 | uint32_t _timecode; 994 | uint32_t _subTimecode; 995 | }; 996 | 997 | //! \brief For displaying human-readable MocapFrame data. 998 | std::ostream& operator<<(std::ostream& s, MocapFrame const& frame) 999 | { 1000 | size_t i, size; 1001 | std::ios::fmtflags flags = s.flags(); 1002 | 1003 | s 1004 | << "--Frame--" << std::endl 1005 | << " Frame #: " << frame.frameNum() << std::endl; 1006 | 1007 | std::vector const& markerSets = frame.markerSets(); 1008 | size = markerSets.size(); 1009 | 1010 | s 1011 | << " Marker Sets: " << size << std::endl; 1012 | for( i = 0; i < size; ++i ) 1013 | s << markerSets[i]; 1014 | 1015 | s 1016 | << " Unidentified Markers: " << frame.unIdMarkers().size() << std::endl; 1017 | 1018 | std::vector const& rBodies = frame.rigidBodies(); 1019 | size = rBodies.size(); 1020 | s 1021 | << " Rigid Bodies: " << size << std::endl; 1022 | for( i = 0; i < size; ++i ) 1023 | s << rBodies[i]; 1024 | 1025 | int hour,min,sec,fframe,subframe; 1026 | frame.timecode(hour,min,sec,fframe,subframe); 1027 | 1028 | s.setf( s.fixed, s.floatfield ); 1029 | s.precision(4); 1030 | s 1031 | << " Latency: " << frame.latency() << std::endl 1032 | << " Timecode: " << hour << ":" << min << ":" << sec << ":" << fframe << ":" << subframe << std::endl; 1033 | 1034 | s << "++Frame++" << std::endl; 1035 | 1036 | s.flags(flags); 1037 | return s; 1038 | } 1039 | 1040 | #endif /*NATNET_H*/ 1041 | -------------------------------------------------------------------------------- /include/NatNetLinux/NatNetPacket.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NatNetPacket.h is part of NatNetLinux, and is Copyright 2013-2014, 3 | * Philip G. Lee 4 | * 5 | * NatNetLinux is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * NatNetLinux is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with NatNetLinux. If not, see . 17 | */ 18 | 19 | #ifndef NATNETPACKET_H 20 | #define NATNETPACKET_H 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | 27 | /*! 28 | * \brief Encapsulates NatNet packets. 29 | * \author Philip G. Lee 30 | */ 31 | class NatNetPacket 32 | { 33 | public: 34 | 35 | #define MAX_PACKETSIZE 100000 36 | 37 | //! \brief Message types 38 | enum NatNetMessageID 39 | { 40 | NAT_PING = 0, 41 | NAT_PINGRESPONSE = 1, 42 | NAT_REQUEST = 2, 43 | NAT_RESPONSE = 3, 44 | NAT_REQUEST_MODELDEF = 4, 45 | NAT_MODELDEF = 5, 46 | NAT_REQUEST_FRAMEOFDATA = 6, 47 | NAT_FRAMEOFDATA = 7, 48 | NAT_MESSAGESTRING = 8, 49 | NAT_UNRECOGNIZED_REQUEST = 100 50 | }; 51 | 52 | //! \brief Default constructor. 53 | NatNetPacket() 54 | : _data(new char[MAX_PACKETSIZE+4]), _dataLen(MAX_PACKETSIZE+4) 55 | { 56 | } 57 | 58 | //! \brief Copy constructor. 59 | NatNetPacket( NatNetPacket const& other ) : 60 | _data(new char[other._dataLen]), _dataLen(other._dataLen) 61 | { 62 | memcpy( _data, other._data, other._dataLen ); 63 | } 64 | 65 | ~NatNetPacket() 66 | { 67 | delete[] _data; 68 | } 69 | 70 | //! \brief Assignment operator. Does deep copy. 71 | NatNetPacket& operator=( NatNetPacket const& other ) 72 | { 73 | // Careful with self-assignment 74 | if( _dataLen < other._dataLen ) 75 | { 76 | delete[] _data; 77 | _dataLen = other._dataLen; 78 | _data = new char[_dataLen]; 79 | // Can do memcpy, because we know the other isn't us. 80 | memcpy( _data, other._data, _dataLen ); 81 | } 82 | else 83 | memmove( _data, other._data, _dataLen ); 84 | 85 | return *this; 86 | } 87 | 88 | //! \brief Construct a "ping" packet. 89 | static NatNetPacket pingPacket() 90 | { 91 | NatNetPacket packet; 92 | 93 | uint16_t m = NAT_PING; 94 | uint16_t len = 0; 95 | 96 | *reinterpret_cast(packet._data) = m; 97 | *reinterpret_cast(packet._data+2) = len; 98 | 99 | return packet; 100 | } 101 | 102 | /*! 103 | * \brief Send packet over the series of tubes. 104 | * \param sd Socket to use (already bound to an address) 105 | */ 106 | int send(int sd) const 107 | { 108 | // Have to prepend '::' to avoid conflicting with NatNetPacket::send(). 109 | return ::send(sd, _data, 4+nDataBytes(), 0); 110 | } 111 | 112 | /*! \brief Send packet over the series of tubes. 113 | * \param sd Socket to use 114 | * \param destAddr Address to which to send the packet 115 | */ 116 | int send(int sd, struct sockaddr_in destAddr) const 117 | { 118 | return sendto(sd, _data, 4+nDataBytes(), 0, (sockaddr*)&destAddr, sizeof(destAddr)); 119 | } 120 | 121 | //! \brief Return a raw pointer to the packet data. Careful. 122 | char* rawPtr() 123 | { 124 | return _data; 125 | } 126 | 127 | const char* rawPtr() const 128 | { 129 | return _data; 130 | } 131 | 132 | const char* rawPayloadPtr() const 133 | { 134 | return _data+4; 135 | } 136 | 137 | /*! 138 | * \brief Maximum length of the underlying packet data. 139 | * 140 | * \c rawPtr()[\c maxLength()-1] should be a good dereference. 141 | */ 142 | size_t maxLength() const 143 | { 144 | return _dataLen; 145 | } 146 | 147 | //! \brief Get the message type. 148 | NatNetMessageID iMessage() const 149 | { 150 | unsigned short m = *reinterpret_cast(_data); 151 | return static_cast(m); 152 | } 153 | 154 | //! \brief Get the number of bytes in the payload. 155 | unsigned short nDataBytes() const 156 | { 157 | return *reinterpret_cast(_data+2); 158 | } 159 | 160 | /*! 161 | * \brief Read payload data. Const version. 162 | * \param offset payload byte offset 163 | */ 164 | template T const* read( size_t offset ) const 165 | { 166 | // NOTE: need to worry about network byte order? 167 | return reinterpret_cast(_data+4+offset); 168 | } 169 | 170 | /*! 171 | * \brief Read payload data. 172 | * \param offset payload byte offset 173 | */ 174 | template T* read( size_t offset ) 175 | { 176 | // NOTE: need to worry about network byte order? 177 | return reinterpret_cast(_data+4+offset); 178 | } 179 | 180 | private: 181 | 182 | char* _data; 183 | size_t _dataLen; 184 | 185 | #undef MAX_PACKETSIZE 186 | }; 187 | 188 | #endif /*NATNETPACKET_H*/ 189 | -------------------------------------------------------------------------------- /include/NatNetLinux/NatNetSender.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NatNetSender.h is part of NatNetLinux, and is Copyright 2013-2014, 3 | * Philip G. Lee 4 | * 5 | * NatNetLinux is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * NatNetLinux is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with NatNetLinux. If not, see . 17 | */ 18 | 19 | #ifndef NATNETSENDER_H 20 | #define NATNETSENDER_H 21 | 22 | #include 23 | #include 24 | 25 | /*! 26 | * \brief Encapsulates NatNet Sender packet data. 27 | * \author Philip G. Lee 28 | * 29 | * NatNet requires that servers respond with some basic information about 30 | * themselves. This class encapsulates that information. 31 | */ 32 | class NatNetSender 33 | { 34 | #define MAX_NAMELENGTH 256 35 | public: 36 | //! \brief Default constructor 37 | NatNetSender() 38 | { 39 | memset(_name, 0, MAX_NAMELENGTH); 40 | memset(_version, 0, 4); 41 | memset(_natNetVersion, 0, 4); 42 | } 43 | 44 | //! \brief Copy constructor 45 | NatNetSender( NatNetSender const& other ) 46 | { 47 | memcpy( _name, other._name, MAX_NAMELENGTH ); 48 | memcpy( _version, other._version, 4 ); 49 | memcpy( _natNetVersion, other._natNetVersion, 4 ); 50 | } 51 | 52 | ~NatNetSender(){} 53 | 54 | //! \brief Assignment operator 55 | NatNetSender& operator=( NatNetSender const& other ) 56 | { 57 | memmove( _name, other._name, MAX_NAMELENGTH ); 58 | memmove( _version, other._version, 4 ); 59 | memmove( _natNetVersion, other._natNetVersion, 4 ); 60 | return *this; 61 | } 62 | 63 | //! \brief Name of sending application. 64 | std::string name() const 65 | { 66 | return _name; 67 | } 68 | 69 | //! \brief Length 4 array version number of sending application (major.minor.build.revision) 70 | unsigned char const* version() const 71 | { 72 | return _version; 73 | } 74 | 75 | //! \brief Length 4 array version number of sending application's NatNet version (major.minor.build.revision) 76 | unsigned char const* natNetVersion() const 77 | { 78 | return _natNetVersion; 79 | } 80 | 81 | //! \brief Unpack the class from raw pointer. 82 | void unpack(char const* data) 83 | { 84 | // NOTE: do we have to worry about network order data? I.e. ntohs() and stuff? 85 | strncpy( _name, data, MAX_NAMELENGTH ); 86 | data += MAX_NAMELENGTH; 87 | _version[0] = data[0]; 88 | _version[1] = data[1]; 89 | _version[2] = data[2]; 90 | _version[3] = data[3]; 91 | _natNetVersion[0] = data[4]; 92 | _natNetVersion[1] = data[5]; 93 | _natNetVersion[2] = data[6]; 94 | _natNetVersion[3] = data[7]; 95 | } 96 | 97 | private: 98 | 99 | char _name[MAX_NAMELENGTH]; 100 | unsigned char _version[4]; 101 | unsigned char _natNetVersion[4]; 102 | 103 | #undef MAX_NAMELENGTH 104 | }; 105 | 106 | #endif /*NATNETSENDER_H*/ 107 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | ADD_EXECUTABLE( simple-example "SimpleExample.cpp" ) 3 | TARGET_LINK_LIBRARIES( simple-example ${Boost_LIBRARIES} ) 4 | -------------------------------------------------------------------------------- /src/SimpleExample.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * SimpleExample.cpp is part of NatNetLinux, and is Copyright 2013-2014, 3 | * Philip G. Lee 4 | * 5 | * NatNetLinux is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * NatNetLinux is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with NatNetLinux. If not, see . 17 | */ 18 | 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | #include 38 | #include 39 | 40 | class Globals 41 | { 42 | public: 43 | 44 | // Parameters read from the command line 45 | static uint32_t localAddress; 46 | static uint32_t serverAddress; 47 | 48 | // State of the main() thread. 49 | static bool run; 50 | }; 51 | uint32_t Globals::localAddress = 0; 52 | uint32_t Globals::serverAddress = 0; 53 | bool Globals::run = false; 54 | 55 | // End the program gracefully. 56 | void terminate(int) 57 | { 58 | // Tell the main() thread to close. 59 | Globals::run = false; 60 | } 61 | 62 | // Set the global addresses from the command line. 63 | void readOpts( int argc, char* argv[] ) 64 | { 65 | namespace po = boost::program_options; 66 | 67 | po::options_description desc("simple-example: demonstrates using NatNetLinux\nOptions"); 68 | desc.add_options() 69 | ("help", "Display help message") 70 | ("local-addr,l", po::value(), "Local IPv4 address") 71 | ("server-addr,s", po::value(), "Server IPv4 address") 72 | ; 73 | 74 | po::variables_map vm; 75 | po::store(po::parse_command_line(argc,argv,desc), vm); 76 | 77 | if( 78 | argc < 5 || vm.count("help") || 79 | !vm.count("local-addr") || 80 | !vm.count("server-addr") 81 | ) 82 | { 83 | std::cout << desc << std::endl; 84 | exit(1); 85 | } 86 | 87 | Globals::localAddress = inet_addr( vm["local-addr"].as().c_str() ); 88 | Globals::serverAddress = inet_addr( vm["server-addr"].as().c_str() ); 89 | } 90 | 91 | // This thread loop just prints frames as they arrive. 92 | void printFrames(FrameListener& frameListener) 93 | { 94 | bool valid; 95 | MocapFrame frame; 96 | Globals::run = true; 97 | while(Globals::run) 98 | { 99 | while( true ) 100 | { 101 | // Try to get a new frame from the listener. 102 | MocapFrame frame(frameListener.pop(&valid).first); 103 | // Quit if the listener has no more frames. 104 | if( !valid ) 105 | break; 106 | std::cout << frame << std::endl; 107 | } 108 | 109 | // Sleep for a little while to simulate work :) 110 | usleep(1000); 111 | } 112 | } 113 | 114 | // This thread loop collects inter-frame arrival statistics and prints a 115 | // histogram at the end. You can plot the data by copying it to a file 116 | // (say time.txt), and running gnuplot with the command: 117 | // gnuplot> plot 'time.txt' using 1:2 title 'Time Stats' with bars 118 | void timeStats(FrameListener& frameListener, const float diffMin_ms = 0.5, const float diffMax_ms = 7.0, const int bins = 100) 119 | { 120 | size_t hist[bins]; 121 | float diff_ms; 122 | int bin; 123 | struct timespec current; 124 | struct timespec prev; 125 | struct timespec tmp; 126 | 127 | std::cout << std::endl << "Collecting inter-frame arrival statistics...press ctrl-c to finish." << std::endl; 128 | 129 | memset(hist, 0x00, sizeof(hist)); 130 | bool valid; 131 | Globals::run = true; 132 | while(Globals::run) 133 | { 134 | while( true ) 135 | { 136 | // Try to get a new frame from the listener. 137 | prev = current; 138 | tmp = frameListener.pop(&valid).second; 139 | // Quit if the listener has no more frames. 140 | if( !valid ) 141 | break; 142 | 143 | current = tmp; 144 | 145 | diff_ms = 146 | std::abs( 147 | (static_cast(current.tv_sec)-static_cast(prev.tv_sec))*1000.f 148 | + (static_cast(current.tv_nsec)-static_cast(prev.tv_nsec))/1000000.f 149 | ); 150 | 151 | bin = (diff_ms-diffMin_ms)/(diffMax_ms-diffMin_ms) * (bins+1); 152 | if( bin < 0 ) 153 | bin = 0; 154 | else if( bin >= bins ) 155 | bin = bins-1; 156 | 157 | hist[bin] += 1; 158 | } 159 | 160 | // Sleep for a little while to simulate work :) 161 | usleep(1000); 162 | } 163 | 164 | // Print the stats 165 | std::cout << std::endl << std::endl; 166 | std::cout << "# Time diff (ms), Count" << std::endl; 167 | for( bin = 0; bin < bins; ++bin ) 168 | std::cout << diffMin_ms+(diffMax_ms-diffMin_ms)*(0.5f+bin)/bins << ", " << hist[bin] << std::endl; 169 | } 170 | 171 | int main(int argc, char* argv[]) 172 | { 173 | // Version number of the NatNet protocol, as reported by the server. 174 | unsigned char natNetMajor; 175 | unsigned char natNetMinor; 176 | 177 | // Sockets 178 | int sdCommand; 179 | int sdData; 180 | 181 | // Catch ctrl-c and terminate gracefully. 182 | signal(SIGINT, terminate); 183 | 184 | // Set addresses 185 | readOpts( argc, argv ); 186 | // Use this socket address to send commands to the server. 187 | struct sockaddr_in serverCommands = NatNet::createAddress(Globals::serverAddress, NatNet::commandPort); 188 | 189 | // Create sockets 190 | sdCommand = NatNet::createCommandSocket( Globals::localAddress ); 191 | sdData = NatNet::createDataSocket( Globals::localAddress ); 192 | 193 | // Start the CommandListener in a new thread. 194 | CommandListener commandListener(sdCommand); 195 | commandListener.start(); 196 | 197 | // Send a ping packet to the server so that it sends us the NatNet version 198 | // in its response to commandListener. 199 | NatNetPacket ping = NatNetPacket::pingPacket(); 200 | ping.send(sdCommand, serverCommands); 201 | 202 | // Wait here for ping response to give us the NatNet version. 203 | commandListener.getNatNetVersion(natNetMajor, natNetMinor); 204 | 205 | // Start up a FrameListener in a new thread. 206 | FrameListener frameListener(sdData, natNetMajor, natNetMinor); 207 | frameListener.start(); 208 | 209 | // This infinite loop simulates a "worker" thread that reads the frame 210 | // buffer each time through, and exits when ctrl-c is pressed. 211 | printFrames(frameListener); 212 | //timeStats(frameListener); 213 | 214 | // Wait for threads to finish. 215 | frameListener.stop(); 216 | commandListener.stop(); 217 | frameListener.join(); 218 | commandListener.join(); 219 | 220 | // Epilogue 221 | close(sdData); 222 | close(sdCommand); 223 | return 0; 224 | } 225 | --------------------------------------------------------------------------------