Visual Computing Library
Loading...
Searching...
No Matches
mesh_viewer.h
1/*****************************************************************************
2 * VCLib *
3 * Visual Computing Library *
4 * *
5 * Copyright(C) 2021-2025 *
6 * Visual Computing Lab *
7 * ISTI - Italian National Research Council *
8 * *
9 * All rights reserved. *
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the Mozilla Public License Version 2.0 as published *
13 * by the Mozilla Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 * This program is distributed in the hope that it will be useful, *
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19 * Mozilla Public License Version 2.0 *
20 * (https://www.mozilla.org/en-US/MPL/2.0/) for more details. *
21 ****************************************************************************/
22
23#ifndef VCL_QT_MESH_VIEWER_H
24#define VCL_QT_MESH_VIEWER_H
25
26#include "gui/drawable_object_vector_frame.h"
27
28#include <vclib/qt/gui/text_edit_logger.h>
29#include <vclib/render/drawable/drawable_object_vector.h>
30
31#include <QWidget>
32
33namespace vcl::qt {
34
35namespace Ui {
36class MeshViewer;
37} // namespace Ui
38
39class MeshViewer : public QWidget
40{
42
43 Ui::MeshViewer* mUI;
44
45 std::shared_ptr<vcl::DrawableObjectVector> mDrawableObjectVector;
46
47 std::shared_ptr<vcl::DrawableObjectVector> mListedDrawableObjects;
48 std::shared_ptr<vcl::DrawableObjectVector> mUnlistedDrawableObjects;
49
50public:
51 explicit MeshViewer(QWidget* parent = nullptr);
53
55 const std::shared_ptr<vcl::DrawableObjectVector>& v);
56
57 void setUnlistedDrawableObjectVector(
58 const std::shared_ptr<vcl::DrawableObjectVector>& v);
59
60 uint selectedDrawableObject() const;
61
62 TextEditLogger& logger();
63
64 void setDrawVectorIconFunction(
65 const DrawableObjectVectorFrame::IconFunction& f);
66
67public slots:
69
71
73
74 void fitScene();
75
76 void updateGUI();
77};
78
79} // namespace vcl::qt
80
81#endif // VCL_QT_MESH_VIEWER_H
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:43
Definition mesh_viewer.h:40
void renderSettingsUpdated()
Slot called every time that the MeshRenderSettingsFrame emits 'settingsUpdated()',...
Definition mesh_viewer.cpp:183
void visibilityDrawableObjectChanged()
Slot called when the user changed the visibility of an object in the DrawableObjectVectorFrame.
Definition mesh_viewer.cpp:137
void selectedDrawableObjectChanged(uint i)
Slot called when the user selected a different DrawableObject in the DrawableObjectVectorFrame.
Definition mesh_viewer.cpp:156
void setDrawableObjectVector(const std::shared_ptr< vcl::DrawableObjectVector > &v)
Sets the current DrawableObjectVector, and updates the GUI accordingly.
Definition mesh_viewer.cpp:98
Definition text_edit_logger.h:38