|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
Linear map from layout pixels to whatever space the vertices are drawn in. More...
#include <GlyphMesh.hpp>
Collaboration diagram for MayaFlux::Portal::Text::GlyphMap:Public Member Functions | |
| glm::vec2 | operator() (glm::vec2 px) const noexcept |
Static Public Member Functions | |
| static GlyphMap | fit (Kinesis::AABB2D region, glm::vec2 source_px) noexcept |
Map layout pixels [0, source_px] onto region, y flipped. | |
Public Attributes | |
| glm::vec2 | origin { 0.F } |
| glm::vec2 | scale { 1.F } |
Linear map from layout pixels to whatever space the vertices are drawn in.
lay_out() places glyphs in pixels with y growing downward. A map takes such a point to output space as origin + pixel * scale, so one set of quads can be drawn in NDC, a world plane or any other space by choosing the map. Glyphs land on whole output pixels when scale is one pixel of that space and origin lies on a pixel boundary.
Definition at line 21 of file GlyphMesh.hpp.