These examples are intended to provide a series of example programs that show how to use the UF library. Generally they mirror or extend the tests in the UF library. However there are also extra examples present that may or may not use the UF library. A case in point is ReadXYZRGB. If you have any questions please contact Andrew Maclean.
| Subdirectory | Functional Area. |
|---|---|
| Colour | Manipulates RGB values. |
| ColourPickerComboBox | An MFC application that shows how to manipulate the various functions in the Color classes. It also demonstrates how to derive from CComboBox to produce a combo box with named colour patches and how to derive from CEdit to produce a coloured edit control. |
| Conversions | Shows how to effect conversions for output, translating between different formats, rotations and homogenous coordinates. |
| CSVParser | Demonstrates a comma-separated value parser. |
| CuboidDecomposition | Shows the decomposition of a cuboid into tetrahedera. |
| DateTime | Demonstrates date, system time and time conversions. |
| DTM | Digital Terrain Modelling - routines for calculating volume. |
| FileUtilities | Demonstrates how to search for a file and list all files in directories. It will recursively search subdirectories. |
| GeographicConversions | Demonstrates conversions to and from the various geographic coordinate systems in use. |
| GPSNavigation | Demonstrates how to store and hold routes, points and tracks. |
| GPSParser | Demonstrates parsing and producing NMEA messages. |
| Logger | Demonstrates how to log data to/from files. |
| ReadXYZRGB | Reads a text file containing particle positions and their RGB colour value. It produces an output file and also displays the data. |
| Statistics | Demonstrates some statistical routines. |
When using the library, note that all the library .h and .cpp files are prefixed with "uf". Thus is it easy to identify the headers and libraries that belong to this collection of libraries.
This code will compile in Windows, Linux and QNX. What is actually compiles is determined by the following factors:
| MyDevelopmentPath | /UF |
| /UFBuild | |
| /UFExamplesBuild |
| CMAKE_INSTALL_PREFIX | /bin |
| /include/uf-x.y | |
| /lib | |
| /lib/uf-x.y |
Where CMAKE_INSTALL_PREFIX is /usr/local in Linux or c:\Program Files\uf in Windows by default.
The CMakeLists.txt file in this directory will show you how to incorporate this library in your own code. This file requires FindUF.cmake to locate the UF library and to set the include and linker paths correctly. It also uses the values of UF_USE_BOOST and UF_USE_VTK to determine if Boost and VTK are needed.
If you get an error regarding Boost, edit CMakeLists.txt to relfect the path to where BoostConfig.cmake is, or copy BoostConfig.cmake to the examples directory and modify the path to find it in the CMakeLists.txt file accordingly. Currently the path is set to ${PROJECT_SOURCE_DIR}/.. because this directory is a subdirectory of UF.
If in Linux, cd to UFExamplesBuild and type ccmake ../UF/Examples. If UF is not found you will get a message to that effect. Then just set UF_DIR to MyDevelopmentPath/BuildUF or to CMAKE_INSTALL_PREFIX/lib/uf-x.y. Press "c" and finally "g". Make sure you are in the directory and then type make and finally make install.
If you are in Windows, the procedure is similar to that in Linux except it is GUI based when using CMake. IF you are using Visual Studio, then right-click on ALL_BUILD and select build. Finally right-click on INSTALL and select build.