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

◆ to_ndc()

glm::vec2 MayaFlux::Portal::Forma::Context::to_ndc ( double  px,
double  py 
) const
privatenoexcept

Definition at line 254 of file Context.cpp.

255{
256 const auto& s = m_window->get_state();
257 return {
258 (static_cast<float>(px) / static_cast<float>(s.current_width)) * 2.0F - 1.0F,
259 1.0F - (static_cast<float>(py) / static_cast<float>(s.current_height)) * 2.0F
260 };
261}
std::shared_ptr< Core::Window > m_window
Definition Context.hpp:247

Referenced by handle_drag(), handle_move(), handle_press(), handle_release(), and handle_scroll().

+ Here is the caller graph for this function: