|
Open3D (C++ API)
0.19.0
|
#include <ImageWidget.h>
Data Structures | |
| struct | Impl |
Public Member Functions | |
| ImageWidget () | |
| ImageWidget (const char *image_path) | |
| ImageWidget (std::shared_ptr< geometry::Image > image) | |
| Uses existing image. Each ImageWidget will use one draw call. | |
| ImageWidget (std::shared_ptr< t::geometry::Image > image) | |
| Uses existing image. Each ImageWidget will use one draw call. | |
| ImageWidget (visualization::rendering::TextureHandle texture_id, float u0=0.0f, float v0=0.0f, float u1=1.0f, float v1=1.0f) | |
| ImageWidget (std::shared_ptr< UIImage > image) | |
| ~ImageWidget () | |
| void | UpdateImage (std::shared_ptr< geometry::Image > image) |
| void | UpdateImage (std::shared_ptr< t::geometry::Image > image) |
| std::shared_ptr< UIImage > | GetUIImage () const |
| void | SetUIImage (std::shared_ptr< UIImage > image) |
| Size | CalcPreferredSize (const LayoutContext &context, const Constraints &constraints) const override |
| void | Layout (const LayoutContext &context) override |
| DrawResult | Draw (const DrawContext &context) override |
| Public Member Functions inherited from open3d::visualization::gui::Widget | |
| Widget () | |
| Widget (const std::vector< std::shared_ptr< Widget > > &children) | |
| virtual | ~Widget () |
| virtual void | AddChild (std::shared_ptr< Widget > child) |
| virtual const std::vector< std::shared_ptr< Widget > > | GetChildren () const |
| virtual const Rect & | GetFrame () const |
| Returns the frame size in pixels. | |
| virtual void | SetFrame (const Rect &f) |
| virtual const Color & | GetBackgroundColor () const |
| virtual bool | IsDefaultBackgroundColor () const |
| virtual void | SetBackgroundColor (const Color &color) |
| virtual bool | IsVisible () const |
| virtual void | SetVisible (bool vis) |
| virtual bool | IsEnabled () const |
| virtual void | SetEnabled (bool enabled) |
| virtual void | SetTooltip (const char *text) |
| virtual const char * | GetTooltip () const |
| virtual Size | CalcMinimumSize (const LayoutContext &context) const |
| virtual EventResult | Mouse (const MouseEvent &e) |
| virtual EventResult | Key (const KeyEvent &e) |
| virtual DrawResult | Tick (const TickEvent &e) |
Additional Inherited Members | |
| Public Types inherited from open3d::visualization::gui::Widget | |
| enum class | DrawResult { NONE , REDRAW , RELAYOUT } |
| enum class | EventResult { IGNORED , CONSUMED , DISCARD } |
| Static Public Attributes inherited from open3d::visualization::gui::Widget | |
| static constexpr int | DIM_GROW = 10000 |
| Protected Member Functions inherited from open3d::visualization::gui::Widget | |
| void | DrawImGuiPushEnabledState () |
| void | DrawImGuiPopEnabledState () |
| void | DrawImGuiTooltip () |
| open3d::visualization::gui::ImageWidget::ImageWidget | ( | ) |
|
explicit |
Uses image from the specified path. Each ImageWidget will use one draw call.
|
explicit |
Uses existing image. Each ImageWidget will use one draw call.
|
explicit |
Uses existing image. Each ImageWidget will use one draw call.
|
explicit |
Uses an existing texture, using texture coordinates (u0, v0) to (u1, v1). Does not deallocate texture on destruction. This is useful for using an icon atlas to reduce draw calls.
| open3d::visualization::gui::ImageWidget::ImageWidget | ( | std::shared_ptr< UIImage > | image | ) |
| open3d::visualization::gui::ImageWidget::~ImageWidget | ( | ) |
|
overridevirtual |
Reimplemented from open3d::visualization::gui::Widget.
|
overridevirtual |
Draws the widget. If this is a Dear ImGUI widget, this is where the actual event processing happens. Return NONE if no action needs to be taken, REDRAW if the widget needs to be redrawn (e.g. its value changed), and RELAYOUT if the widget wishes to change size.
Reimplemented from open3d::visualization::gui::Widget.
| std::shared_ptr< UIImage > open3d::visualization::gui::ImageWidget::GetUIImage | ( | ) | const |
|
overridevirtual |
Reimplemented from open3d::visualization::gui::Widget.
| void open3d::visualization::gui::ImageWidget::SetUIImage | ( | std::shared_ptr< UIImage > | image | ) |
| void open3d::visualization::gui::ImageWidget::UpdateImage | ( | std::shared_ptr< geometry::Image > | image | ) |
Mostly a convenience function for GetUIImage()->UpdateImage(). If 'image' is the same size as the current image, will update the texture with the contents of 'image'. This is the fastest path for setting an image, and is recommended if you are displaying video. If 'image' is a different size, it will allocate a new texture, which is essentially the same as creating a new UIImage and calling SetUIImage(). This is the slow path, and may eventually exhaust internal texture resources.
| void open3d::visualization::gui::ImageWidget::UpdateImage | ( | std::shared_ptr< t::geometry::Image > | image | ) |