Commit d67fd4bf authored by Julius Nehring-Wirxel's avatar Julius Nehring-Wirxel

Moved hacks to experimental header and namespace.

parent 95548646
#pragma once
#include <glow-extras/viewer/view.hh>
namespace glow::viewer::experimental
{
/// Query the 3D position at the given pixel, only usable in interactive viewers
inline tg::optional<tg::pos3> interactive_get_position(int x, int y) { return detail::query_current_viewer_3d_position(x, y); }
/// Query the 3D position at the given pixel, only usable in interactive viewers
inline tg::optional<tg::pos3> interactive_get_position(tg::pos2 const pos) { return interactive_get_position(pos.x, pos.y); }
/// Get the window size, only usable in interactive viewers
inline tg::isize2 interactive_get_window_size() { return detail::query_current_viewer_window_size(); }
/// Get the last valid mouse postition, only usable in interactive viewers.
inline tg::pos2 interactive_get_mouse_position() { return detail::query_mouse_position(); }
}
......@@ -303,24 +303,13 @@ detail::raii_view_closer view_cleared(Args&&... args)
// Only functional inside ::interactive
inline void view_clear_accumulation() { detail::submit_command(detail::command::sceneClearAccum()); }
/// Query the 3D position at the given pixel, only usable in interactive viewers
inline tg::optional<tg::pos3> interactive_get_position(int x, int y) { return detail::query_current_viewer_3d_position(x, y); }
/// Query the 3D position at the given pixel, only usable in interactive viewers
inline tg::optional<tg::pos3> interactive_get_position(tg::pos2 const pos) { return interactive_get_position(pos.x, pos.y); }
/// Get the window size, only usable in interactive viewers
inline tg::isize2 interactive_get_window_size() { return detail::query_current_viewer_window_size(); }
/// Get the last valid mouse postition, only usable in interactive viewers.
inline tg::pos2 interactive_get_mouse_position() { return detail::query_mouse_position(); }
/// Makes a screenshot of the current scene, only usable in interactive viewers
inline void make_screenshot(std::string const& filename, int w = -1, int h = -1, int accumulationCount = 128)
{
detail::make_screenshot(filename, w, h, accumulationCount);
}
namespace detail
{
/// Internal use only, returns all currently registered fonts, {name, path}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment