aboutsummaryrefslogtreecommitdiff
path: root/src/o3d/tri.hpp
Commit message (Collapse)AuthorAgeFilesLines
* rewrote entirely the triangle clipping algorithmvimene2026-01-151-2/+2
| | | | | | | | | | | | | | | | | | | There is still a lot of work needed to refactor it properly. - use the Sutherland–Hodgman algorithm, with some minor changes - made clipping more general, allowing clipping of any coordinate, before and after division by w - compute the z coordinate only at the fragment stage instead of each time clipping creates / moves a vertex, in addition to the fragment stage - added VectorCoords to choose at compile-time different coordinates based on a template argument - added transpose struct to allow shuffling of vectors coordinates - added math::utils::lerp which interpolate linearly a float - added Vector{2,3,4}::map() which maps a vector from one range to another - added template parameter to DerivedVertex (and therefore TriangleDerived) to allow choosing which dimension to use
* fixed wrong header guardvimene2026-01-121-3/+3
|
* renamed .h to .hppvimene2025-12-101-0/+22