### Setup Example and Link Plugins Source: https://github.com/pelicanmapping/osgearth/blob/master/src/applications/osgearth_viewerIOS/CMakeLists.txt Initializes an example setup for osgearth_viewer_ios and calls the macro to link static OSG plugins. ```cmake SETUP_EXAMPLE(osgearth_viewer_ios) LINK_OSG_STATIC_PLUGINS() ``` -------------------------------- ### xzx (from tvec3) Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a tvec3 from the x, z, and x components of a tvec3. ```APIDOC ## xzx (from tvec3) ### Description Creates a `glm::tvec3` from the `x`, `z`, and `x` components of a `glm::tvec3`. ### Function Signature `glm::tvec3 xzx(const glm::tvec3 &v)` ``` -------------------------------- ### xwzx Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a vec4 by selecting components x, w, z, x from the input vec4. ```APIDOC ## xwzx ### Description Creates a vec4 by selecting components x, w, z, x from the input vec4. ### Signature ```cpp template GLM_INLINE glm::tvec4 xwzx(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Returns A new vec4 with components rearranged as (v.x, v.w, v.z, v.x). ``` -------------------------------- ### Basic CMake Project Setup Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/glview/CMakeLists.txt Sets the minimum CMake version and project name. This is a standard starting point for most CMake projects. ```cmake cmake_minimum_required(VERSION 3.5) project(glview) ``` -------------------------------- ### wxzx Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Constructs a new tvec4 by selecting components from the input vector in the order: w, x, z, x. ```APIDOC ## wxzx ### Description Constructs a new tvec4 by selecting components from the input vector in the order: w, x, z, x. ### Signature ```cpp template GLM_INLINE glm::tvec4 wxzx(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Return Value A new tvec4 with components reordered as (v.w, v.x, v.z, v.x). ``` -------------------------------- ### Install Configuration Files Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/CMakeLists.txt Installs the TinyGLTF CMake configuration file into the 'cmake' directory of the installation prefix. ```cmake INSTALL ( FILES cmake/TinyGLTFConfig.cmake DESTINATION cmake ) ``` -------------------------------- ### xwxw Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a vec4 by selecting components x, w, x, w from the input vec4. ```APIDOC ## xwxw ### Description Creates a vec4 by selecting components x, w, x, w from the input vec4. ### Signature ```cpp template GLM_INLINE glm::tvec4 xwxw(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Returns A new vec4 with components rearranged as (v.x, v.w, v.x, v.w). ``` -------------------------------- ### Install Header Files Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/CMakeLists.txt Installs the necessary header files for TinyGLTF into the 'include' directory of the installation prefix. ```cmake INSTALL ( FILES json.hpp stb_image.h stb_image_write.h tiny_gltf.h DESTINATION include ) ``` -------------------------------- ### wxwx Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Constructs a new tvec4 by selecting components from the input vector in the order: w, x, w, x. ```APIDOC ## wxwx ### Description Constructs a new tvec4 by selecting components from the input vector in the order: w, x, w, x. ### Signature ```cpp template GLM_INLINE glm::tvec4 wxwx(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Return Value A new tvec4 with components reordered as (v.w, v.x, v.w, v.x). ``` -------------------------------- ### Installation Rule Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/glview/CMakeLists.txt Specifies that the 'glview' executable should be installed in the 'bin' directory. This defines where the built application will be placed after installation. ```cmake install ( TARGETS glview DESTINATION bin ) ``` -------------------------------- ### Build and Install osgEarth Source: https://github.com/pelicanmapping/osgearth/blob/master/docs/source/build.md Builds and installs osgEarth using CMake, targeting the INSTALL target. Use the 'RelWithDebInfo' configuration for a release build with debug symbols. ```bash cmake --build build --target INSTALL --config RelWithDebInfo ``` -------------------------------- ### xwwx Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a vec4 by selecting components x, w, w, x from the input vec4. ```APIDOC ## xwwx ### Description Creates a vec4 by selecting components x, w, w, x from the input vec4. ### Signature ```cpp template GLM_INLINE glm::tvec4 xwwx(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Returns A new vec4 with components rearranged as (v.x, v.w, v.w, v.x). ``` -------------------------------- ### yyxy Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Constructs a `tvec4` by selecting components from a `tvec2`, `tvec3`, or `tvec4`. For `tvec2`, it uses `v.y, v.y, v.x, v.y`. For `tvec3`, it uses `v.y, v.y, v.x, v.y`. For `tvec4`, it uses `v.y, v.y, v.x, v.y`. ```APIDOC ## yyxy ### Description Constructs a `tvec4` by selecting components from a `tvec2`, `tvec3`, or `tvec4`. ### Function Signature ```cpp template GLM_INLINE glm::tvec4 yyxy(const glm::tvec2& v); template GLM_INLINE glm::tvec4 yyxy(const glm::tvec3& v); template GLM_INLINE glm::tvec4 yyxy(const glm::tvec4& v); ``` ### Parameters - `v` (const glm::tvec2&, const glm::tvec3&, or const glm::tvec4&): The input vector. ### Return Value A `glm::tvec4` constructed from the specified components. ``` -------------------------------- ### Install Target Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/validator/CMakeLists.txt Installs the tinygltf-validator executable to the 'bin' directory. ```cmake install ( TARGETS tinygltf-validator DESTINATION bin ) ``` -------------------------------- ### www Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a tvec3 from the w, w, and w components of a tvec4. ```APIDOC ## www ### Description Creates a `glm::tvec3` by taking the `w`, `w`, and `w` components from a `glm::tvec4`. ### Signature ```cpp template GLM_INLINE glm::tvec3 www(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Return Value A `glm::tvec3` composed of the specified components. ``` -------------------------------- ### Subdirectory and Installation Configuration Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/CMakeLists.txt Adds the 'glm' and 'test' subdirectories to the build. It also sets the installation directory for GLM configuration files and conditionally installs the 'glm' directory. ```cmake add_subdirectory(glm) add_subdirectory(test) set(GLM_INSTALL_CONFIGDIR "${CMAKE_INSTALL_LIBDIR}/cmake/glm") if (GLM_INSTALL_ENABLE) install(DIRECTORY glm DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) endif() write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake" VERSION ${GLM_VERSION} COMPATIBILITY AnyNewerVersion) ``` -------------------------------- ### Install Package Configuration Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/CMakeLists.txt Installs the generated GLM package configuration files to the specified installation directory. This allows other projects to find and use GLM via CMake's find_package. ```cmake if (GLM_INSTALL_ENABLE) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${GLM_INSTALL_CONFIGDIR}/glmConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/glmConfigVersion.cmake" DESTINATION ${GLM_INSTALL_CONFIGDIR}) endif() ``` -------------------------------- ### xzx (from tvec4) Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a tvec3 from the x, z, and x components of a tvec4. ```APIDOC ## xzx (from tvec4) ### Description Creates a `glm::tvec3` from the `x`, `z`, and `x` components of a `glm::tvec4`. ### Function Signature `glm::tvec3 xzx(const glm::tvec4 &v)` ``` -------------------------------- ### Install Build Essentials on Linux Source: https://github.com/pelicanmapping/osgearth/blob/master/docs/source/build.md Installs the essential packages for building software on Ubuntu-based systems. ```bash sudo apt update && sudo apt install build-essential ``` -------------------------------- ### tmat2x3 Constructors Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00114_source.html Provides various constructors for initializing a tmat2x3 matrix, including default, copy, scalar, and component-wise initializations. ```APIDOC ## tmat2x3 Constructors ### Description Initializes a 2x3 matrix with different methods. ### Constructors - `tmat2x3()`: Default constructor. - `tmat2x3(tmat2x3 const & m)`: Copy constructor. - `template tmat2x3(tmat2x3 const & m)`: Constructor from a matrix with a different precision. - `GLM_CONSTEXPR_CTOR explicit tmat2x3(ctor)`: Constructor using a specific ctor tag. - `explicit tmat2x3(T scalar)`: Initializes all components to a scalar value. - `tmat2x3(T x0, T y0, T z0, T x1, T y1, T z1)`: Initializes with explicit component values. - `tmat2x3(col_type const & v0, col_type const & v1)`: Initializes with two column vectors. ``` -------------------------------- ### Install GDAL and GLEW on Linux Source: https://github.com/pelicanmapping/osgearth/blob/master/docs/source/build.md Installs the GDAL and GLEW development libraries required for building osgEarth. ```bash sudo apt-get install libgdal-dev sudo apt-get install libglew-dev ``` -------------------------------- ### xxz (from tvec3) Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a tvec3 from the x, x, and z components of a tvec3. ```APIDOC ## xxz (from tvec3) ### Description Creates a `glm::tvec3` from the `x`, `x`, and `z` components of a `glm::tvec3`. ### Function Signature `glm::tvec3 xxz(const glm::tvec3 &v)` ``` -------------------------------- ### wx Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a tvec2 from the w and x components of a tvec4. ```APIDOC ## wx ### Description Creates a `glm::tvec2` from the `w` and `x` components of a `glm::tvec4`. ### Function Signature `glm::tvec2 wx(const glm::tvec4 &v)` ``` -------------------------------- ### Install osgEarth with tools Source: https://github.com/pelicanmapping/osgearth/blob/master/docs/source/install.md Install osgEarth along with command-line tools like osgearth_imgui using vcpkg. ```default vcpkg install osgearth[tools]:x64-windows ``` -------------------------------- ### make_quat Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00123.html Builds a quaternion from a pointer to its elements. ```APIDOC ## make_quat ### Description Build a quaternion from a pointer. ### Signature ```cpp template GLM_FUNC_DECL tquat< T, defaultp > make_quat(T const * const ptr) ``` ### Parameters * **ptr** (T const * const) - Pointer to the quaternion elements. ``` -------------------------------- ### Install osgEarth with vcpkg Source: https://github.com/pelicanmapping/osgearth/blob/master/docs/source/install.md Use this command to install the osgEarth library using vcpkg for x64 Windows. ```default vcpkg install osgearth:x64-windows ``` -------------------------------- ### yyxx Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Constructs a `tvec4` by selecting components from a `tvec2`, `tvec3`, or `tvec4`. For `tvec2`, it uses `v.y, v.y, v.x, v.x`. For `tvec3`, it uses `v.y, v.y, v.x, v.x`. For `tvec4`, it uses `v.y, v.y, v.x, v.x`. ```APIDOC ## yyxx ### Description Constructs a `tvec4` by selecting components from a `tvec2`, `tvec3`, or `tvec4`. ### Function Signature ```cpp template GLM_INLINE glm::tvec4 yyxx(const glm::tvec2& v); template GLM_INLINE glm::tvec4 yyxx(const glm::tvec3& v); template GLM_INLINE glm::tvec4 yyxx(const glm::tvec4& v); ``` ### Parameters - `v` (const glm::tvec2&, const glm::tvec3&, or const glm::tvec4&): The input vector. ### Return Value A `glm::tvec4` constructed from the specified components. ``` -------------------------------- ### Enable Example Builds Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/CMakeLists.txt Defines a build option for examples and conditionally adds executables and subdirectories if the option is enabled. ```cmake option(TINYGLTF_BUILD_EXAMPLES "Build examples" ON) if (TINYGLTF_BUILD_EXAMPLES) ADD_EXECUTABLE ( loader_example loader_example.cc ) ADD_SUBDIRECTORY ( examples/gltfutil ) ADD_SUBDIRECTORY ( examples/glview ) ADD_SUBDIRECTORY ( examples/validator ) endif (TINYGLTF_BUILD_EXAMPLES) ``` -------------------------------- ### Install clang and libfuzzer on Ubuntu 18.04 Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/tests/fuzzer/README.md Installs the necessary clang and libfuzzer development packages for fuzzing tests on Ubuntu 18.04. ```bash $ sudo apt install clang++-8 $ sudo apt install libfuzzer-8-dev ``` -------------------------------- ### make_mat3 Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00123.html Builds a 3x3 matrix from a pointer to its elements. ```APIDOC ## make_mat3 ### Description Build a matrix from a pointer. ### Signature ```cpp template GLM_FUNC_DECL tmat3x3< T, defaultp > make_mat3(T const * const ptr) ``` ### Parameters * **ptr** (T const * const) - Pointer to the matrix elements. ``` -------------------------------- ### Install osgEarth SDK with vcpkg Source: https://github.com/pelicanmapping/osgearth/blob/master/README.md Use vcpkg to install the osgEarth SDK for x64 Windows. Include the 'tools' feature for additional utilities. ```bat vcpkg install osgearth:x64-windows vcpkg install osgearth[tools]:x64-windows ``` -------------------------------- ### Constructors Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00128_source.html Provides constructors for initializing tvec3 objects from other vector types, swizzle operations, and scalar values. ```APIDOC ## Constructors ### Description Initializes a `tvec3` object. ### Method Constructors ### Parameters - **v** (tvec4 const &) - Initializes from a tvec4. - **v** (tvec3 const &) - Initializes from another tvec3. - **that** (detail::_swizzle<3, T, P, glm::tvec3, E0, E1, E2, -1> const &) - Initializes from a 3-component swizzle. - **v** (detail::_swizzle<2, T, P, glm::tvec2, E0, E1, -1, -2> const &, T const & scalar) - Initializes from a 2-component swizzle and a scalar. - **scalar** (T const &), **v** (detail::_swizzle<2, T, P, glm::tvec2, E0, E1, -1, -2> const &) - Initializes from a scalar and a 2-component swizzle. ``` -------------------------------- ### xwyx Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a vec4 by selecting components x, w, y, x from the input vec4. ```APIDOC ## xwyx ### Description Creates a vec4 by selecting components x, w, y, x from the input vec4. ### Signature ```cpp template GLM_INLINE glm::tvec4 xwyx(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Returns A new vec4 with components rearranged as (v.x, v.w, v.y, v.x). ``` -------------------------------- ### Setup OSG Application Source: https://github.com/pelicanmapping/osgearth/blob/master/src/applications/osgearth_lod/CMakeLists.txt Configures the application build using a custom CMake macro. This macro likely handles common application setup tasks. ```cmake SETUP_APPLICATION(osgearth_lod) ``` -------------------------------- ### Configure and Install Pkg-Config File Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/CMakeLists.txt Generates and installs the pkg-config file for GLM. This enables projects that use pkg-config to easily find and link against the GLM library. ```cmake # build pkg-config file configure_file("./cmake/glm.pc.in" "glm.pc" @ONLY) # install pkg-config file if (GLM_INSTALL_ENABLE) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glm.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") endif() ``` -------------------------------- ### xwww Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a vec4 by selecting components x, w, w, w from the input vec4. ```APIDOC ## xwww ### Description Creates a vec4 by selecting components x, w, w, w from the input vec4. ### Signature ```cpp template GLM_INLINE glm::tvec4 xwww(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Returns A new vec4 with components rearranged as (v.x, v.w, v.w, v.w). ``` -------------------------------- ### xwxx Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a tvec4 from the x, w, x, and x components of a tvec4. ```APIDOC ## xwxx ### Description Creates a `glm::tvec4` by selecting the x, w, x, and x components from an input `glm::tvec4`. ### Parameters - `v` (const `glm::tvec4` &): The input vector. ### Returns A `glm::tvec4` with components rearranged as x, w, x, x. ``` -------------------------------- ### Install NVIDIA CUDA on WSL2 (Ubuntu) Source: https://github.com/pelicanmapping/osgearth/blob/master/docs/source/build.md Installs NVIDIA CUDA toolkit on WSL2 with Ubuntu, including steps for adding NVIDIA repositories and updating package lists. ```bash sudo apt-key del 7fa2af80 wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600 sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/3bf863cc.pub sudo add-apt-repository 'deb https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/ ' sudo apt-get update sudo apt-get -y install cuda ``` -------------------------------- ### Build and Install gltfutil Executable Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/gltfutil/CMakeLists.txt Finds all source files for the gltfutil project and adds them to the executable, including common sources. Finally, it installs the built executable to the bin directory. ```cmake file(GLOB gltfutil_sources *.cc *.h) add_executable(gltfutil ${gltfutil_sources} ../common/lodepng.cpp) install ( TARGETS gltfutil DESTINATION bin ) ``` -------------------------------- ### wyxy Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Constructs a new tvec4 by selecting components from the input vector in the order: w, y, x, y. ```APIDOC ## wyxy ### Description Constructs a new tvec4 by selecting components from the input vector in the order: w, y, x, y. ### Signature ```cpp template GLM_INLINE glm::tvec4 wyxy(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Return Value A new tvec4 with components reordered as (v.w, v.y, v.x, v.y). ``` -------------------------------- ### Add Interface Library and Install Targets Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/CMakeLists.txt Defines an INTERFACE library target for GLM and installs it along with its export file. This is used for modern CMake integration, especially with C++ projects. ```cmake if (NOT CMAKE_VERSION VERSION_LESS "3.0") add_library(glm INTERFACE) target_include_directories(glm INTERFACE $ $) install(TARGETS glm EXPORT glmTargets) export(EXPORT glmTargets FILE "${CMAKE_CURRENT_BINARY_DIR}/glmTargets.cmake") if (GLM_INSTALL_ENABLE) install(EXPORT glmTargets FILE glmTargets.cmake DESTINATION ${GLM_INSTALL_CONFIGDIR}) endif() endif() ``` -------------------------------- ### wxw Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a tvec3 from the w, x, and w components of a tvec4. ```APIDOC ## wxw ### Description Creates a `glm::tvec3` by taking the `w`, `x`, and `w` components from a `glm::tvec4`. ### Signature ```cpp template GLM_INLINE glm::tvec3 wxw(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Return Value A `glm::tvec3` composed of the specified components. ``` -------------------------------- ### wyxx Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Constructs a new tvec4 by selecting components from the input vector in the order: w, y, x, x. ```APIDOC ## wyxx ### Description Constructs a new tvec4 by selecting components from the input vector in the order: w, y, x, x. ### Signature ```cpp template GLM_INLINE glm::tvec4 wyxx(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Return Value A new tvec4 with components reordered as (v.w, v.y, v.x, v.x). ``` -------------------------------- ### XYZImage Layer Example Source: https://github.com/pelicanmapping/osgearth/blob/master/docs/source/xyz.md Configure an XYZImage layer to display map tiles from OpenStreetMap. This example uses a round-robin URL to distribute requests across multiple servers and specifies the 'spherical-mercator' profile. ```xml http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png spherical-mercator ©OpenStreetMap contributors ``` -------------------------------- ### axisAngle Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00066.html Gets the axis and angle of the rotation from a matrix. ```APIDOC ## axisAngle ### Description Gets the axis and angle of the rotation from a matrix. ### Signature ```cpp template void axisAngle(tmat4x4 const &mat, tvec3 &axis, T &angle) ``` ### Parameters * **mat** (tmat4x4 const &) - The input matrix. * **axis** (tvec3 &) - Output parameter for the rotation axis. * **angle** (T &) - Output parameter for the rotation angle. ``` -------------------------------- ### xwzw Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a vec4 by selecting components x, w, z, w from the input vec4. ```APIDOC ## xwzw ### Description Creates a vec4 by selecting components x, w, z, w from the input vec4. ### Signature ```cpp template GLM_INLINE glm::tvec4 xwzw(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Returns A new vec4 with components rearranged as (v.x, v.w, v.z, v.w). ``` -------------------------------- ### make_mat3x3 Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00123.html Builds a 3x3 matrix from a pointer to its elements. ```APIDOC ## make_mat3x3 ### Description Build a matrix from a pointer. ### Signature ```cpp template GLM_FUNC_DECL tmat3x3< T, defaultp > make_mat3x3(T const * const ptr) ``` ### Parameters * **ptr** (T const * const) - Pointer to the matrix elements. ``` -------------------------------- ### GLM Matrix Transformation Example Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/manual.md This example demonstrates creating a projection matrix using `glm::perspective` and applying translation and rotation transformations using `glm::translate` and `glm::rotate`. It combines core GLM features with extensions for matrix operations. ```cpp // Include GLM core features #include #include #include #include // Include GLM extensions #include glm::mat4 transform(glm::vec2 const& Orientation, glm::vec3 const& Translate, glm::vec3 const& Up) { glm::mat4 Proj = glm::perspective(glm::radians(45.f), 1.33f, 0.1f, 10.f); glm::mat4 ViewTranslate = glm::translate(glm::mat4(1.f), Translate); glm::mat4 ViewRotateX = glm::rotate(ViewTranslate, Orientation.y, Up); glm::mat4 View = glm::rotate(ViewRotateX, Orientation.x, Up); glm::mat4 Model = glm::mat4(1.0f); return Proj * View * Model; } ``` -------------------------------- ### glm::row (get) Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00166.html Retrieves a specific row from a matrix. ```APIDOC ## glm::row (get) ### Description Get a specific row of a matrix. ### Signature ```cpp template genType::row_type glm::row(genType const & m, length_t index) ``` ### Parameters - `m` (genType const &): The input matrix. - `index` (length_t): The index of the row to retrieve. ``` -------------------------------- ### wxzw Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Constructs a new tvec4 by selecting components from the input vector in the order: w, x, z, w. ```APIDOC ## wxzw ### Description Constructs a new tvec4 by selecting components from the input vector in the order: w, x, z, w. ### Signature ```cpp template GLM_INLINE glm::tvec4 wxzw(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Return Value A new tvec4 with components reordered as (v.w, v.x, v.z, v.w). ``` -------------------------------- ### wxww Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Constructs a new tvec4 by selecting components from the input vector in the order: w, x, w, w. ```APIDOC ## wxww ### Description Constructs a new tvec4 by selecting components from the input vector in the order: w, x, w, w. ### Signature ```cpp template GLM_INLINE glm::tvec4 wxww(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Return Value A new tvec4 with components reordered as (v.w, v.x, v.w, v.w). ``` -------------------------------- ### glm::column (get) Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00166.html Retrieves a specific column from a matrix. ```APIDOC ## glm::column (get) ### Description Get a specific column of a matrix. ### Signature ```cpp template genType::col_type glm::column(genType const & m, length_t index) ``` ### Parameters - `m` (genType const &): The input matrix. - `index` (length_t): The index of the column to retrieve. ``` -------------------------------- ### Setup Application Source: https://github.com/pelicanmapping/osgearth/blob/master/src/applications/osgearth_backfill/CMakeLists.txt Uses a CMake macro to set up the application target. ```cmake SETUP_APPLICATION(osgearth_backfill) ``` -------------------------------- ### xxx (from tvec3) Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a tvec3 by duplicating the x component of a tvec3. ```APIDOC ## xxx (from tvec3) ### Description Creates a `glm::tvec3` by duplicating the `x` component of a `glm::tvec3`. ### Function Signature `glm::tvec3 xxx(const glm::tvec3 &v)` ``` -------------------------------- ### zyxx (tvec4 overload) Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a new tvec4 by taking the z, y, x, and x components of the input tvec4 v. ```APIDOC ## zyxx (tvec4 overload) ### Description Creates a new `glm::tvec4` by taking the z, y, x, and x components of the input `glm::tvec4` `v`. ### Signature ```cpp template GLM_INLINE glm::tvec4 zyxx(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Return Value A `glm::tvec4` constructed from the specified components of `v`. ``` -------------------------------- ### glm::column Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00062_source.html Provides functionality to get or set a specific column of a matrix. ```APIDOC ## glm::column ### Description Get a specific column of a matrix or set a specific column to a matrix. ### Function Signatures 1. `template typename genType::col_type column(genType const & m, length_t index);` - Retrieves a specific column from the matrix. 2. `template genType column(genType const & m, length_t index, typename genType::col_type const & x);` - Sets a specific column of the matrix to the provided vector `x`. ### Parameters - `m` (genType const &): The input matrix. - `index` (length_t): The index of the column to access or modify. - `x` (typename genType::col_type const &): The vector to set as the new column (for the setting overload). ``` -------------------------------- ### xwwz Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a vec4 by selecting components x, w, w, z from the input vec4. ```APIDOC ## xwwz ### Description Creates a vec4 by selecting components x, w, w, z from the input vec4. ### Signature ```cpp template GLM_INLINE glm::tvec4 xwwz(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Returns A new vec4 with components rearranged as (v.x, v.w, v.w, v.z). ``` -------------------------------- ### glm::row Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00062_source.html Provides functionality to get or set a specific row of a matrix. ```APIDOC ## glm::row ### Description Get a specific row of a matrix or set a specific row to a matrix. ### Function Signatures 1. `template typename genType::row_type row(genType const & m, length_t index);` - Retrieves a specific row from the matrix. 2. `template genType row(genType const & m, length_t index, typename genType::row_type const & x);` - Sets a specific row of the matrix to the provided vector `x`. ### Parameters - `m` (genType const &): The input matrix. - `index` (length_t): The index of the row to access or modify. - `x` (typename genType::row_type const &): The vector to set as the new row (for the setting overload). ``` -------------------------------- ### bitfieldExtract Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00033.html Extracts a specified number of bits from a value starting at a given offset. ```APIDOC ## bitfieldExtract ### Description Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of the result. ### Signature ```cpp template class vecType> vecType< T, P > bitfieldExtract(vecType< T, P > const &Value, int Offset, int Bits) ``` ### Parameters * **Value**: The source vector. * **Offset**: The starting bit position for extraction. * **Bits**: The number of bits to extract. ### Returns A vector containing the extracted bits in the least significant positions. ``` -------------------------------- ### make_mat2x3 Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00123.html Builds a 2x3 matrix from a pointer to its elements. ```APIDOC ## make_mat2x3 ### Description Build a matrix from a pointer. ### Signature ```cpp template GLM_FUNC_DECL tmat2x3< T, defaultp > make_mat2x3(T const * const ptr) ``` ### Parameters * **ptr** (T const * const) - Pointer to the matrix elements. ``` -------------------------------- ### glm::bitfieldExtract Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00033_source.html Extracts a specified number of bits from a value starting at a given offset. ```APIDOC ## glm::bitfieldExtract ### Description Extracts bits [offset, offset + bits - 1] from value, returning them in the least significant bits of the result. ### Method GLM_FUNC_DECL ### Parameters - **Value** (vecType< T, P > const &) - The value from which to extract bits. - **Offset** (int) - The starting bit position for extraction (0-based). - **Bits** (int) - The number of bits to extract. ``` -------------------------------- ### xzy (from tvec3) Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a tvec3 from the x, z, and y components of a tvec3. ```APIDOC ## xzy (from tvec3) ### Description Creates a `glm::tvec3` from the `x`, `z`, and `y` components of a `glm::tvec3`. ### Function Signature `glm::tvec3 xzy(const glm::tvec3 &v)` ``` -------------------------------- ### tmat3x2 Constructors Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00116_source.html Provides various constructors for initializing a tmat3x2 object, including default, copy, scalar, and vector-based initializations. ```APIDOC ## tmat3x2 Constructors ### Description Initializes a 3x2 matrix. ### Constructors - `tmat3x2()`: Default constructor. - `tmat3x2(tmat3x2 const & m)`: Copy constructor. - `template tmat3x2(tmat3x2 const & m)`: Constructor from a matrix with a different precision. - `explicit tmat3x2(ctor)`: Constructor using a specific constructor tag. - `explicit tmat3x2(T scalar)`: Constructor initializing all elements with a scalar value. - `tmat3x2(T x0, T y0, T x1, T y1, T x2, T y2)`: Constructor initializing with individual scalar values for each element. - `tmat3x2(col_type const & v0, col_type const & v1, col_type const & v2)`: Constructor initializing with column vectors. ``` -------------------------------- ### Get Matrix Column Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00062_source.html Retrieves a specific column from a matrix. Requires the matrix and the column index. ```cpp template typename genType::col_type column( genType const & m, length_t index); ``` -------------------------------- ### Get Matrix Row Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00062_source.html Retrieves a specific row from a matrix. Requires the matrix and the row index. ```cpp template typename genType::row_type row( genType const & m, length_t index); ``` -------------------------------- ### xyx (from tvec3) Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a tvec3 from the x, y, and x components of a tvec3. ```APIDOC ## xyx (from tvec3) ### Description Creates a `glm::tvec3` from the `x`, `y`, and `x` components of a `glm::tvec3`. ### Function Signature `glm::tvec3 xyx(const glm::tvec3 &v)` ``` -------------------------------- ### tmat3x3 Constructors Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00117_source.html Various constructors for initializing a 3x3 matrix, including default, copy, scalar, and vector-based initializations. ```APIDOC ## tmat3x3 Constructors ### Default Constructor ```cpp tmat3x3() GLM_DEFAULT_CTOR; ``` ### Copy Constructor ```cpp tmat3x3(tmat3x3 const & m) GLM_DEFAULT; ``` ### Template Constructor (Precision) ```cpp template tmat3x3(tmat3x3 const & m); ``` ### Ctor Constructor ```cpp GLM_CONSTEXPR_CTOR explicit tmat3x3(ctor); ``` ### Scalar Constructor ```cpp explicit tmat3x3(T scalar); ``` ### Scalar Element Constructor ```cpp tmat3x3( T x0, T y0, T z0, T x1, T y1, T z1, T x2, T y2, T z2); ``` ### Column Vector Constructor ```cpp tmat3x3( col_type const & v0, col_type const & v1, col_type const & v2); ``` ``` -------------------------------- ### Add osgearth_collecttriangles Application Source: https://github.com/pelicanmapping/osgearth/blob/master/src/applications/osgearth_collecttriangles/CMakeLists.txt Configures the build for the osgearth_collecttriangles application, linking against osgEarthImGui and placing it in the Examples folder. ```cmake add_osgearth_app( TARGET osgearth_collecttriangles SOURCES osgearth_collecttriangles.cpp LIBRARIES osgEarthImGui FOLDER Examples ) ``` -------------------------------- ### Find Triton Package Source: https://github.com/pelicanmapping/osgearth/blob/master/src/osgEarthTriton/CMakeLists.txt This command finds the required Triton package. Ensure Triton is installed and discoverable by CMake. ```cmake find_package(Triton REQUIRED) ``` -------------------------------- ### tmat2x2 Constructors Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00113_source.html Various constructors for initializing a 2x2 matrix, including default, copy, scalar, and vector-based initializations. ```APIDOC ## tmat2x2 Constructors Constructors for initializing a 2x2 matrix. ### Default Constructor ```cpp tmat2x2() GLM_DEFAULT_CTOR; ``` ### Copy Constructor ```cpp tmat2x2(tmat2x2 const & m) GLM_DEFAULT; ``` ### Precision Conversion Constructor ```cpp template tmat2x2(tmat2x2 const & m); ``` ### Explicit Constructor with ctor ```cpp GLM_CONSTEXPR_CTOR explicit tmat2x2(ctor); ``` ### Scalar Constructor ```cpp explicit tmat2x2(T scalar); ``` ### Scalar Element Constructor ```cpp tmat2x2( T const & x1, T const & y1, T const & x2, T const & y2); ``` ### Column Vector Constructor ```cpp tmat2x2( col_type const & v1, col_type const & v2); ``` ``` -------------------------------- ### GDAL Elevation Layer in osgEarth 3.x Source: https://github.com/pelicanmapping/osgearth/blob/master/docs/source/3.0_upgrade_guide.md Example of defining an explicit GDAL elevation layer in osgEarth 3.x. ```xml dem.tif ``` -------------------------------- ### xwzz Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a vec4 by selecting components x, w, z, z from the input vec4. ```APIDOC ## xwzz ### Description Creates a vec4 by selecting components x, w, z, z from the input vec4. ### Signature ```cpp template GLM_INLINE glm::tvec4 xwzz(const glm::tvec4 &v) ``` ### Parameters * `v` (const glm::tvec4&): The input vector. ### Returns A new vec4 with components rearranged as (v.x, v.w, v.z, v.z). ``` -------------------------------- ### glm::make_quat Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00123_source.html Builds a tquat from a pointer. ```APIDOC ## glm::make_quat ### Description Builds a tquat from a pointer. ### Signature ```cpp template tquat glm::make_quat(const T * const ptr); ``` ``` -------------------------------- ### GDAL Image Layer in osgEarth 3.x Source: https://github.com/pelicanmapping/osgearth/blob/master/docs/source/3.0_upgrade_guide.md Example of defining an explicit GDAL image layer in osgEarth 3.x. ```xml file.tif ``` -------------------------------- ### zyxx (tvec3 overload) Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00135_source.html Creates a new tvec4 by taking the z, y, x, and x components of the input tvec3 v. ```APIDOC ## zyxx (tvec3 overload) ### Description Creates a new `glm::tvec4` by taking the z, y, x, and x components of the input `glm::tvec3` `v`. ### Signature ```cpp template GLM_INLINE glm::tvec4 zyxx(const glm::tvec3 &v) ``` ### Parameters * `v` (const glm::tvec3&): The input vector. ### Return Value A `glm::tvec4` constructed from the specified components of `v`. ``` -------------------------------- ### ortho Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00071_source.html Creates an orthographic projection matrix. This is commonly used for 2D rendering or specific 3D camera setups. ```APIDOC ## ortho ### Description Creates an orthographic projection matrix. ### Signature ```cpp template tmat4x4 ortho(T left, T right, T bottom, T top, T zNear, T zFar); ``` ### Parameters * `left`: The distance to the left clipping plane. * `right`: The distance to the right clipping plane. * `bottom`: The distance to the bottom clipping plane. * `top`: The distance to the top clipping plane. * `zNear`: The distance to the near clipping plane. * `zFar`: The distance to the far clipping plane. ``` ```APIDOC ## ortho ### Description Creates an orthographic projection matrix with default near and far clipping planes. ### Signature ```cpp template tmat4x4 ortho(T left, T right, T bottom, T top); ``` ### Parameters * `left`: The distance to the left clipping plane. * `right`: The distance to the right clipping plane. * `bottom`: The distance to the bottom clipping plane. * `top`: The distance to the top clipping plane. ``` -------------------------------- ### Setting CMake Prefix Path Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/glview/CMakeLists.txt Configures the search path for CMake packages. This helps CMake find installed libraries. ```cmake set ( CMAKE_PREFIX_PATH cmake ) ``` -------------------------------- ### make_mat3x2 Source: https://github.com/pelicanmapping/osgearth/blob/master/src/third_party/tinygltf/examples/common/glm/doc/api/a00123.html Builds a 3x2 matrix from a pointer to its elements. ```APIDOC ## make_mat3x2 ### Description Build a matrix from a pointer. ### Signature ```cpp template GLM_FUNC_DECL tmat3x2< T, defaultp > make_mat3x2(T const * const ptr) ``` ### Parameters * **ptr** (T const * const) - Pointer to the matrix elements. ```