Package 'glmheaders'

Title: 'OpenGL Mathematics' 'C++' Headers
Description: Provides the header-only 'OpenGL Mathematics' (GLM) 'C++' library for numerical computations in graphics and geometry <https://github.com/g-truc/glm>. Includes vector and matrix types, coordinate transformations, quaternions, and geometric functions following the conventions of the 'OpenGL Shading Language'.
Authors: Tyler Morgan-Wall [aut, cre] (ORCID: <https://orcid.org/0000-0002-3131-3814>), G-Truc Creation [aut, cph] (GLM library)
Maintainer: Tyler Morgan-Wall <[email protected]>
License: MIT + file LICENSE
Version: 1.0.1-2
Built: 2026-11-16 06:17:37 UTC
Source: https://github.com/tylermorganwall/glmheaders

Help Index


OpenGL Mathematics C++ Headers

Description

Provides GLM 1.0.1 headers for C++ vector, matrix, quaternion, and geometric computations. No compiled library is installed.

Details

Add glmheaders to the LinkingTo field of a consuming package's DESCRIPTION file and include <glm/glm.hpp> in its C++ source. The include directory can also be located with system.file("include", package = "glmheaders"). An OpenGL installation is not required. The MIT license option is used. The glmheaders_test function compiles and runs a small check of the installed headers using the suggested Rcpp package and a C++ compiler.

Author(s)

G-Truc Creation (GLM); Tyler Morgan-Wall (R packaging).

References

https://github.com/g-truc/glm


Test the Installed GLM Headers

Description

Compile and run a small check of GLM vector, matrix, and quaternion operations to verify that the installed headers can be used from C++.

Usage

glmheaders_test()

Details

Requires the suggested package Rcpp and a working C++ compiler. The test program is compiled in a temporary directory when this function is called. The package itself remains header only and does not compile a shared library during installation.

Value

A single logical value: TRUE if all numerical checks pass and FALSE otherwise. Compilation failures raise an error.

Examples

# Verify that the installed headers produce the expected geometric results.
stopifnot(glmheaders_test())