![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <UIImage.h>
Classes | |
| struct | DrawParams |
| struct | Impl |
Public Types | |
| enum class | Scaling { NONE , ANY , ASPECT } |
Public Member Functions | |
| UIImage (const char *image_path) | |
| UIImage (std::shared_ptr< geometry::Image > image) | |
| UIImage (std::shared_ptr< t::geometry::Image > image) | |
| UIImage (visualization::rendering::TextureHandle texture_id, float u0=0.0f, float v0=0.0f, float u1=1.0f, float v1=1.0f) | |
| ~UIImage () | |
| void | UpdateImage (std::shared_ptr< geometry::Image > image) |
| void | UpdateImage (std::shared_ptr< t::geometry::Image > image) |
| void | SetScaling (Scaling scaling) |
| Scaling | GetScaling () const |
| Size | CalcPreferredSize (const LayoutContext &context, const Widget::Constraints &constraints) const |
| DrawParams | CalcDrawParams (visualization::rendering::Renderer &renderer, const Rect &frame) const |
|
explicit |
Definition at line 57 of file UIImage.cpp.
References cloudViewer::io::CreateImageFromFile().
|
explicit |
Definition at line 76 of file UIImage.cpp.
References image.
|
explicit |
Definition at line 95 of file UIImage.cpp.
References image.
|
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.
Definition at line 111 of file UIImage.cpp.
References cloudViewer::visualization::rendering::EngineInstance::GetResourceManager().
| cloudViewer::visualization::gui::UIImage::~UIImage | ( | ) |
Definition at line 135 of file UIImage.cpp.
| UIImage::DrawParams cloudViewer::visualization::gui::UIImage::CalcDrawParams | ( | visualization::rendering::Renderer & | renderer, |
| const Rect & | frame | ||
| ) | const |
Definition at line 178 of file UIImage.cpp.
References cloudViewer::visualization::rendering::Renderer::AddTexture(), ANY, ASPECT, frame, cloudViewer::visualization::rendering::REHandle< EntityType::Texture >::kBad, max(), min(), NONE, params, and cloudViewer::visualization::rendering::Renderer::UpdateTexture().
| Size cloudViewer::visualization::gui::UIImage::CalcPreferredSize | ( | const LayoutContext & | context, |
| const Widget::Constraints & | constraints | ||
| ) | const |
Definition at line 155 of file UIImage.cpp.
References ASPECT, cloudViewer::visualization::gui::Widget::Constraints::height, and cloudViewer::visualization::gui::Widget::Constraints::width.
| UIImage::Scaling cloudViewer::visualization::gui::UIImage::GetScaling | ( | ) | const |
Definition at line 153 of file UIImage.cpp.
Referenced by cloudViewer::visualization::gui::pybind_gui_classes().
| void cloudViewer::visualization::gui::UIImage::SetScaling | ( | Scaling | scaling | ) |
Definition at line 151 of file UIImage.cpp.
References scaling.
Referenced by cloudViewer::visualization::gui::pybind_gui_classes().
| void cloudViewer::visualization::gui::UIImage::UpdateImage | ( | std::shared_ptr< geometry::Image > | image | ) |
Updates the contents of the texture. If the image is a different size from the original, a new texture will be created.
Definition at line 141 of file UIImage.cpp.
References image.
| void cloudViewer::visualization::gui::UIImage::UpdateImage | ( | std::shared_ptr< t::geometry::Image > | image | ) |
Updates the contents of the texture. If the image is a different size from the original, a new texture will be created.
Definition at line 146 of file UIImage.cpp.
References image.