MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ textured_rect()

MAYAFLUX_API std::array< Kakshya::TextureQuadVertex, 4 > MayaFlux::Kinesis::textured_rect ( Kinesis::AABB2D  region)

Generate a UV-mapped TRIANGLE_STRIP quad from an AABB2D.

UV origin is bottom-left (0,1) matching Vulkan image layout. Replaces handwritten textured quad construction in Forma callers.

Parameters
regionNDC axis-aligned bounds.

Definition at line 758 of file GeometryPrimitives.cpp.

759{
760 return { {
761 { .position = { region.min.x, region.min.y, 0.F }, .texcoord = { 0.F, 1.F } },
762 { .position = { region.min.x, region.max.y, 0.F }, .texcoord = { 0.F, 0.F } },
763 { .position = { region.max.x, region.min.y, 0.F }, .texcoord = { 1.F, 1.F } },
764 { .position = { region.max.x, region.max.y, 0.F }, .texcoord = { 1.F, 0.F } },
765 } };
766}

References MayaFlux::Kinesis::AABB2D::max, MayaFlux::Kinesis::AABB2D::min, and textured_rect().

Referenced by textured_rect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: