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'.
GLM 1.0.1 headers packaged for R under the MIT license. No compiled library
is installed. The package name distinguishes it from R's
stats::glm() function.
Add this to a consuming package's DESCRIPTION:
LinkingTo: glmheaders (>= 1.0.1-1)
Then use the normal upstream includes:
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
R supplies the include path during installation; no custom linker flags,
OpenGL installation, or runtime R dependency is needed. Headers are available
at system.file("include", package = "glmheaders") for standalone tooling.
GLM configuration macros remain under the consuming package's control.
Source provenance and the unmodified upstream license are installed under
COPYRIGHTS and COPYING. With the suggested Rcpp package and a working C++
compiler, run the following to compile and exercise vectors, matrix inversion,
and quaternions using the installed headers:
glmheaders::glmheaders_test()
The function returns TRUE when all numerical checks pass. This small testing
interface is the only exported R function; the package primarily supplies
headers for other packages.