Ezgl & Ezmath

Modern C++ libraries that make usual 3D OpenGL tasks much easier (for debugging purposes, it’s not meant to be super fast).

Ezgl provides easy to use windows, input handling, render functions, mesh structure, OpenGL state stacks, camera controllers, etc.

Ezmath provides a lot of functions to compute 3D geometry operations, and functions for intersections, containment, distances and closest points between primitives (all-to-all). (I am still completing the list but it’s almost done, I even have a spreadsheet to know what is missing https://docs.google.com/spreadsheets/d/1MR_JBbQN7h5CyR-pfBZgfmnYJDQoR8QSRqpkdqLP2d4/edit?usp=sharing).

Source code is on github:

Here are intersection videos. The purple segments you see is the shortest segment connecting all primitives (from it you can compute the distance). Green primitive means no intersection, yellow means intersection and red means contained

For 2D version we have: point, line, ray, segment, aarect, rect, circle, capsule, triangle.

 

This is the incomplete 3D version, we have: point, line, ray, segment, plane, aabox, box, sphere (missing capsule, cylinder(this one is the hardest) and triangle).

Text in ezgl