![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <GuiVisualizer.h>


Classes | |
| struct | Impl |
Public Member Functions | |
| GuiVisualizer (const std::string &title, int width, int height) | |
| GuiVisualizer (const std::vector< std::shared_ptr< const ccHObject >> &geometries, const std::string &title, int width, int height, int left, int top) | |
| virtual | ~GuiVisualizer () |
| void | SetTitle (const std::string &title) |
| void | SetGeometry (std::shared_ptr< const ccHObject > geometry, bool loaded_model) |
| bool | SetIBL (const char *path) |
| void | LoadGeometry (const std::string &path) |
| Loads asynchronously, will return immediately. More... | |
| void | ExportCurrentImage (const std::string &path) |
| void | Layout (const gui::LayoutContext &context) override |
| void | StartRPCInterface (const std::string &address, int timeout) |
| Starts the RPC interface. See io/rpc/ReceiverBase for the parameters. More... | |
| void | StopRPCInterface () |
Public Member Functions inherited from cloudViewer::visualization::gui::Window | |
| Window (const std::string &title, int flags=0) | |
| Window (const std::string &title, int width, int height, int flags=0) | |
| Window (const std::string &title, int x, int y, int width, int height, int flags=0) | |
| virtual | ~Window () |
| const Theme & | GetTheme () const |
| visualization::rendering::Renderer & | GetRenderer () const |
| Rect | GetOSFrame () const |
| void | SetOSFrame (const Rect &r) |
| const char * | GetTitle () const |
| void | SetTitle (const char *title) |
| void | SizeToFit () |
| void | SetSize (const Size &size) |
| Sets the size of the window in pixels. Includes menubar on Linux. More... | |
| Size | GetSize () const |
| Rect | GetContentRect () const |
| float | GetScaling () const |
| Returns the scaling factor from OS pixels to device pixels. More... | |
| Point | GlobalToWindowCoord (int global_x, int global_y) |
| Returns the global point (in OS pixels) in window local coordinates. More... | |
| bool | IsVisible () const |
| void | Show (bool vis=true) |
| void | Close () |
| void | SetNeedsLayout () |
| Instructs the window to relayout before the next draw. More... | |
| void | PostRedraw () |
| void | SetTopmost (bool topmost) |
| void | RaiseToTop () const |
| bool | IsActiveWindow () const |
| void | SetFocusWidget (Widget *w) |
| Sets. More... | |
| void | AddChild (std::shared_ptr< Widget > w) |
| void | SetOnMenuItemActivated (Menu::ItemId item_id, std::function< void()> callback) |
| void | SetOnTickEvent (std::function< bool()> callback) |
| void | SetOnClose (std::function< bool()> callback) |
| void | SetOnKeyEvent (std::function< bool(const KeyEvent &)> callback) |
| void | ShowDialog (std::shared_ptr< Dialog > dlg) |
| void | CloseDialog () |
| Closes the dialog. More... | |
| void | ShowMessageBox (const char *title, const char *message) |
| void | DestroyWindow () |
| void | ShowMenu (bool show) |
| int | GetMouseMods () const |
| std::string | GetWebRTCUID () const |
| void | OnDraw () |
| void | OnResize () |
| void | OnMouseEvent (const MouseEvent &e) |
| void | OnKeyEvent (const KeyEvent &e) |
| void | OnTextInput (const TextInputEvent &e) |
| void | OnTickEvent (const TickEvent &e) |
| WindowSystem::OSWindow | GetOSWindow () const |
Protected Member Functions | |
| void | AddItemsToAppMenu (const std::vector< std::pair< std::string, gui::Menu::ItemId >> &items) |
| void | OnMenuItemSelected (gui::Menu::ItemId item_id) override |
| void | OnDragDropped (const char *path) override |
Protected Member Functions inherited from cloudViewer::visualization::gui::Window | |
| virtual Size | CalcPreferredSize () |
| LayoutContext | GetLayoutContext () |
| const std::vector< std::shared_ptr< Widget > > & | GetChildren () const |
Additional Inherited Members | |
Static Public Attributes inherited from cloudViewer::visualization::gui::Window | |
| static const int | FLAG_HIDDEN = (1 << 0) |
| static const int | FLAG_TOPMOST = (1 << 1) |
Definition at line 24 of file GuiVisualizer.h.
| cloudViewer::visualization::GuiVisualizer::GuiVisualizer | ( | const std::string & | title, |
| int | width, | ||
| int | height | ||
| ) |
Definition at line 743 of file GuiVisualizer.cpp.
| cloudViewer::visualization::GuiVisualizer::GuiVisualizer | ( | const std::vector< std::shared_ptr< const ccHObject >> & | geometries, |
| const std::string & | title, | ||
| int | width, | ||
| int | height, | ||
| int | left, | ||
| int | top | ||
| ) |
|
virtual |
Definition at line 962 of file GuiVisualizer.cpp.
|
protected |
Definition at line 968 of file GuiVisualizer.cpp.
| void cloudViewer::visualization::GuiVisualizer::ExportCurrentImage | ( | const std::string & | path | ) |
Definition at line 1215 of file GuiVisualizer.cpp.
References image, cloudViewer::t::geometry::path, cloudViewer::visualization::gui::Window::ShowMessageBox(), and cloudViewer::io::WriteImage().
Referenced by OnMenuItemSelected().
|
overridevirtual |
Lays out all the widgets in the window. If all children of the window are layouts, this function does not need to be overridden.
Reimplemented from cloudViewer::visualization::gui::Window.
Definition at line 1066 of file GuiVisualizer.cpp.
References context, cloudViewer::visualization::gui::Window::GetContentRect(), cloudViewer::visualization::gui::Window::Layout(), and min().
| void cloudViewer::visualization::GuiVisualizer::LoadGeometry | ( | const std::string & | path | ) |
Loads asynchronously, will return immediately.
Definition at line 1115 of file GuiVisualizer.cpp.
References cloudViewer::visualization::gui::Window::CloseDialog(), cloudViewer::io::CONTAINS_TRIANGLES, cloudViewer::visualization::gui::Application::GetInstance(), cloudViewer::visualization::gui::Window::GetTheme(), LogInfo, LogWarning, cloudViewer::t::geometry::path, cloudViewer::visualization::gui::Application::PostToMainThread(), cloudViewer::io::ReadFileGeometryType(), cloudViewer::io::ReadPointCloud(), cloudViewer::io::ReadTriangleModel(), cloudViewer::visualization::gui::Application::RunInThread(), SetGeometry(), cloudViewer::visualization::gui::Window::ShowDialog(), cloudViewer::visualization::gui::Window::ShowMessageBox(), theme, cloudViewer::io::ReadTriangleModelOptions::update_progress, cloudViewer::io::ReadPointCloudOption::update_progress, and UpdateProgress().
|
overrideprotectedvirtual |
Reimplemented from cloudViewer::visualization::gui::Window.
Definition at line 1343 of file GuiVisualizer.cpp.
References cloudViewer::visualization::gui::Application::AddWindow(), frame, cloudViewer::visualization::gui::Application::GetInstance(), cloudViewer::t::geometry::path, and SetTitle().
Referenced by OnMenuItemSelected().
|
overrideprotectedvirtual |
Reimplemented from cloudViewer::visualization::gui::Window.
Definition at line 1229 of file GuiVisualizer.cpp.
References cloudViewer::visualization::gui::Window::CloseDialog(), ExportCurrentImage(), cloudViewer::visualization::FILE_EXPORT_RGB, cloudViewer::visualization::FILE_OPEN, cloudViewer::visualization::FILE_QUIT, format, cloudViewer::visualization::rendering::Camera::GetForwardVector(), cloudViewer::visualization::gui::Application::GetInstance(), cloudViewer::visualization::rendering::Camera::GetLeftVector(), cloudViewer::visualization::gui::Application::GetMenubar(), cloudViewer::visualization::rendering::Camera::GetPosition(), cloudViewer::visualization::gui::Window::GetTheme(), cloudViewer::visualization::rendering::Camera::GetUpVector(), cloudViewer::visualization::HELP_ABOUT, cloudViewer::visualization::HELP_CAMERA, cloudViewer::visualization::HELP_CONTACT, cloudViewer::visualization::HELP_DEBUG, cloudViewer::visualization::HELP_KEYS, OnDragDropped(), cloudViewer::visualization::gui::FileDialog::OPEN, cloudViewer::t::geometry::path, cloudViewer::visualization::gui::Application::Quit(), cloudViewer::visualization::gui::FileDialog::SAVE, cloudViewer::visualization::gui::Window::SetNeedsLayout(), cloudViewer::visualization::SETTINGS_LIGHT_AND_MATERIALS, and cloudViewer::visualization::gui::Window::ShowDialog().
| void cloudViewer::visualization::GuiVisualizer::SetGeometry | ( | std::shared_ptr< const ccHObject > | geometry, |
| bool | loaded_model | ||
| ) |
Definition at line 984 of file GuiVisualizer.cpp.
References cloudViewer::visualization::GuiSettingsModel::GetDefaultPointCloudLightingProfile(), cloudViewer::visualization::GuiSettingsModel::MATERIAL_FROM_FILE_NAME, cloudViewer::visualization::MODEL_NAME, CV_TYPES::POINT_CLOUD, profile, cloudViewer::visualization::rendering::MaterialRecord::shader, and type.
Referenced by LoadGeometry().
| bool cloudViewer::visualization::GuiVisualizer::SetIBL | ( | const char * | path | ) |
Definition at line 1109 of file GuiVisualizer.cpp.
References cloudViewer::visualization::gui::Window::GetRenderer(), cloudViewer::t::geometry::path, cloudViewer::visualization::gui::Window::PostRedraw(), and result.
| void cloudViewer::visualization::GuiVisualizer::SetTitle | ( | const std::string & | title | ) |
Definition at line 964 of file GuiVisualizer.cpp.
References cloudViewer::visualization::gui::Window::SetTitle().
Referenced by OnDragDropped().
| void cloudViewer::visualization::GuiVisualizer::StartRPCInterface | ( | const std::string & | address, |
| int | timeout | ||
| ) |
Starts the RPC interface. See io/rpc/ReceiverBase for the parameters.
Definition at line 1096 of file GuiVisualizer.cpp.
References LogInfo, and LogWarning.
| void cloudViewer::visualization::GuiVisualizer::StopRPCInterface | ( | ) |
Definition at line 1107 of file GuiVisualizer.cpp.