glm

C++ mathematics library for graphics software and transformations

brewmacoslinux
Try with needOr install directly
Source

About

C++ mathematics library for graphics software

Commands

glm

Examples

Include GLM headers in C++ project for vector and matrix operations$ #include <glm/glm.hpp> glm::vec3 position(1.0f, 2.0f, 3.0f);
Use GLM for 3D transformations like rotation and translation$ glm::mat4 transform = glm::translate(glm::mat4(1.0f), glm::vec3(1.0f, 2.0f, 3.0f));
Perform matrix multiplication for graphics calculations$ glm::vec4 result = projectionMatrix * viewMatrix * modelMatrix * vertexPosition;