MayaFlux 0.4.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 698 of file GeometryPrimitives.cpp.

699{
700 return { {
701 { .position = { region.min.x, region.min.y, 0.F }, .texcoord = { 0.F, 1.F } },
702 { .position = { region.min.x, region.max.y, 0.F }, .texcoord = { 0.F, 0.F } },
703 { .position = { region.max.x, region.min.y, 0.F }, .texcoord = { 1.F, 1.F } },
704 { .position = { region.max.x, region.max.y, 0.F }, .texcoord = { 1.F, 0.F } },
705 } };
706}

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: