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
198 return frame_buffer_width_;
206 return frame_buffer_height_;
346 const vec2& point_ndc,
const vec2& point_wc,
347 int button,
bool control,
bool shift
370 const vec2& point_ndc,
const vec2& point_wc,
371 const vec2& delta_ndc,
double delta_x_ndc,
double delta_y_ndc,
372 const vec2& delta_wc,
373 int button,
bool control,
bool shift
389 const vec2& point_ndc,
const vec2& point_wc,
390 int button,
bool control,
bool shift
432 void mouse_button_callback(
int button,
int action,
int mods);
433 void scroll_callback(
double xoffset,
double yoffset);
443 void drop_callback(
int nb,
const char** p);
444 void char_callback(
unsigned int c);
445 void key_callback(
int key,
int scancode,
int action,
int mods);
467 bool control_is_down_;
470 vec2 last_point_ndc_;
472 Color background_color_;
473 Color background_color_2_;
474 mat4 viewing_matrix_;
475 mat4 lighting_matrix_;
476 std::string background_image_;
477 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_center(int x, int y)
Sets the center.
void set_background_image(const std::string &value)
Sets the background image.
const mat4 & get_projection_matrix() const
Gets the projection matrix.
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 dropped_file(const std::string &filename)
A signal that is triggered whenever a file is drag-dropped into this RenderArea.
void update_memorized_frame()
Re-generates the memorized frame.
RenderingContext * get_rendering_context() const
Gets the rendering context.
void GL_initialize()
Initializes OpenGL and GLUP objects.
const Color & get_background_color_2() const
Gets the secondary background color.
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_lighting_matrix() const
Gets the lighting matrix.
const std::string & get_background_image() const
Gets the background image.
void cursor_pos_callback(double xf, double yf)
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.
void set_lighting_matrix(const mat4 &value)
Sets the lighting matrix.
bool needs_to_redraw() const
Tests whether the window needs to be redrawn.
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.
const mat4 & get_viewing_matrix() const
Gets the viewing matrix.
void set_center_from_imgui_coords(int x, int y)
Sets the center.
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.
~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.