27#ifndef EASY3D_VIEWER_MULTI_VIEWER_H
28#define EASY3D_VIEWER_MULTI_VIEWER_H
31#include <easy3d/viewer/viewer.h>
114 int rows()
const {
return num_rows_; }
138 void init()
override;
139 void post_resize(
int w,
int h)
override;
140 void draw()
const override;
143 bool mouse_release_event(
int x,
int y,
int button,
int modifiers)
override;
145 bool mouse_drag_event(
int x,
int y,
int dx,
int dy,
int button,
int modifiers)
override;
147 void update_division();
154 std::vector<const Model *> models;
155 std::vector<const Drawable *> drawables;
158 std::vector<std::vector<View> > views_;
163 std::unique_ptr<LinesDrawable2D> drawable_division_;
The base class for drawable objects. A drawable represent a set of points, line segments,...
Definition drawable.h:58
The drawable for rendering a set of line segments in the screen space.
Definition drawable_lines_2D.h:43
The base class of renderable 3D models.
Definition model.h:50
vec3 point_under_pixel(int x, int y, bool &found) const override
Query the XYZ coordinates of the surface point under the cursor.
Definition multi_viewer.cpp:291
int columns() const
Return the number of columns (of the grid-like layout) of the viewer.
Definition multi_viewer.h:120
bool snapshot() const override
Take a snapshot of the screen and save it to a file.
Definition multi_viewer.cpp:73
bool division_visible() const
Returns if the splitting lines of the views are visible.
Definition multi_viewer.cpp:162
void assign(int row, int col, const Model *m)
Assigns the model m to the view at position (row, col).
Definition multi_viewer.cpp:124
~MultiViewer() override
Destructor.
Definition multi_viewer.cpp:53
MultiViewer(int rows, int cols, const std::string &title="untitled")
Constructor.
Definition multi_viewer.cpp:45
void set_division_visible(bool b)
Sets the visibility of the splitting lines of the views.
Definition multi_viewer.cpp:156
int rows() const
Return the number of rows (of the grid-like layout) of the viewer.
Definition multi_viewer.h:114
void set_layout(int rows, int cols)
Set/Change the layout of the viewer.
Definition multi_viewer.cpp:60
const std::string & title() const
Query the window title of the viewer.
Definition viewer.h:123
Viewer(const std::string &title="Easy3D Viewer", int samples=4, int gl_major=3, int gl_minor=2, bool full_screen=false, bool resizable=true, int depth_bits=24, int stencil_bits=8, int width=800, int height=600)
Constructor.
Definition viewer.cpp:75
Definition collider.cpp:182
Vec< 3, float > vec3
A 3D point/vector of float type.
Definition types.h:44
Vec< 4, int32_t > ivec4
A 4D point/vector of int32_t type.
Definition types.h:60