37 #ifndef H_SKIN_IMGUI_RENDER_AREA_H
38 #define H_SKIN_IMGUI_RENDER_AREA_H
128 const std::string& filename,
bool make_current =
true,
129 bool with_gui =
false
180 return frame_buffer_width_;
188 return frame_buffer_height_;
307 return clipping_config_;
321 clipping_config_ = clipping_config;
322 update_clipping_config();
356 const vec2& point_ndc,
const vec2& point_wc,
357 int button,
bool control,
bool shift
380 const vec2& point_ndc,
const vec2& point_wc,
381 const vec2& delta_ndc,
double delta_x_ndc,
double delta_y_ndc,
382 const vec2& delta_wc,
383 int button,
bool control,
bool shift
399 const vec2& point_ndc,
const vec2& point_wc,
400 int button,
bool control,
bool shift
442 void mouse_button_callback(
int button,
int action,
int mods);
443 void scroll_callback(
double xoffset,
double yoffset);
444 void cursor_pos_callback(
double xf,
double yf);
445 void drop_callback(
int nb,
const char** p);
446 void char_callback(
unsigned int c);
447 void key_callback(
int key,
int scancode,
int action,
int mods);
460 void update_clipping_config();
468 std::string clipping_config_;
471 bool control_is_down_;
474 vec2 last_point_ndc_;
476 Color background_color_;
477 Color background_color_2_;
478 mat4 viewing_matrix_;
479 mat4 lighting_matrix_;
480 std::string background_image_;
481 GLUPContext* glup_context_;
ComponentEncoding
Indicates the datatype used to encode each component of the colors.
ColorEncoding
Indicates how colors are encoded within the image.
Base class for all objects in the GOM system.
Implementation of RenderArea using ImGui.
RenderArea(index_t w, index_t h, index_t fb_w, index_t fb_h)
RenderArea constructor.
void resize(index_t w, index_t h, index_t fb_w, index_t fb_h)
Resizes this RenderArea.
void GL_terminate()
Deallocates OpenGL and GLUP objects.
void set_background_image(const std::string &value)
Sets the background image.
void set_projection_matrix(const mat4 &value)
Sets the projection matrix.
void mouse_down(RenderingContext *rendering_context, const vec2 &point_ndc, const vec2 &point_wc, int button, bool control, bool shift)
A signal that is triggered each time a mouse button is pushed.
void update_background_image_from_data(Memory::pointer ptr, Image::ColorEncoding color_encoding, Image::ComponentEncoding component_encoding, index_t width, index_t height)
Updates the background image from raw image data.
const Color & get_background_color_1() const
Gets the background color.
void set_background_color_1(const Color &value)
Sets the primary background color.
void key_up(const std::string &value)
A signal that is triggered each time a key is released.
void update()
Invalidates the memorized frame so that it will be updated on the next call to draw().
void mouse_move(RenderingContext *rendering_context, const vec2 &point_ndc, const vec2 &point_wc, const vec2 &delta_ndc, double delta_x_ndc, double delta_y_ndc, const vec2 &delta_wc, int button, bool control, bool shift)
A signal that is triggered when the mouse is dragged with a pushed button.
void snapshot(const std::string &filename, bool make_current=true, bool with_gui=false)
Saves a snapshot of this rendering area to an image file.
void update_memorized_frame()
Re-generates the memorized frame.
void GL_initialize()
Initializes OpenGL and GLUP objects.
const std::string & get_background_image() const
Gets the background image.
const mat4 & get_lighting_matrix() const
Gets the lighting matrix.
index_t get_frame_buffer_height() const
Gets the height of the window.
void key_down(const std::string &value)
A signal that is triggered each time a key is pushed.
void button_down(int value)
A signal that is triggered each time a mouse button is pressed.
const mat4 & get_viewing_matrix() const
Gets the viewing matrix.
RenderingContext * get_rendering_context() const
Gets the rendering context.
void mouse_up(RenderingContext *rendering_context, const vec2 &point_ndc, const vec2 &point_wc, int button, bool control, bool shift)
A signal that is triggered each time a mouse button is released.
void update_view_parameters()
Call this function if perspective mode is changed.
const mat4 & get_projection_matrix() const
Gets the projection matrix.
void dropped_file(const std::string &value)
A signal that is triggered whenever a file is drag-dropped into this RenderArea.
void set_lighting_matrix(const mat4 &value)
Sets the lighting matrix.
bool needs_to_redraw() const
Tests whether the window needs to be redrawn.
void set_clipping_config(const std::string &clipping_config)
Sets the current clipping configuration.
std::string get_gpu_information() const
Gets the GPU information.
index_t get_frame_buffer_width() const
Gets the width of the window.
void set_background_color_2(const Color &value)
Sets the secondary background color.
void draw_memorized_frame()
Draws the latest memorized frame.
void button_up(int value)
A signal that is triggered each time a mouse button is released.
const Color & get_background_color_2() const
Gets the secondary background color.
const std::string & get_clipping_config() const
Gets the current clipping configuration.
~RenderArea() override
RenderArea destructor.
std::string get_gpu_extensions() const
Gets GPU extensions.
void set_viewing_matrix(const mat4 &value)
Sets the viewing matrix.
index_t get_height() const
Gets the height of the window.
void resize_request(RenderingContext *rendering_context, int width, int height)
A signal that is triggered each time the render area is resized.
Helper class for OpenGL context management.
byte * pointer
Pointer to unsigned byte(s)
geo_index_t index_t
The type for storing and manipulating indices.
Global Graphite namespace.
The base class for all composite objects in the GOM system.
Transformation of user input between the screen and the 3D space.
Helper class for OpenGL context management.
Definitions common to all include files in the skin_imgui library.