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

◆ window_coords() [4/4]

MAYAFLUX_API glm::vec2 MayaFlux::window_coords ( double  ndc_x,
double  ndc_y,
double  ndc_z,
uint32_t  window_width,
uint32_t  window_height 
)

Convert NDC coordinates to window pixel coordinates.

Parameters
ndc_xX coordinate in NDC space [-1, +1]
ndc_yY coordinate in NDC space [-1, +1] (center origin, +Y up)
ndc_zZ coordinate (ignored, accepted for convenience when passing vec3)
window_widthWindow width in pixels
window_heightWindow height in pixels
Returns
Window coordinates in pixels (top-left origin, +Y down)

Inverse of normalize_coords(). Z coordinate is ignored.

Definition at line 33 of file Windowing.cpp.

35{
36 return Kinesis::to_window({ static_cast<float>(ndc_x), static_cast<float>(ndc_y), static_cast<float>(ndc_z) },
37 window_width, window_height);
38}

References MayaFlux::Kinesis::to_window().

+ Here is the call graph for this function: